http://stackoverflow.com/a/26431866
type: Answer
has body: I don't think you'd want to store the password. You could generate a session token and store that in the sessionStorage. Anyway, if you come to store the password itself, don't store it as plain text.
score: 0
answers question: http://stackoverflow.com/q/26431687

http://stackoverflow.com/q/26362954
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41384679
tagged with: ajax
has comment: http://stackoverflow.com/comment/41384599
has comment: http://stackoverflow.com/comment/41383938
has comment: http://stackoverflow.com/comment/41384116
has body: I'm writing piece of code, and I need some functions to be executed sequential, I used ajax call but it is asynchronous and i faced problems function GetLibraryActivities(libraryName, callback) { $.ajax({ dataType: "json", url: "/WorkflowDesigner/GetLibraryActivities/?libraryName=" + libraryName }).done(function (data) { console.log(data); return data; }); } then I tried to work with callback function, but it didn't work too. function GetLibraryActivities(libraryName, callback) { $.ajax({ 'url': "/WorkflowDesigner/GetLibraryActivities/?libraryName=" + libraryName, 'type': 'GET', 'success': callback }); } GetLibraryActivities("Petrophysics", function (data) { petrophysicsData = data }); when I try to use petrophysicsData variable under the code it returns unidentified , I need a mean to call a function in synchronous way, any help will be appreciated thanks.
has title: Synchronous javascript call to MVC 4 Controller action
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41384063
has comment: http://stackoverflow.com/comment/41383930
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26363424
type: Question
has comment: http://stackoverflow.com/comment/41384292
accepted answer: http://stackoverflow.com/a/26363424
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26363655
has comment: http://stackoverflow.com/comment/41384365
has comment: http://stackoverflow.com/comment/41383863
has answer: http://stackoverflow.com/a/26363655

http://stackoverflow.com/comment/41671694
type: Comment
type: QuestionComment
has text: Hi, the data changes depending on user input, but I've added some sample data to question.
score: 0
comment on: http://stackoverflow.com/q/26506445

http://stackoverflow.com/comment/41429435
has text: Sure thing; I'll edit this comment as soon as I get results. #EDIT Working fine, thanks!
comment on: http://stackoverflow.com/q/26387749
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26492317
tagged with: asp.net-web-api
has title: Restrict API Usage
tagged with: javascript
score: 0
tagged with: rest
answer count: 1
tagged with: oauth
has body: I want to put a restriction on my API so only registered users can use it on their websites. The javascript will be used on their website by pasting it into their html. Right now I use a token for each user but it's visible to the public on their site so anyone could copy it. It tracks usage but doesn't restrict it to only their site. My first thought was to get the HTTP_REFERER variable from the http headers on the server and make sure it's from the domain registered by the user. This won't work because HTTP_REFERER can be blank or changed. My second thought was to use JavaScript in the pasted script to get the document.location and pass that back the to server. That can also be tampered with so it is unreliable. I'm looking at OAUTH2 now as a solution. I don't know much about it besides it's used for SSO. Looking at this JS OAUTH2 Lib too: https://github.com/andreassolberg/jso Could they be used for what I need to do? One requirement is that the script is pasted into the HTML. There shouldn't be any other configuration on their site that needs to be done. What other solutions are their for this?
accepted answer: http://stackoverflow.com/a/26495256
type: AnsweredQuestion
tagged with: oauth-2.0
has answer: http://stackoverflow.com/a/26495256
type: Question

http://stackoverflow.com/comment/41431578
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26374064
type: QuestionComment
has text: I did notice some similarities already while viewing some code samples, and I'm sure I will more the deeper I dive into this, similarly, I know I will run into many new things as well. Thank you for you input.

http://stackoverflow.com/comment/41503682
type: QuestionComment
comment on: http://stackoverflow.com/q/26429332
has text: Thanks, that seemed to work! I knew it was probably just a small error.
score: 0
type: Comment

http://stackoverflow.com/q/26364141
has answer: http://stackoverflow.com/a/26364304
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41386003
has comment: http://stackoverflow.com/comment/41387179
has comment: http://stackoverflow.com/comment/41385881
favorite count: 0
has body: I have two HTML files: One acts as a template, supplying the navigation, sidebars, etc., and the other has the main content. I'm trying to figure out how best to insert the content into the template. I need persistent URLs, so my plan was to have the content page essentially replace itself with the template, plugging the text back into the resulting page. I'm really new to front-end programming and I'm suspicious that this may be an anti-pattern, so my first question is about whether I'm barking up the right tree. The problem seems universal, and I'm sure there must be a best practice, though I haven't yet seen it discussed. If this is an acceptable way to proceed, then what JavaScript function would allow me to access the HTML of two different pages at the same time? [EDIT: It's a small page on GitHub]
has comment: http://stackoverflow.com/comment/41386012
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26364304
type: AnsweredQuestion
score: 1
upvote count: 1
has title: Grabbing HTML from another page
has comment: http://stackoverflow.com/comment/41386019
type: Question
has comment: http://stackoverflow.com/comment/41387461
tagged with: javascript
has comment: http://stackoverflow.com/comment/41385944

http://stackoverflow.com/comment/41408937
type: QuestionComment
comment on: http://stackoverflow.com/q/26376409
score: 0
type: Comment
has text: Edited question with the code in which the problem is.

http://stackoverflow.com/q/26403264
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26403353
type: Question
has body: This is in a Drupal context but i believe its common for all ajax requests. On a beforeSend callback im aborting the request depending on DOM conditions like: Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) { if ($(this.element).hasClass('disabled')) { xmlhttprequest.abort(); } }) Why can't I reprocess this request afterwards? I mean, when the link is clicked again the code doesn't even go through beforeSend()..
tagged with: drupal-7
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: jquery ajax.abort(), how to resend again?
tagged with: xmlhttprequest

http://stackoverflow.com/comment/41444259
type: QuestionComment
type: Comment
has text: Why not just try it and see for yourself? It shouldn't be hard to simulate that.
score: 1
comment on: http://stackoverflow.com/q/26396320

http://stackoverflow.com/comment/41536200
type: QuestionComment
comment on: http://stackoverflow.com/q/26446911
score: 1
has text: Is your JavaScript file being loaded correctly? Are you defining the function in the scope of some other function? This is not enough code to determine what might be wrong.
type: Comment

http://stackoverflow.com/q/26466560
answer count: 1
tagged with: angular-ui
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26467174
has body: I using Angular.js for my application but when i use ng-include inside of ui-view like below I get this error: Error: e is null .after/<@http://localhost/vb-asli/js/angular.min.js:152:228 r@http://localhost/vb-asli/js/angular.min.js:7:288 And my code is like this:
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17001589
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26467174
score: 0
has title: when use ng-include inside of ui-view get error

date
tags question: http://stackoverflow.com/q/26500694
tags question: http://stackoverflow.com/q/26453996
tags question: http://stackoverflow.com/q/26353984
tags question: http://stackoverflow.com/q/26369075
tag name: date
tags question: http://stackoverflow.com/q/26485617
tags question: http://stackoverflow.com/q/26491841
tags question: http://stackoverflow.com/q/26399064
tags question: http://stackoverflow.com/q/26469397
tags question: http://stackoverflow.com/q/26468607
tags question: http://stackoverflow.com/q/26453610
tags question: http://stackoverflow.com/q/26406096
tags question: http://stackoverflow.com/q/26368682
tags question: http://stackoverflow.com/q/26414860
tags question: http://stackoverflow.com/q/26439492
tags question: http://stackoverflow.com/q/26452258
tags question: http://stackoverflow.com/q/26495967
tags question: http://stackoverflow.com/q/26453508
tags question: http://stackoverflow.com/q/26453226
tags question: http://stackoverflow.com/q/26477657
type: Tag
tags question: http://stackoverflow.com/q/26506560
tags question: http://stackoverflow.com/q/26387429
tags question: http://stackoverflow.com/q/26486696
tags question: http://stackoverflow.com/q/26427305
tags question: http://stackoverflow.com/q/26392280
tags question: http://stackoverflow.com/q/26373927
tags question: http://stackoverflow.com/q/26446094
tags question: http://stackoverflow.com/q/26505811
tags question: http://stackoverflow.com/q/26361631

http://stackoverflow.com/comment/48572444
has text: I hate to comment in an old thread but you seem to know what you're doing with Listboxes, would you mind taking a look at [this](http://stackoverflow.com/questions/30193866/how-to-assign-a-selected-value-to-a-selected-item-in-a-listbox-so-that-it-can-be) as i don't have many other options. Would you reccommend me using Jquery instead of doing it predominantly controller based?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26471097

http://stackoverflow.com/comment/41657179
comment on: http://stackoverflow.com/a/26494070
score: 0
type: AnswerComment
has text: @Murplyx This is precisely why I recommended using a parser instead. If you have a very restricted syntax you're trying to match, that's one thing. But for true mathematical expressions, there are literally an infinite number of permutations this could take, and a regular expression is just not powerful enough to handle them all.
type: Comment

http://stackoverflow.com/q/26403196
has title: How to apply css to all html elements in a div selector with jquery
has comment: http://stackoverflow.com/comment/41455684
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41455511
tagged with: css
has comment: http://stackoverflow.com/comment/41458338
linked to: http://stackoverflow.com/q/4357863
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26403488
tagged with: javascript
has comment: http://stackoverflow.com/comment/41457144
has comment: http://stackoverflow.com/comment/41457238
has body: I need to apply css font-size by a jquery on click to every element under div selector. But I can't make them affect. This is how I tried. CSS #reading_pane{ font-size:14pt; } HTML this is a text this is another text A+ A- javascript $(document).ready(function() { $('#incfont').click(function(){ curSize= parseInt($('#reading_pane span, p').css('font-size')) + 2; if(curSize<=20) $('#reading_pane').css('font-size', curSize); }); $('#decfont').click(function(){ curSize= parseInt($('#reading_pane').css('font-size')) - 2; if(curSize>=12) $('#reading_pane').css('font-size', curSize); }); }); As the detailed above. I need every and in div#reading_pane change the size on each a clicked.
has comment: http://stackoverflow.com/comment/41457001
downvote count: 0
has comment: http://stackoverflow.com/comment/41456054
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/26445451
score: -4
has comment: http://stackoverflow.com/comment/41533554
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41533543
downvote count: 4
has title: Javascript array push function
has answer: http://stackoverflow.com/a/26445637
upvote count: 0
tagged with: push
tagged with: arrays
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41533651
type: UnansweredQuestion
has body: I have created a form in html which takes in user data. And then I use javascript to save that data into an array. Below is my code: function test(){ var fName = document.getElementById('myName').value; var test = ["dataOne"]; test.push("dataTwo"); test.push("dataThree"); test.push(fName); } THE ISSUE: DataOne, dataTwo and dataThree are held at the following indexes in the array 0,1,2. Now the data being entered by the user through the form is being saved into a variable called "fName" and then that variable is being pushed into the array. When I push the variable into the array its held at index 3 in the array. Every time a user inputs some data the data is saved at index 3. I wanted the next data to be saved at index 4 and the index 5 and so on. Every user submission should be at a new index. Currently if a user submits a form the array will look like this: User 1: [dataOne,dataTwo, dataThree,user1 input] If a 2nd user submits a form: User 2: [dataOne,dataTwo, dataThree,user2 input] The user1 input has been over written by the user 2 input. Can anyone help. Thanks in advance.
has comment: http://stackoverflow.com/comment/41533640
linked to: http://stackoverflow.com/q/26439098
has comment: http://stackoverflow.com/comment/41533544

http://stackoverflow.com/q/26445248
type: AnsweredQuestion
has body: (Let us suppose that there is a good reason for wishing this. See the end of the question if you want to read the good reason.) I would like to obtain the same result as a for in loop, but without using that language construct. By result I mean only an array of the property names (I don't need to reproduce the behavior that would happen if I modify the object while iterating over it). To put the question into code, I'd like to implement this function without for in: function getPropertiesOf(obj) { var props = []; for (var prop in obj) props.push(prop); return props; } From my understanding of the ECMAScript 5.1 specification about the for in statement and the Object.keys method, it seems the following implementation should be correct: function getPropertiesOf(obj) { var props = []; var alreadySeen = {}; // Handle primitive types if (obj === null || obj === undefined) return props; obj = Object(obj); // For each object in the prototype chain: while (obj !== null) { // Add own enumerable properties that have not been seen yet var enumProps = Object.keys(obj); for (var i = 0; i &lt; enumProps.length; i++) { var prop = enumProps[i]; if (!alreadySeen[prop]) props.push(prop); } // Add all own properties (including non-enumerable ones) // in the alreadySeen set. var allProps = Object.getOwnPropertyNames(obj); for (var i = 0; i &lt; allProps.length; i++) alreadySeen[allProps[i]] = true; // Continue with the object's prototype obj = Object.getPrototypeOf(obj); } return props; } The idea is to walk explicitly the prototype chain, and use Object.keys to get the own properties in each object of the chain. We exclude property names already seen in previous objects in the chain, including when they were seen as non-enumerable. This method should even respect the additional guarantee mentioned on MDN: The Object.keys() method returns an array of a given object's own enumerable properties, in the same order as that provided by a for...in loop [...]. (emphasis is mine) I played a bi…
accepted answer: http://stackoverflow.com/a/26445422
score: 6
has title: Obtain the same result as a for..in loop, without any for..in loop
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: ecmascript-5
has answer: http://stackoverflow.com/a/26445422
favorite count: 0
has comment: http://stackoverflow.com/comment/41533887
has comment: http://stackoverflow.com/comment/41534238
upvote count: 6
has comment: http://stackoverflow.com/comment/41533938
has comment: http://stackoverflow.com/comment/41534068

http://stackoverflow.com/comment/41760576
has text: It is working (checked in Chrome, IE11, IE8 emulated). When the focus is on the select element and enter is pressed, the next control is focused.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26556204
type: Comment

http://stackoverflow.com/comment/41518569
type: Comment
comment on: http://stackoverflow.com/a/26426685
type: AnswerComment
score: 0
has text: @simonzack You talk about `var` being undefined at several points; I _think_ you actually mean undeclared.

http://stackoverflow.com/comment/41473249
type: Comment
has text: Yes, this is the same I did but if you change the SELECT element from the default `Age range` to any the button isn't enabled
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26412455

http://stackoverflow.com/a/26433461
has comment: http://stackoverflow.com/comment/41512086
type: Answer
has comment: http://stackoverflow.com/comment/41513971
has comment: http://stackoverflow.com/comment/41512816
has comment: http://stackoverflow.com/comment/41512832
has comment: http://stackoverflow.com/comment/41535697
has comment: http://stackoverflow.com/comment/41512078
has body: In Javascript, whenever you want to do anything in response to something happening, you have to tie your logic to a handler for a relevant event that corresponds to the "something happening". In this case, the relevant part of your scenario is that you want to check which elements are selected when the user clicks on one. Having identified that that the "click" is the event you want to target, your next step is to add an onClick handler. Specifically, what you want to do is add an onClick handler to all three elements which checks whether the other two are checked (and if so creates the desired feedback). For instance, say you have three checkboxes all with a class "checkbox": $('.checkbox').click(function() { // keep track of whether any checkboxes are un-checked with a flag var anyUnchecked; // iterate through all the checkboxes $('.checkbox').each(function() { // if there was already an un-checked checkbox, or if this checkbox is // un-checked, set our flag anyUnchecked = anyUnchecked || !$(this).is(':checked'); }); // if our flag indicates any were un-checked, stop here if (anyUnchecked) return; // do whatever you want to do when all three are checked. $('#secondaryFeedbackStatement').show(); }); - EDIT - Since you're not dealing with checkboxes (which keep track of their own state), you'll need to track whether or not each &lt;div&gt; is selected somehow. Luckily jQuery provides a mechanism for saving arbitrary data on elements, called data. Here's how you could use it: $('#p26_opt1, #p26_opt2, #p26_opt3').click(function() { // check whether this div was selected already var wasSelected = $(this).data('selected'); // change its selected state to the opposite of what it was before $(this).data('selected', !wasSelected); // keep track of whether any checkboxes are un-checked with a flag var anyUnselected; // iterate through all the divs $('#p26_opt1, #p26_opt2, #p26_opt3').each(function() { // if there was already an un-selected div, or if this div is // un-selec…
has comment: http://stackoverflow.com/comment/41512657
has comment: http://stackoverflow.com/comment/41512135
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41512777
score: 0
has comment: http://stackoverflow.com/comment/41536064
has comment: http://stackoverflow.com/comment/41536139
accepted answer of: http://stackoverflow.com/q/26433445
answers question: http://stackoverflow.com/q/26433445
has comment: http://stackoverflow.com/comment/41512270
has comment: http://stackoverflow.com/comment/41512359

http://stackoverflow.com/a/26441207
downvote count: 0
has comment: http://stackoverflow.com/comment/41526225
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26440835
accepted answer of: http://stackoverflow.com/q/26440835
has comment: http://stackoverflow.com/comment/41525745
has comment: http://stackoverflow.com/comment/41525715
has comment: http://stackoverflow.com/comment/41525923
has comment: http://stackoverflow.com/comment/41526288
has body: Notice the usage of this inside the navSwitch first argument. It's all a matter of getting the logic to work. In the onclick handler onclick="navSwitch(this)" the this refers to the current element which are often called nodes. So the argument for navSwitch is named node. To understand usage of this well you'll need to study object oriented programming. Do a google search for it. You wanted to know about the setting of current. Current is just what ever element was last clicked on. The reasoning is that which ever last element is available that will be the one that will have its active class unset. Being that the element clicked on will be the active one we set that to active, but before we do that we set current to that clicked element. As far as why I chose the gotclass element. That was set arbitrarily because that's the one you had set active in the first place. If you change that in the future you can always just add the gotclass class to some other element so that will be the first one active as long as you have the active class already set on it. In short it's the order in which you use the variables, and their assigned values. Mess with the variable by assigning different elements to it to see what happens. Help Home Gallery Cars Customer Care Help Test Test1 Test2 This is some simple text
type: AcceptedAnswer

http://stackoverflow.com/q/26453939
has comment: http://stackoverflow.com/comment/41549890
upvote count: 1
tagged with: regex
has comment: http://stackoverflow.com/comment/41550905
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26455274
score: 1
has body: I search for words in a text with: var newWords = data.match(/\b[^\s\d,-.:!?{}\"“\[\]']+/g); This works, except for words that begin with letters like Ä, Ö, Ü, which is perfectly possible in the German language. What I would really like to do, is to write the search above like var newWords = data.match(/\b[^\W\d]+/g); But this leaves me completly without ä, ö, ü in the words. ß is also missing. Is there a nice solution for it?
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26453998
has answer: http://stackoverflow.com/a/26453998
has answer: http://stackoverflow.com/a/26455274
has title: Regex: How can I find a words beginning with Ä,Ö,Ü ...?
favorite count: 0
has comment: http://stackoverflow.com/comment/41570294

http://stackoverflow.com/a/26398788
score: 4
accepted answer of: http://stackoverflow.com/q/26398352
type: AcceptedAnswer
has body: You should read documentation again. You can try : $('#myMenu').on('hidden.bs.offcanvas', function (e) { ... });
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/65311697
answers question: http://stackoverflow.com/q/26398352

http://stackoverflow.com/comment/41487996
type: QuestionComment
has text: add a class to your spans
comment on: http://stackoverflow.com/q/26421056
score: 0
type: Comment

http://stackoverflow.com/a/26460115
has body: You may have two possible problem sources: 1) Content-Type. Specify content type and charset just before sending out JSON from PHP: Header('Content-Type: application/json;charset=utf8'); (and ensure content is UTF8 encoded). 2) I have recently experienced your same problem. I'm 100% sure the JSON was correct (checked with jsonlint from data lifted off the wire with tcpdump) and the same code had worked up to the day before. The bug was not reproducible in Chrome. It also went unexplicably away after upgrading Firefox and clearing the cache, but it never presented itself on a still non-updated Firefox on another PC. In some cases I noticed that both Firefox and Chrome appear to request a JSON packet but process an earlier version from the cache, but was not able to reproduce the phenomenon in any predictable way. I do know though that to prevent it it is sufficient to add a non-repeating element to the query: xmlhttp.open("GET","to_php_page.php?namee="+n + "&amp;ts=" + Date.now(), true); This effectively disables caching for that request, so for large JSON resources that change rarely, it isn't really a good thing to do. Other possibilities You ought to verify whether the cUrl request PHP side does return properly. You might have an error, possibly a cUrl warning of some kind issued by httpGet. Try opening the URL directly in the browser. If you see something like PHP Warning: curl_exec: ... { (JSON) } well, that of course is not JSON and JSON.parse() will complain that the "P" in "PHP Warning" is indeed an unexpected character.
answers question: http://stackoverflow.com/q/26459546
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41559873

http://stackoverflow.com/comment/41659316
type: QuestionComment
comment on: http://stackoverflow.com/q/26512408
score: 0
has text: @egk - check out my answer and see if this points you in the right direction of what you're looking for. Don't forget to accept if it works for you. Also - let me know if you have any other questions. Thanks!
type: Comment

http://stackoverflow.com/q/26390735
score: 1
has comment: http://stackoverflow.com/comment/41437188
downvote count: 1
has comment: http://stackoverflow.com/comment/41436049
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41434864
answer count: 1
has comment: http://stackoverflow.com/comment/41435419
favorite count: 0
has answer: http://stackoverflow.com/a/26390886
upvote count: 2
has comment: http://stackoverflow.com/comment/41435690
has comment: http://stackoverflow.com/comment/41435335
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41434896
has comment: http://stackoverflow.com/comment/41434642
has body: Lets say I have these two pieces of code - which are identical. Also lets assume that the '.selector' returns atleast 2 objects. Snippet 1 $('.selector').myMethod(); Snippet 2 $('.selector').each(function(){ $(this).myMethod(); }); Lets say for each one of the 'selected' returned objects I want to pass in the objects id wrapped up to myMethod(). So Snippet 2 could become $('.selector').each(function(){ $(this).myMethod({attribute: $(this).attr('id')}); }); How can I do something similar with Snippet 1 (i.e without using $.each())? For obvious reasons this isn't correct $('.selector').myMethod({attribute: $(this).attr('id')}); as $(this) does not represent any one of the 'selected' returned object. EDIT: In Snippet 1 Is there any way to reference the returned object as jQuery itself 'loops' through each returned object and calls the method. (again w/o $.each()).
has comment: http://stackoverflow.com/comment/41434651
has title: jQuery selector vs each

http://stackoverflow.com/comment/41424648
score: 0
has text: @MathiasaurusRex not inside i need next to select element
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26385267

http://stackoverflow.com/q/26438900
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26443102
tagged with: marionette
tagged with: backbone.js
type: UnansweredQuestion
tagged with: handlebars.js
upvote count: 1
has body: As per I know, marionette.template accept either jquery selector or compiled template string. If I write code like in the following way, working fine exports.ProductInfoView=Backbone.Marionette.ItemView.extend({ domInfo:{ mainTemplateId:"tagProductListTpl", tableTemplateId:"taginfoViewTpl" }, template:commomFunctions.templateCompilation("tagProductListTpl",""), onRender:function(){ this.templatingProductInformation(); }, modelEvents:{ "change:currentJson":"templatingProductInformation" }, templatingProductInformation:function(){ console.log(this.el); //this.el.innerHTML=commomFunctions.templateCompilation(this.ui.mainTemplateId,""); } }); Note :commonFunctions.templateCompilation() accept templateId as first argument and data as second argument. It will compile handlebars template and it return compiled template. If I assign that return value to template, working fine. I want to make data for templating,so I am passing function to template like in the following way. exports.ProductInfoView=Backbone.Marionette.ItemView.extend({ domInfo:{ mainTemplateId:"tagProductListTpl", tableTemplateId:"taginfoViewTpl" }, template:function(){ return commomFunctions.templateCompilation("tagProductListTpl",""); }, onRender:function(){ this.templatingProductInformation(); }, modelEvents:{ "change:currentJson":"templatingProductInformation" }, templatingProductInformation:function(){ console.log(this.el); //this.el.innerHTML=commomFunctions.templateCompilation(this.ui.mainTemplateId,""); } }); This way also working fine, If you observer I hard coded templateId("tagProductListTpl") inside function.But I don't want like that. I want to use like this.domInfo.mainTemplateId instead of hard coding. that way it's not working fine. It's throwing error. I know it's out of scope. but how can I achive this. can anyone help me. Thanks.
score: 1
linked to: http://stackoverflow.com/q/25913709
type: Question
has title: how to assign function to marionette.template
downvote count: 0
answer count: 1

http://stackoverflow.com/a/77637399
answers question: http://stackoverflow.com/q/26452407
type: Answer
upvote count: 1
score: 1
has body: Prefer using WebP nowadays. I took the optimized version from the accepted answer and converted it to WebP with lossless compression. The new size is 40KB (-55%) with no visual difference. Here is the new image.
downvote count: 0

http://stackoverflow.com/q/26476422
has answer: http://stackoverflow.com/a/26476524
type: AnsweredQuestion
tagged with: dom
type: Question
score: 0
answer count: 2
has body: Background I'm working on a project that incorporates a drawer for navigation. When a toggle ('nav-drawer-toggle') is clicked, it opens the drawer and shifts the body over by the drawer's width. The Issue However, I also want to apply the 'navigating' class to my footer (which has a &lt;footer&gt; tag) and my header (which has a &lt;nav&gt; tag). I've tried adding in getElementsByTagName('footer') and getElementsByTagName('nav'), but clearly did so improperly. How would I properly get those to work along with the currently-working getElementById('body')? UPDATE Now the footer works, but the header is still unchanged. Here's the updated code: var checkbox = document.getElementById('nav-drawer-toggle'); var dashboard_body = document.getElementById('body'); var dashboard_header = document.getElementsByTagName('nav')[0]; var dashboard_footer = document.getElementsByTagName('footer')[0]; checkbox.onchange = function() { if(this.checked) { dashboard_body.className += 'navigating', dashboard_header.className += 'navigating', dashboard_footer.className += 'navigating'; } else { dashboard_body.className = '', dashboard_header.className = '', dashboard_footer.className = ''; } };
has title: Applying A Class In Multiple Places Using Javascript
tagged with: javascript
has answer: http://stackoverflow.com/a/26476555
accepted answer: http://stackoverflow.com/a/26476555
tagged with: classname
possible better answer: http://stackoverflow.com/a/26476524

http://stackoverflow.com/comment/41651109
score: 1
has text: You shouldn't do this. Sometimes users get disconnected and reconnect on a completely new connection before the old one dies off.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26510505

http://stackoverflow.com/comment/41642892
has text: But i would avoid storing it in the same database as the corresponding hashes.
score: 3
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26506073

http://stackoverflow.com/a/26487125
score: 1
accepted answer of: http://stackoverflow.com/q/26486914
has body: You can not simply modify a javascript file sitting on the server from browser side javascript. You need to implement some server side logic. If you don't like PHP, but like JavaScript, check out NodeJS for example. With Node you should be able to build some lightweight serverside logic to modify your json array file with additional images.
answers question: http://stackoverflow.com/q/26486914
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/q/26433663
has answer: http://stackoverflow.com/a/26434172
has answer: http://stackoverflow.com/a/26433752
type: Question
answer count: 2
has title: retrieve Json Object's property returned from $.getJSON
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41512313
possible better answer: http://stackoverflow.com/a/26433752
has comment: http://stackoverflow.com/comment/41512202
has body: I am unable to parse a property from JSON object. Since this is just one JSON object, I am not sure if I need to do $.each or I can directly grab properties as data.d.property. Can someone explain how I do about grabbing properties value from this object? This is what I have: jQ(document).ready(function() { var listDataURL = ""; var root = getParameterByName('RootFolder'); var rootFolderID = getParameterByName("ID"); var docSetTitle = root.substr(root.lastIndexOf('/') + 1); listDataURL = "http://SomeSite/sites/TestWF/_vti_bin/listdata.svc/ResumeBank(" + rootFolderID +")"; //use the getJSON mehtod of Jquery jQ.getJSON(listDataURL, function(data, status, jqXHR) { console.log(jqXHR.responseText); //iterate through all the items jQ.each(data.d.results, function(i, result) { //get child items count for the current set ChildItemCount = result.ItemChildCount; NumOfItemsApproved = result.ApprovalCounter; }); if (ChildItemCount !== NumOfItemsApproved){ alert("Ah ah! The ApprovalCounter got skewed and needs to be fixed."); } if (ChildItemCount === NumOfItemsApproved){ alert("ApprovalCounter looks good!"); } }); }); And the JSON response is the below, I am trying to grab the value of ApprovalCounter: { "d":{ "__metadata":{ "uri":"http://collaboration/sites/TestWF/_vti_bin/listdata.svc/ResumeBank(84)", "etag":"W/\"12\"", "type":"Microsoft.SharePoint.DataService.ResumeBankItem", "edit_media":"http://collaboration/sites/TestWF/_vti_bin/listdata.svc/ResumeBank(84)/$value", "media_src":"http://collaboration/sites/TestWF", "content_type":"text/xml" }, "Id":84, "ContentTypeID":"0x0120D52000E387E9726C57FE40807A71CC05BEF45A005D5A666FE9576E42B629AF7CDB33F1B0", "ContentType":"JobApplication", "Created":"\/Date(1413213951000)\/", "CreatedBy":{ "__deferred":{ "uri":"http://collaboration/sites/TestWF/_vti_bin/listdata.svc/ResumeBank(84)/CreatedBy" } }, "CreatedById":1, "Modified":"\/Date(1413561633000)\/", "ModifiedBy":{ "__deferred":{ "uri":"http://collaboration/sites/TestWF/_vti_bin/listd…
has comment: http://stackoverflow.com/comment/41512257
has comment: http://stackoverflow.com/comment/41512280
accepted answer: http://stackoverflow.com/a/26434172
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41512250

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/26383752
tags question: http://stackoverflow.com/q/26456410
tags question: http://stackoverflow.com/q/26492300
tags question: http://stackoverflow.com/q/26410680
tags question: http://stackoverflow.com/q/26437961
tags question: http://stackoverflow.com/q/26488952
tags question: http://stackoverflow.com/q/26390382
tags question: http://stackoverflow.com/q/26487405
tags question: http://stackoverflow.com/q/26366065
tags question: http://stackoverflow.com/q/26399979
tags question: http://stackoverflow.com/q/26358411
tags question: http://stackoverflow.com/q/26412434
tags question: http://stackoverflow.com/q/26422243
tags question: http://stackoverflow.com/q/26498459
tags question: http://stackoverflow.com/q/26380868
tags question: http://stackoverflow.com/q/26375996
tags question: http://stackoverflow.com/q/26507447
tags question: http://stackoverflow.com/q/26403511
tags question: http://stackoverflow.com/q/26504850
tags question: http://stackoverflow.com/q/26496083
tags question: http://stackoverflow.com/q/26450444
tags question: http://stackoverflow.com/q/26460520
tags question: http://stackoverflow.com/q/26367490
tags question: http://stackoverflow.com/q/26500133
tags question: http://stackoverflow.com/q/26371059
tags question: http://stackoverflow.com/q/26399239
tags question: http://stackoverflow.com/q/26425109
tags question: http://stackoverflow.com/q/26494284
tags question: http://stackoverflow.com/q/26421709
tags question: http://stackoverflow.com/q/26506965
tags question: http://stackoverflow.com/q/26469495
tags question: http://stackoverflow.com/q/26411940
tags question: http://stackoverflow.com/q/26396663
tags question: http://stackoverflow.com/q/26380654
tags question: http://stackoverflow.com/q/26435725
tags question: http://stackoverflow.com/q/26360046
tags question: http://stackoverflow.com/q/26417764
tags question: http://stackoverflow.com/q/26429414
tags question: http://stackoverflow.com/q/26510935
tags question: http://stackoverflow.com/q/26357322
tags question: http://stackoverflow.com/q/26433634
tags question: http://stackoverflow.com/q/26489814
tags question: http://stackoverflow.com/q/26446124
tags question: http://stackoverflow.com/q/26479420
tags question: http://stackoverflow.com/q/26455488
tags question: http://stackoverflow.com/q/26485432
tags question: http://stackoverflow.com/q/26363811
tags question: http://stackoverflow.com/q/26498944
tags question: http://stackoverflow.com/q/26458712
tags question: http://stackoverflow.com/q/26389562
tags question: http://stackoverflow.com/q/26373427
tags question: http://stackoverflow.com/q/26383535
tags question: http://stackoverflow.com/q/26484992
tags question: http://stackoverflow.com/q/26409928
tags question: http://stackoverflow.com/q/26512449
tags question: http://stackoverflow.com/q/26473084
tags question: http://stackoverflow.com/q/26502895
tags question: http://stackoverflow.com/q/26368755
tags question: http://stackoverflow.com/q/26454227
tags question: http://stackoverflow.com/q/26457989
tags question: http://stackoverflow.com/q/26363470
tags question: http://stackoverflow.com/q/26508333
tags question: http://stackoverflow.com/q/26476003
tags question: http://stackoverflow.com/q/26366733
tags question: http://stackoverflow.com/q/26431592
tags question: http://stackoverflow.com/q/26394911
tags question: http://stackoverflow.com/q/26443828
tags question: http://stackoverflow.com/q/26416766
tags question: http://stackoverflow.com/q/26420511
tags question: http://stackoverflow.com/q/26391577
tags question: http://stackoverflow.com/q/26448486
tags question: http://stackoverflow.com/q/26501785
tags question: http://stackoverflow.com/q/26369792
tags question: http://stackoverflow.com/q/26367150
tags question: http://stackoverflow.com/q/26479228
tags question: http://stackoverflow.com/q/26461768
tags question: http://stackoverflow.com/q/26385183
tags question: http://stackoverflow.com/q/26499879
tags question: http://stackoverflow.com/q/26459040
tags question: http://stackoverflow.com/q/26421028

http://stackoverflow.com/a/26407233
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/26406364
score: -1
upvote count: 0
has body: In your CSS file add the rules margin:0 and padding:0 for your p elements. That will get rid of this problem. I have created a jsFiddle demo here: http://jsfiddle.net/kb3gN/6490/
has comment: http://stackoverflow.com/comment/41465369

http://stackoverflow.com/a/26510425
has comment: http://stackoverflow.com/comment/41737207
has comment: http://stackoverflow.com/comment/41655615
answers question: http://stackoverflow.com/q/26500717
has comment: http://stackoverflow.com/comment/41735975
has comment: http://stackoverflow.com/comment/41737224
has comment: http://stackoverflow.com/comment/41657923
score: 1
has comment: http://stackoverflow.com/comment/41694461
upvote count: 1
has comment: http://stackoverflow.com/comment/41657974
has comment: http://stackoverflow.com/comment/41658550
has body: You can do it in both PHP and Javascript as referenced in the other answers. However, it's much more efficient to do it in Javascript, especially if your text is static to each HTML page. For instance, something similar to this should work: var pages = window.location.href; if(pages == "page1"){ //display page 1 text } else if(pages == "page2"){ //display page 2 text } etc... etc... This is a very simple way to do this with Javascript.
has comment: http://stackoverflow.com/comment/41693650
downvote count: 0
has comment: http://stackoverflow.com/comment/41693539
has comment: http://stackoverflow.com/comment/42973025
has comment: http://stackoverflow.com/comment/41749544
type: Answer

http://stackoverflow.com/comment/41633281
has text: use the debug at the breakpoint at line: var myResults = []; print the result of the stack value.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26500577
type: AnswerComment

javascript
tags question: http://stackoverflow.com/q/26378920
tags question: http://stackoverflow.com/q/26450927
tags question: http://stackoverflow.com/q/26358553
tags question: http://stackoverflow.com/q/26426733
tags question: http://stackoverflow.com/q/26391639
tags question: http://stackoverflow.com/q/26508724
tags question: http://stackoverflow.com/q/26446641
tags question: http://stackoverflow.com/q/26464860
tags question: http://stackoverflow.com/q/26377509
tags question: http://stackoverflow.com/q/26411338
tags question: http://stackoverflow.com/q/26476098
tags question: http://stackoverflow.com/q/26387767
tags question: http://stackoverflow.com/q/26417924
tags question: http://stackoverflow.com/q/26380676
tags question: http://stackoverflow.com/q/26493744
tags question: http://stackoverflow.com/q/26437977
tags question: http://stackoverflow.com/q/26466532
tags question: http://stackoverflow.com/q/26474897
tags question: http://stackoverflow.com/q/26484077
tags question: http://stackoverflow.com/q/26397390
tags question: http://stackoverflow.com/q/26495745
tags question: http://stackoverflow.com/q/26454261
tags question: http://stackoverflow.com/q/26413564
tags question: http://stackoverflow.com/q/26356730
tags question: http://stackoverflow.com/q/26385145
tags question: http://stackoverflow.com/q/26403372
tags question: http://stackoverflow.com/q/26467037
tags question: http://stackoverflow.com/q/26447879
tags question: http://stackoverflow.com/q/26423567
tags question: http://stackoverflow.com/q/26432377
tags question: http://stackoverflow.com/q/26445700
tags question: http://stackoverflow.com/q/26482432
tags question: http://stackoverflow.com/q/26499263
tags question: http://stackoverflow.com/q/26413430
tags question: http://stackoverflow.com/q/26508535
tags question: http://stackoverflow.com/q/26468268
tags question: http://stackoverflow.com/q/26408555
tags question: http://stackoverflow.com/q/26353842
tags question: http://stackoverflow.com/q/26498455
tags question: http://stackoverflow.com/q/26459525
tags question: http://stackoverflow.com/q/26430062
tags question: http://stackoverflow.com/q/26492734
tags question: http://stackoverflow.com/q/26500255
tags question: http://stackoverflow.com/q/26404783
tags question: http://stackoverflow.com/q/26444507
tags question: http://stackoverflow.com/q/26377268
tags question: http://stackoverflow.com/q/26447987
tags question: http://stackoverflow.com/q/26466570
tags question: http://stackoverflow.com/q/26395128
tags question: http://stackoverflow.com/q/26386344
tags question: http://stackoverflow.com/q/26504520
tags question: http://stackoverflow.com/q/26370891
tags question: http://stackoverflow.com/q/26411790
tags question: http://stackoverflow.com/q/26513683
tags question: http://stackoverflow.com/q/26478468
tags question: http://stackoverflow.com/q/26439580
tags question: http://stackoverflow.com/q/26478023
tags question: http://stackoverflow.com/q/26496779
tags question: http://stackoverflow.com/q/26371083
tags question: http://stackoverflow.com/q/26498634
tags question: http://stackoverflow.com/q/26507641
tags question: http://stackoverflow.com/q/26415445
tags question: http://stackoverflow.com/q/26397810
tags question: http://stackoverflow.com/q/26366119
tags question: http://stackoverflow.com/q/26369030
tags question: http://stackoverflow.com/q/26472050
tags question: http://stackoverflow.com/q/26499735
tags question: http://stackoverflow.com/q/26374979
tags question: http://stackoverflow.com/q/26376619
tags question: http://stackoverflow.com/q/26362440
tags question: http://stackoverflow.com/q/26427676
tags question: http://stackoverflow.com/q/26364931
tags question: http://stackoverflow.com/q/26373786
tags question: http://stackoverflow.com/q/26386777
tags question: http://stackoverflow.com/q/26372444
tags question: http://stackoverflow.com/q/26448087
tags question: http://stackoverflow.com/q/26476591
tags question: http://stackoverflow.com/q/26414131
tags question: http://stackoverflow.com/q/26378705
tags question: http://stackoverflow.com/q/26462061

http://stackoverflow.com/comment/41621490
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26493054
has text: Thank you for your help, but if there is more than one "form-control-static" id defined, this will fail... I put the correct answer below.
score: 0

http://stackoverflow.com/q/26475585
answer count: 1
score: 1
tagged with: asp.net
has title: How to retain focus on asp textbox or any html element) after postback
favorite count: 0
has answer: http://stackoverflow.com/a/26476135
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41589489
type: Question
accepted answer: http://stackoverflow.com/a/26476135
tagged with: c#
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41588779
has comment: http://stackoverflow.com/comment/41589343
has body: I am creating website that have around 20~ or so asp:TextBox, all of them uses postback. Issue I am having is that every time postback occurs textbox looses focus. I have managed to retain focus on element that called postback, but that's not what I want, because by that time new box is focused. I found few javascripts that supposed to retain focus after post back, but couldn't get single one of them work. Honestly I don't know much about javascript, or proper procedure how to use , but it seems there is no way to achieve what I want with just html and c#. Vacancy title * <asp:TextBox runat="server" type="text" class="form-control" ID="inputTitle" placeholder="Vacancy title" OnTextChanged="inputTitle_TextChanged" AutoPostBack="True" MaxLength="50"></asp:TextBox> Employee Position <asp:TextBox runat="server" type="text" class="form-control" ID="inputPosition" placeholder="Employee Position" OnTextChanged="inputPosition_TextChanged" AutoPostBack="True"></asp:TextBox> Job Field/Discipline <asp:TextBox runat="server" type="text" class="form-control" ID="inputDiscipline" placeholder="Job Field/Discipline" OnTextChanged="inputDiscipline_TextChanged" AutoPostBack="True"></asp:TextBox> Contract Type * <asp:TextBox runat="server" type="text" class="form-control" ID="inputContract" placeholder="Contract Type" AutoPostBack="True" OnTextChanged="inputContract_TextChanged"></asp:TextBox> Here is some of html objects I want to retain focus on, I been stuck on this for half a day and if someone could give me rough guide how to retain focus after postback I would be eternally grateful.
has comment: http://stackoverflow.com/comment/41588535
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26407273
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26479639
answer count: 2
has title: What is the best way for interacting between Components in Reactjs?
downvote count: 0
accepted answer: http://stackoverflow.com/a/26423553
has comment: http://stackoverflow.com/comment/41469607
favorite count: 0
upvote count: 2
score: 2
type: AnsweredQuestion
has body: I'm trying to intercept user activity from a child component and then update the state of one of its siblings. E.g. -RootApp --Child1 (has user interaction e.g. onClick) --Child2 (needs data from Child1 to update state) My solution (which I find rather weird) is I have a callback passed to Child1 from RootApp. When the user does onClick on Child1 the callback is called. The callback in RootApp then updates the props defined for Child2. Child2 is re-rendered. Am I doing this right?
has answer: http://stackoverflow.com/a/26423553
type: Question
has comment: http://stackoverflow.com/comment/41487794
tagged with: reactjs
has answer: http://stackoverflow.com/a/26479639

http://stackoverflow.com/comment/41662180
type: Comment
has text: TypeError: invalid 'in' operand a. this is the error i am getting. I have given [2121] to test.Still getting the typeError
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26510511

http://stackoverflow.com/a/26507002
downvote count: 0
has body: Algorithm for string permutation will be a little bit more complicated with recursive step (it's possible to code it without recursion though). The next javascript implementation is based on the description of the algorithm from this answer: Remove the first letter Find all the permutations of the remaining letters (recursive step) Reinsert the letter that was removed in every possible location. Implementation then something like this: function permutation(str) { if (str.length == 1) { return [str]; } var first = str[0], // Step #1 perms = permutation(str.slice(1)), // Step #2 result = []; // Step #3 for (var i = 0; i &lt; perms.length; i++) { for (var j = 0; j &lt;= perms[i].length; j++) { result.push( perms[i].slice(0, j) + first + perms[i].slice(j) ); } } return result; } console.log(permutation('ahimrsu')); Above implementation gives 5040 combinations, which seems to be correct, since 7! == 5040 (number of permutations is a factorial of the number of chars). Now when you have all possible permutations array you can easily find specific string occurrence: var combinations = permutation('ahimrsu'); var index = combinations.indexOf('mariush'); // Index of the "mariush" alert('"mariush" is the ' + (index + 1) + 'th permutation of "ahimrsu".');
has comment: http://stackoverflow.com/comment/41652244
has comment: http://stackoverflow.com/comment/41645383
has comment: http://stackoverflow.com/comment/41648249
upvote count: 3
has comment: http://stackoverflow.com/comment/41650323
type: Answer
answers question: http://stackoverflow.com/q/26506429
score: 3
has comment: http://stackoverflow.com/comment/41646732

http://stackoverflow.com/q/26419143
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26419273
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: carousel
tagged with: templates
type: AnsweredQuestion
has title: JQuery carousel and template doesn't work together
accepted answer: http://stackoverflow.com/a/26419273
has body: First of all, I'm sorry if this is already asked. I couldn't find a answer. I have a HTML5 template bought at themeforest and a jQuery carousel. I am not very similar with JavaScript or JQuery. When I wanted to implement the carousel like it said in the description the JQuery/Javascript didn't work. I found out that it could be the version of JQuery. The template(cleanstart) uses version 1.11.2 and the carousel uses 1.44.4. When I changed the carousel to that version it didn't work. When I changed the template version to 1.44.4, it didn't work either. Then I've put the text from the carousel.js in a script tag in the HTML, and that seemed to work but then the templates jQuery didn't work... Do you have any idea what the problem can be? Maybe a variable with the same name? I really don't know how to solve it. Help is much appreciated!
type: Question
possible better answer: http://stackoverflow.com/a/26420311
has answer: http://stackoverflow.com/a/26420311
has comment: http://stackoverflow.com/comment/41485034

http://stackoverflow.com/a/26477883
has body: I'm guessing that you want something like this: Example View: Controller: var myApp = angular.module('myApp',[]) .factory('yourAPI', ['$http', function ($http) { var submitResults = function (parameters) { return $http.get("http://wwww.whateverURL.com?" + parameters.map(function(parameter){return parameter.key + "=" + encodeURI(parameter.val) }).join('&')); }; return { submitResults: submitResults } }]) .directive('options', function(){ return{ restrict:"E", replace:true, template: " "+ " "+ " " + " " + " " + " " + " ", scope: { parameters:'='}, controller: function($scope, yourAPI){ $scope.newKey=""; $scope.newVal=""; $scope.addItem = function(){ $scope.parameters.push({key:$scope.newKey, val:$scope.newVal}); $scope.newKey=""; $scope.newVal=""; }; $scope.sendRequest = function(){ yourAPI.submitResults($scope.parameters).success(function(data, status, headers) { console.log(data); }); } } } }) .directive('option', function(){ return { restrict:'E', require: '^options', replace: true, scope: { parameter:'='}, template: " "+ " " + " " } }) .controller('mainController', function($scope){ $scope.parameters=[]; }); Notice that jsFiddle will block the get request, but this should work in your app.
type: Answer
has comment: http://stackoverflow.com/comment/41592938
has comment: http://stackoverflow.com/comment/41592903
answers question: http://stackoverflow.com/q/26477594
score: 0
has comment: http://stackoverflow.com/comment/41593110

http://stackoverflow.com/a/26392170
has comment: http://stackoverflow.com/comment/41579937
type: Answer
has comment: http://stackoverflow.com/comment/63951636
has body: General UI comments Using right-click to directly activate your function is contrary to the general UI that is used system wide. Right-click is, system-wide (on some systems), used to open the context menu. In Firefox in the toolbar this is used to bring up the context menu for the toolbar area. This is what your users are generally going to expect to happen when they use right-click. You are probably better off either using something like shift-left-click, or letting the user define what combination is to be used to activate your function. If it is that you are attempting to add an option to the context menu, then that would normally be accessed via right-click. Alternatives used in other add-ons: A second section to your button with a down arrow. Clicking on the down arrow opens an expanded action or options menu. Use the tooltip to display an action or options menu when the mouse is hovered over your button. This is done by creating a custom tooltip by enclosing the popup within a &lt;tooltip id="myTooltip"&gt;&lt;/tooltip&gt; element and referencing it in the button with &lt;button tooltip="myTooltip"/&gt; (tooltip property, tooltip attribute). Using right-click The problem appears to be that the Add-on SDK ActionButton has abstracted away your ability to have listeners for arbitrary events. It also does not give you access to the actual event object which is normally passed to event handlers (listeners). Further, its click event appears to actually be a command event, not a click event. One of the significant differences between a click and a command event is that the command event does not normally fire on a right-click. You are going to need to gain access to the button outside of the ActionButton interface and add a listener for click events and then in your click event handler, you can make a choice to perform your action based on the state of event.button and event.shiftKey. Adapting some code based on what I posted as an answer for a different question, y…
has comment: http://stackoverflow.com/comment/41481643
downvote count: 0
has comment: http://stackoverflow.com/comment/41465525
score: 3
answers question: http://stackoverflow.com/q/26389963
has comment: http://stackoverflow.com/comment/63952107
has comment: http://stackoverflow.com/comment/63951451
has comment: http://stackoverflow.com/comment/41585035
upvote count: 3

http://stackoverflow.com/a/26361066
has comment: http://stackoverflow.com/comment/41380096
answers question: http://stackoverflow.com/q/26360929
downvote count: 0
has comment: http://stackoverflow.com/comment/41381752
score: 2
has body: Use json decoding at jquery end EDIT Small way $.each($.parseJSON(response), function( index, value ) { //Loop using key value LIKE: index =&gt; value }); //Old success: function(response){ var jsonDecoded = $.parseJSON(response); console.log(jsonDecoded ); $.each(jsonDecoded, function( index, value ) { //Loop using key value LIKE: index =&gt; value }); $("#divsmtp").html(response); }
has comment: http://stackoverflow.com/comment/41380066
upvote count: 2
has comment: http://stackoverflow.com/comment/41380376
has comment: http://stackoverflow.com/comment/41380428
has comment: http://stackoverflow.com/comment/41381835
has comment: http://stackoverflow.com/comment/41381619
type: Answer

http://stackoverflow.com/q/26373737
downvote count: 0
favorite count: 0
has title: Sending mail from HTML page with image in the body
has comment: http://stackoverflow.com/comment/41405575
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41404487
has answer: http://stackoverflow.com/a/26374026
type: Question
has body: I have to bring up the outlook compose box when a button is pressed and the body should contain the image of a specific DIV. I am using html2canvas to capture the image, with mailto i am able to fire a outlook compose mail instance but seems mailto is for simple plain text and is not supporting to embed image in the mailbox. Any ideas, thoughts?
linked to: http://stackoverflow.com/q/5620324
tagged with: javascript
score: 15
upvote count: 15
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: email

http://stackoverflow.com/comment/41438495
type: Comment
comment on: http://stackoverflow.com/q/26392669
type: QuestionComment
has text: believe me, you don't want do it by hand ;) http://stackoverflow.com/questions/3552461/how-to-format-javascript-date
score: 0

http://stackoverflow.com/a/26497444
has body: You can display default text in input fields to guide the user, what the purpose of that input field is. But you don't want to submit your default text for processing. So you look, if the current field value is the same as your defult text. If that is the case, you clear the input field, so your data processing knows that there was no entry.
answers question: http://stackoverflow.com/q/26497346
type: Answer
score: 0

http://stackoverflow.com/comment/41575129
comment on: http://stackoverflow.com/q/26433188
has text: @KevinB Yes, that's exactly what happens, `location.href` is cancelled, and the form is submitted instead. Considering `location.href` should load a new page where ever it is met, this feels weird action.
score: 0
type: Comment
type: QuestionComment

socket.io
tags question: http://stackoverflow.com/q/26510505
tags question: http://stackoverflow.com/q/26369465
tags question: http://stackoverflow.com/q/26448921
tags question: http://stackoverflow.com/q/26392596
tags question: http://stackoverflow.com/q/26416148
type: Tag
tags question: http://stackoverflow.com/q/26375884
tags question: http://stackoverflow.com/q/26407685
tag name: socket.io
tags question: http://stackoverflow.com/q/26429323
tags question: http://stackoverflow.com/q/26412636
tags question: http://stackoverflow.com/q/26480991
tags question: http://stackoverflow.com/q/26429731
tags question: http://stackoverflow.com/q/26382413

http://stackoverflow.com/q/26355291
has answer: http://stackoverflow.com/a/26355403
score: 1
has comment: http://stackoverflow.com/comment/41369913
tagged with: timeout
has title: jQuery animate to bottom after timeout function
has comment: http://stackoverflow.com/comment/41370036
type: Question
possible better answer: http://stackoverflow.com/a/26355403
has comment: http://stackoverflow.com/comment/41369692
has body: The situation is as follows: When the user clicks on a specific link (within div.Foo), a page is loaded. What I want is the "scroll to bottom" is carried out only after the user has clicked and the new page is loaded (and not at the same time). So far I have the following piece of code: $(document).ready(function () { $('.Foo a').click(function () { setTimeout(function () { $('html, body').animate({ scrollTop: $(document).height() }, 'slow'); }, 100); }); }); But it's not working correctly. Note!: I can not use preventDefault because the new page should be loaded! And also use of #hash is not possible because the URLs are dynamically generated.
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26355740
accepted answer: http://stackoverflow.com/a/26355740
has comment: http://stackoverflow.com/comment/41369803
tagged with: javascript
tagged with: jquery
favorite count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/41369647
type: AnsweredQuestion

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

http://stackoverflow.com/a/26498901
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41647949
has comment: http://stackoverflow.com/comment/41648591
has comment: http://stackoverflow.com/comment/41647659
type: Answer
has comment: http://stackoverflow.com/comment/41649398
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26496083
has comment: http://stackoverflow.com/comment/41648680
answers question: http://stackoverflow.com/q/26496083
has body: The window.open() function can take another parameter, a window name. First, specify a name for your current window, like window.name="persists"; and then, for the popup you could specify something like Popup=window.open(URL, "popped"); This will ensure that the just-opened URL doesn't replace the code you are running, and the Popup variable gives you access to anything you want in that popped window --use Popup.document to access the document object, for example. I'm going to add this from a comment I made below. Think of your code as being divided into two different functions. One holds the window.open() instruction, and the other --let's call it "manipulator()"-- holds the code to access the document object and do things with that data. In many cases a browser doesn't immediately do something that JavaScript tells it to do; it waits for the currently-running JavaScript function to end, before doing it. That means you need a way of connecting the first function to the second, and the simplest way to do that is through setTimeout(). For example right after calling window.open() you could specify setTimeout("manipulator();", 250);, and then do a return from that first function. The manipulator() function would be called 1/4 second afterward, but before it runs, the browser will have performed the window.open() operation. So, when the manipulator() function runs, inside it you will be able to access the document object of the just-opened window, and do things with that data. (Do note that this sort of thing, dividing work between different functions, is a major reason why global variables are extremely useful in JavaScript --"Popup" should be a global here.)

http://stackoverflow.com/comment/41572943
comment on: http://stackoverflow.com/a/26466338
type: AnswerComment
has text: This was enough to get it to work, thanks! (I played around with it a bit, and it worked even without " " around log("testing"), the only problem was document.getElementById(id);
type: Comment
score: 0

http://stackoverflow.com/q/26456991
has title: inserted in contenteditable span fails to move cursor
has body: I want all text and breaks to be in spans, which the following code does. Works perfectly in IE11 and chrome but has a serious issue in FF. To wit, if the first key entered is &lt; enter >, the cursor fails to move to after the inserted &lt; br >. The caret position seems to move as the next key entered is on the next line but the flashing cursor doesn't. Furthermore, if backspaced to remove the character, the cursor goes back up to the first line. Easiest way to demonstrate :http://jsfiddle.net/jd2d7n3L/20/ Make the first character entered &lt; enter > Expected result (which is what happens in chrome and IE10+) is for the flashing cursor to move down one line. Enter 'a' and then backspace. Expected result is flashing cursor is leftmost on 2nd line I have read many similar questions and answers relating to this on SO but none specifically deal with this situation. How can I make FF behave? HTML &lt;div id=bE contenteditable="true"&gt;&lt;br&gt;&lt;/div&gt; JS bE.addEventListener("keypress",KP); bE.addEventListener("keypress",KU); function getContainer() { var eC=window.getSelection().getRangeAt(0).endContainer; while(eC&amp;&amp;eC.nodeType==3)eC=eC.parentNode; return eC } function insertElement(E) { var sel=window.getSelection(),range=sel.getRangeAt(0); range.deleteContents(); range.collapse(true); range.insertNode(E); range.setStartAfter(E); range.collapse(true); sel.removeAllRanges(); sel.addRange(range); } function KP(e) { var kc=e.which||e.keyCode; if(e.charCode||e.which===13) { var sel=window.getSelection(),range=sel.getRangeAt(0); var eC=getContainer(); if(eC===bE) { eC=document.createElement("span"); range.insertNode(eC); range.selectNodeContents(eC); sel.removeAllRanges(); sel.addRange(range); } if(kc===13)insertElement(document.createElement("br")); else insertElement(document.createTextNode(String.fromCharCode(kc))); e.preventDefault(); } } function KU(e) //ensures last element is br { if(!bE.lastChild||bE.lastChild.nodeName.toLowerCase()!=="br")bE.append…
type: Question
has comment: http://stackoverflow.com/comment/41565437
tagged with: firefox
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/26549017
accepted answer: http://stackoverflow.com/a/26549017
has comment: http://stackoverflow.com/comment/41563006
answer count: 1
favorite count: 0
score: 6
has comment: http://stackoverflow.com/comment/41554468
has comment: http://stackoverflow.com/comment/41554790
type: AnsweredQuestion
downvote count: 0
tagged with: contenteditable

http://stackoverflow.com/comment/41644465
type: Comment
comment on: http://stackoverflow.com/q/26506805
score: 3
has text: Also, `new RegExp` is superfluous here, just `pattern = /..../m`
type: QuestionComment

http://stackoverflow.com/comment/41641479
type: QuestionComment
has text: Unless you want to show some message like *You are using Opera*, there is no reason to just target Opera, there may be some difference between Opera and other webkit-based browsers (such as Chrome), but that difference is very little
score: 2
comment on: http://stackoverflow.com/q/26505250
type: Comment

http://stackoverflow.com/q/26367490
has comment: http://stackoverflow.com/comment/41392554
tagged with: javascript
has title: Current option "selected" based on URL Parameter
tagged with: jquery
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26367645
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26367656
has answer: http://stackoverflow.com/a/26367705
accepted answer: http://stackoverflow.com/a/26367705
possible better answer: http://stackoverflow.com/a/26367645
type: Question
has body: I've tried looking for a solution around here, but nothing is working, so I'm posting one here. Sorry if it exists already. I have an option list with values being added using PHP (Twig) like so: Leaders {% for leader in leader_list %} {{ leader.mold_maker }} {% endfor %} Which pulls each leader name (first and last) from database and displays them as a select box. I'm trying to make it so that when one is selected it shows up on the next page with that name already selected. If a leader is selected the URL looks like this: http://example.com/page?leader=First%20Last And I'm pulling the name from URL like so: var leader_param = GetURLParameter('leader'); with some other code at before that to separate the link, when I alert() leader_param i get "First%20Last". So I know that part works 100%. Now, when trying to get the currently selected leader I figure the best way would be compare the URL name to the value in the option list. From what I've read, the closest thing I have is this: if (typeof leader_param != 'undefined') { $("select[name='leader_select']").val(leader_param); } But all that does is make the first option the selected one. I'm pretty stuck here and would really appreciate any help. Thank you very much in advance!

http://stackoverflow.com/comment/41492994
comment on: http://stackoverflow.com/q/26423373
score: 0
has text: I am a bit confused still, essentialy you want any prefix mixed with any SI unit to have a ⋅ appear after it? Essentialy the factor you look out for if there is already a dot after it if not create the dot no matter what situation (like mΩ is in a sentence "thismΩhouse" should become "thismΩ⋅house")
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42029300
has text: [code at github ]https://github.com/anantkpal/anawesomejqcarousel/blob/master/src/anAwesomejQCarousel.js
comment on: http://stackoverflow.com/q/26447747
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41422848
type: QuestionComment
has text: below is the exception in console Uncaught ReferenceError: Id is not defined VM27:6(anonymous function) VM27:6c underscore.min.js:5Backbone.View.extend.render ModelContact.js:37f backbone.js:208e.Events.trigger backbone.js:148i.extend.set backbone.js:368i.extend.clear backbone.js:386Backbone.View.extend.clear ModelContact.js:41x.event.dispatch jquery-1.10.2.js:5095v.handle
comment on: http://stackoverflow.com/q/26383786
score: 0
type: Comment

http://stackoverflow.com/comment/41537802
type: Comment
type: QuestionComment
has text: You're doing `var session1 = new Session(client_id);` when you probably mean `var session1 = new Session(client_id1);`
score: 0
comment on: http://stackoverflow.com/q/26447862

download
tags question: http://stackoverflow.com/q/26447879
type: Tag
tags question: http://stackoverflow.com/q/26411004
tags question: http://stackoverflow.com/q/26414167
tags question: http://stackoverflow.com/q/26471518
tag name: download
tags question: http://stackoverflow.com/q/26464973
tags question: http://stackoverflow.com/q/26454916

http://stackoverflow.com/a/52427048
has body: Just try the below code, I am using Bootstrap 4 Javascript code: print(): void { let printContents, popupWin; printContents = document.getElementById('print-section').innerHTML; popupWin = window.open('', '_blank', 'top=0,left=0,height=100%,width=auto'); popupWin.document.open(); popupWin.document.write(` ${printContents} ` ); popupWin.document.close(); } HTML Code: Company Name With . Go somewhere INVOICE Ws a natural lead-in to additional content. Go somewhere Print
downvote count: 0
type: Answer
score: 7
answers question: http://stackoverflow.com/q/26354611
has comment: http://stackoverflow.com/comment/127542225
upvote count: 7

http://stackoverflow.com/a/26462217
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41563321
answers question: http://stackoverflow.com/q/26462061
type: Answer
has body: I think you should consider why the value is "false" instead of false instead. Where is that value assigned, and is there any reason why you can't assign it as a proper boolean? Otherwise you can do something like this: function isStrTrueOrFalse(string) { return !string.toLowerCase().match(/false/);} that way any string that is "false" returns false. Any other string returns true. This is because that "str" is true. No matter what the contents is. You could also use the i flag in the regex, instead of .toLowerCase(): function isStrTrueOrFalse(string) { return !string.match(/false/i);} As described in comments.
downvote count: 0

http://stackoverflow.com/q/26502515
type: Question
has body: I have searched for at least an hour and a half now and I'm not any closer to learning how to use POST methods in my ApiController. I need an effective way of using post to create a login system that will search my database based on the username/password combination and create a JSON object that I can send back to my web page. Any resources on using post? I've tried to acomplish this with get but I can use any variables more than 'ID' public IHttpActionResult GetLogin(string id) { //Query Database for Unique username. if (id == "mager1794") { //Create Login class with username, and password details. return Ok( new Models.Login() { id = 1, userName = "mager1794", passWord = "*******" }); } return Ok(-1); } This is what I have for my Get method but I'm just not having any luck creating a POST version of this.
tagged with: javascript
tagged with: asp.net
score: 0
tagged with: rest
has answer: http://stackoverflow.com/a/26502721
has title: How to use POST in ApiController
answer count: 1
type: AnsweredQuestion
tagged with: c#
accepted answer: http://stackoverflow.com/a/26502721

http://stackoverflow.com/comment/41435514
type: Comment
has text: @KenFyrstenberg Why would vnc not detect if a line is drawn?
type: AnswerComment
comment on: http://stackoverflow.com/a/26370354
score: 0

http://stackoverflow.com/comment/41448567
score: 0
type: Comment
has text: Duplicate of http://stackoverflow.com/questions/4968406/javascript-property-access-dot-notation-vs-brackets
type: QuestionComment
comment on: http://stackoverflow.com/q/26398234

http://stackoverflow.com/comment/41477298
type: AnswerComment
type: Comment
has text: ... and array is undefined.
comment on: http://stackoverflow.com/a/26414364
score: 0

http://stackoverflow.com/comment/41515573
score: 2
has text: Well if you selected, say (1,1) the top element would have the same column, but 1 less in the row. Left and right would be same row, different columns, and bottom would be same column, the row below.
comment on: http://stackoverflow.com/q/26435441
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26488423
has title: layer.find won't return a kineticjs object by id although it exists
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41613274
has comment: http://stackoverflow.com/comment/41648160
score: 1
type: Question
has answer: http://stackoverflow.com/a/26539765
answer count: 1
downvote count: 0
tagged with: javascript
has body: I have the following issue: I create two different customObjects I created, that include some kineticjs objects. On each of them I have some Kinetijs Lines. The id's of the lines are different inside the custom object but could be the between the two different mycustom objects. Meaning mycustomobj1 hass lines with id1, id2, id3, id4 mycustomobj2 has also lines with id1, id2, id3, id4 Each line is placed inside a group and and group on a layer lets say lineGroup and basicLayer and a lineGroup has many lines in it I do the following on mycustomobj1 mycustomobj1.lineGroup.getChildren() and returns me all the lines placed inside this group. And one of them is line with id1. But when I do mycstomobj1.basicLayer.find("#id1"); i get an empty array. What can be wrong? and example code. I have extracted line from my obect (the lineGroup) lines.getChildren()[11] Kinetic.Line {nodeType: "Shape", _fillFunc: function, _strokeFunc: function, _fillFuncHit: function, _strokeFuncHit: function…} _cache: Object _fillFunc: function a(a){a.fill()} _fillFuncHit: function c(a){a.fill()} _filterUpToDate: false_id: 47 _strokeFunc: function b(a){a.stroke()} _strokeFuncHit: function d(a){a.stroke()} attrs: Object id: "red0" points: Array[48] sceneFunc: function (a){var b,c,d,e=this.getPoints(),f=e.length,g=this.getTension(),h=this.getClosed();if(a.beginPath(),a.moveTo(e[0],e[1]),0!==g&amp;&amp;f&gt;4){for(b=this.getTensionPoints(),c=b.length,d=h?0:4,h||a.quadraticCurveTo(b[0],b[1],b[2],b[3]);c-2&gt;d;)a.bezierCurveTo(b[d++],b[d++],b[d++],b[d++],b[d++],b[d++]);h||a.quadraticCurveTo(b[c-2],b[c-1],e[f-2],e[f-1])}else for(d=2;f&gt;d;d+=2)a.lineTo(e[d],e[d+1]);h?(a.closePath(),a.fillStrokeShape(this)):a.strokeShape(this)}stroke: "red"strokeWidth: 2 __proto__: Object className:"Line" colorKey: "#372306" eventListeners: Object index: 11 nodeType: "Shape" parent: Kinetic.Group__proto__: Object lines.find("#red0") [] EDIT: It worked after changing the ids to be unique between them and between the obje…
tagged with: kineticjs
favorite count: 0

http://stackoverflow.com/q/26450445
has answer: http://stackoverflow.com/a/26450617
has body: I'm using AngularJS 1.3 where the syntax for ng-list has changed slightly (for instance, it no longer supports regex) I'm trying to specify a line break as the delimiter for ng-list in a textarea. However it doesn't work properly. I've tried to set ng-list to ASCII line break &amp;#10; but then there is a problem. At once when the contents are edited (i.e. add one character to the textarea contents), it starts to break on every single character. How do I properly specify a line break as the delimiter for ng-list in AngularJS 1.3? Link to plunker: http://plnkr.co/edit/F37yA0LRHQXMh4caP3A0
answer count: 1
downvote count: 0
has title: ng-list with line break as textarea delimter in AngularJS >1.3
favorite count: 0
upvote count: 8
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26450617
score: 8
tagged with: angular-nglist
type: Question
type: AnsweredQuestion
tagged with: javascript

buffer
tags question: http://stackoverflow.com/q/26498331
tag name: buffer
type: Tag

http://stackoverflow.com/comment/41376735
type: AnswerComment
has text: $(this).val()[0]) undefined says . I mentioned slice here because is usefull in many other cases and I like it very much.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26359074

http://stackoverflow.com/comment/55251731
comment on: http://stackoverflow.com/a/26430914
type: AnswerComment
has text: @sweeds ensure that you are returning exactly one node in the render function. You cannot return an array of multiple nodes. If you want to do this, you have to wrap it in another element such as the `div` in the solution I gave.
type: Comment
score: 2

http://stackoverflow.com/comment/41542529
comment on: http://stackoverflow.com/q/26449881
type: Comment
type: QuestionComment
score: 0
has text: By *"my form input field"*, did you mean the ` ` elements alone..? or do you want to insert the ` ` and ` ` as well..? Your question is not clear which is why you're getting downvoted... Please [edit] the question and rephrase it properly... Also, Your code doesn't work at all because it contains syntax errors, which is easier to spot if you format your code properly or open the browsers console...

http://stackoverflow.com/a/26391017
type: Answer
has body: Why dont you use just css? Define a style for inputs disabled in your css file, and just disable them with js like you are doing right now... For example: input[disabled] { background-color:#F00; }
answers question: http://stackoverflow.com/q/26390759
score: 0

http://stackoverflow.com/comment/41454389
type: Comment
has text: Now I am receiving this error: Cannot read property 'setValue' of undefined
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26402424

http://stackoverflow.com/q/26424042
tagged with: jquery
score: 0
has title: How to remove axis, and other information from Bar Chart?
has answer: http://stackoverflow.com/a/27043887
tagged with: bar-chart
answer count: 1
type: UnansweredQuestion
has body: I need to draw a line graph, but just a line graph with no axes, values​​, etc. Only the graph and percentage at the end. Q: how to remove all the items from the graph, indicate the axes, axes, etc. you only need to leave a line graph and interest. $('#audience').jqChart({ legend: { visible: false }, border: { visible: false }, title: { text: 'Chart Title', font: '12px sans-serif', lineWidth: 1, // strokeStyle: 'black', fillStyle: 'white' }, animation: { duration: 1 }, series: [ { pointWidth: 0.2, type: 'bar', fillStyle: '#7fbbe5', data: 'A', 33, labels: { stringFormat: ' %s %%', valueType: 'dataValue', font: '11px sans-serif', fillStyle: 'white' }, tickOptions: { showGridline: false } }, { pointWidth: 0.2, type: 'bar', fillStyle: '#92b5c7', data: 'A', 67, tickOptions: { showGridline: false }, labels: { stringFormat: ' %s %%', valueType: 'dataValue', font: '11px sans-serif', fillStyle: 'white' } } ] }); I have an image, where I show, what I have, And what I need: http://i57.tinypic.com/2h3x3yx.jpg
type: Question
tagged with: jqchart
tagged with: javascript

http://stackoverflow.com/comment/41688731
type: Comment
has text: Thank you once more! I didn't quite get what you mean with "enclosing the JSON keys within quotes" as I didn't find an unquoted JSON key in my example (which is by the way generated by django). I only saw the int values unquoted, which, however is covered by the JSON standard. Which key did you find unquoted?
type: AnswerComment
comment on: http://stackoverflow.com/a/26498746
score: 0

http://stackoverflow.com/q/26464080
has title: How to transfer text,audio & image file from one peer to another using Webrtc datachannel?
tagged with: network-programming
type: Question
tagged with: webrtc
answer count: 1
tagged with: websocket
tagged with: javascript
tagged with: p2p
score: 0
has body: I am using Chrome browser &amp; able to pass ordinary text file from one peer to another(Browser tabs) but same logic doesnt working for audio &amp; image file( reading &amp; writing at other end). Kindly help me through it using suitable example. I am beginner to Webrtc &amp; datachannels.
has answer: http://stackoverflow.com/a/26564709
type: UnansweredQuestion

http://stackoverflow.com/a/26407587
downvote count: 0
answers question: http://stackoverflow.com/q/26407429
has body: As you should have known, foo.bar are foo["bar"] are identical in JavaScript (if you did not know, learn it, now). This line info[fn(selector.val()) ? 'removeClass' : 'addClass']('has-error'); means var methodName; if (fn(selector.val())) { methodName = 'removeClass'; } else { methodName = 'addClass'; } info[methodName]('has-error') so, in yet another words, if (fn(selector.val())) { info.removeClass('has-error'); } else { info.addClass('has-error'); } So it is actually switching class has-error on/off. Just it's pretty densely written.
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/26433968
tagged with: ios
tagged with: javascript
linked to: http://stackoverflow.com/q/19097127
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41513417
tagged with: web
favorite count: 0
has comment: http://stackoverflow.com/comment/41513221
has title: Web application Javascript to process the stream of information from iOS device camera (NOT an APP!)
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am Looking to scan barcode from iOS devices (most likely using safari/ HTML5). I wanted to know if its possible to stream the content from camera till the script recognizes the barcode. I know there are scripts (i have seen JSfiddle) that helps in capturing and uploading images. But I do not want to upload images. All I want to do is use the camera in my webpage to scan the bar code. I want to know if this is even possible ? ( I searched and I found not a single website that does it, hence skeptical). Guess I made my question clear and hoping its not a duplicate (I tried searching for this question too :( ]
score: 2
has answer: http://stackoverflow.com/a/26434213
upvote count: 2
type: Question
tagged with: camera

http://stackoverflow.com/comment/41482584
has text: First problem, ID must be unique on a page.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26416994

http://stackoverflow.com/comment/41581996
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26471706
has text: What precisely should the output be? An array like `["Item * ", " and *"]`? Please make your problem statement more clear.
score: 0

http://stackoverflow.com/comment/41602349
score: 0
has text: Does empty form without any input still triggers change event, when `form.submit()`'ed? I think it's bubbling event from input field.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26483566

http://stackoverflow.com/comment/41611868
score: 0
type: Comment
has text: THAT'S IT !. Thank you so much for taking the time to do that Joao, it's really appreciated !
type: AnswerComment
comment on: http://stackoverflow.com/a/26488676

http://stackoverflow.com/a/26362418
answers question: http://stackoverflow.com/q/26362254
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26362254
type: Answer
score: 2
has body: Why do you complicate your script, make it simply like this http://jsfiddle.net/nyma1g7e/ $("#event-1").hover( function () { $("#eo1").stop().animate({ "top": 0, "height": 240 }, 700, function(){ $("#eo1").html('NEW HTML HERE'); }); }, function () { $("#eo1").stop().animate({ "height": 80, "top": 160 }, 700, function(){ $("#eo1").html('ORIGINAL HTML HERE'); }); });
upvote count: 2
has comment: http://stackoverflow.com/comment/41382601
type: AcceptedAnswer

http://stackoverflow.com/a/26412040
has comment: http://stackoverflow.com/comment/41477452
has body: The jQuery .data() method intentionally transforms the attribute contents. It thinks it's doing you a favor, but often (as in your case) it's not. You could add "#" to your color attributes. That'd cause the attempt to convert to a number to fail, and you'd end up with a string. Alternatively, you could use a single attribute for both colors, in the form of a JSON literal: Brown on Black In the JavaScript code, you'd get an object and refer to the colors: var colors = option.data("colors"); Then colors.color1 and colors.color2 will be proper strings, because your JSON notation explicitly describes them as such. edit — an insightful comment points out that the numeric conversion is only done when the result of the conversion is a number that, when stringified again, is the same as the original string. edit again — The JSON needs to be valid, so the property names need to be in double quotes. My apologies. Here is a working jsfiddle.
has comment: http://stackoverflow.com/comment/41473160
has comment: http://stackoverflow.com/comment/41475289
type: Answer
has comment: http://stackoverflow.com/comment/41476889
has comment: http://stackoverflow.com/comment/41497062
has comment: http://stackoverflow.com/comment/41473126
has comment: http://stackoverflow.com/comment/41496032
upvote count: 5
answers question: http://stackoverflow.com/q/26411867
score: 5
has comment: http://stackoverflow.com/comment/41472982
accepted answer of: http://stackoverflow.com/q/26411867
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41624944
type: AnswerComment
score: 0
has text: @defaye `document` is just an example... it is better to use the closest static parent element, in your case probably the ` ` so that the event will reach it quickly..
type: Comment
comment on: http://stackoverflow.com/a/26495805

http://stackoverflow.com/comment/41664280
score: 0
type: Comment
has text: Thanks this work great! But now I need this javascript to also update the value in PHP $_SESSION on click. How can this be done in a simple manner?
comment on: http://stackoverflow.com/a/26453859
type: AnswerComment

http://stackoverflow.com/a/26496704
upvote count: 4
has body: In Javascript, "classes" are really their own constructor/initializer functions. The Array function is an example. When you call new Array, Javascript first creates an uninitialized object, and then invokes Array() with that new object as this. If you run Array() without the new, you're skipping to that second step without creating any object to initialize. With its built-in type functions like Array, Javascript will turn around and create the object for you even when called without new; they "do the right thing" because they're written that way. Your own type functions won't be so considerate unless you go out of your way to code them so. In general, if you're looking for shorthand notation, you should just use the bracket form.
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/136914057
answers question: http://stackoverflow.com/q/26496609
score: 4
accepted answer of: http://stackoverflow.com/q/26496609

http://stackoverflow.com/comment/41523761
comment on: http://stackoverflow.com/a/26440048
score: 0
type: AnswerComment
has text: @Terry ok. Used jQuery as was in the question. Thanks btw
type: Comment

http://stackoverflow.com/a/26406103
score: 2
has comment: http://stackoverflow.com/comment/41463430
upvote count: 2
has comment: http://stackoverflow.com/comment/41462272
has comment: http://stackoverflow.com/comment/41463194
downvote count: 0
has comment: http://stackoverflow.com/comment/41462409
has body: The way you're looping over the data you've provided should work, but I see a minor mistake with the ajax call which would in fact make you think you're code isn't working. You have to return your results in the complete callback of your code since you're using ajax, and ajax is asynchronous. $.getJSON( "/cart.js", function(data) { $('body').append(template(data)); }); I'm not sure if it was on purpose or not, but you're table is not complete.
answers question: http://stackoverflow.com/q/26405657
type: Answer

http://stackoverflow.com/q/26356763
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41372810
type: AnsweredQuestion
has title: Angularjs - custom directive with the same name of standard html elements
upvote count: 1
accepted answer: http://stackoverflow.com/a/26356896
type: Question
tagged with: angularjs-directive
has body: What happens if I create a directive that has the same name of standard html attributes or elements? For example if I define: .directive('link', function(){ return { restrict: 'A', link: function(scope, elements, attributes){ // do something } }) used like this Conditional Link would it conflict with the standard element? Maybe in this case it would not because I've restricted the directive to attributes only, but my question is more general. For example what if I named my directive href? Will the directives always have the precedence over the standard html element or attributes?
tagged with: javascript
downvote count: 0
answer count: 1
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26356896
tagged with: angularjs

http://stackoverflow.com/comment/41527443
type: Comment
type: AnswerComment
has text: The breakpoint is hit in the codebehind- in `SendMessage(string message)`. But the value of `message` is `"[object Object]"`. I expected it to be something along the lines of a JSON string representation of the values I passed in the Ajax call...?
score: 0
comment on: http://stackoverflow.com/a/26441586

http://stackoverflow.com/comment/41395802
type: Comment
has text: You could just return `return [theItem]` which would return an array instead of using the member methods of the `Array` object
score: 1
comment on: http://stackoverflow.com/a/26369290
type: AnswerComment

http://stackoverflow.com/q/26454517
has answer: http://stackoverflow.com/a/26469089
type: Question
tagged with: amd
tagged with: ecmascript-6
score: 0
accepted answer: http://stackoverflow.com/a/26469089
answer count: 1
has comment: http://stackoverflow.com/comment/41554287
tagged with: javascript
has comment: http://stackoverflow.com/comment/41559449
tagged with: module
has comment: http://stackoverflow.com/comment/41559441
has body: I try to use ecmascript 6 modules system for first time. I use traceur compiler. Given two es6 files: // app.js export function row() { alert('row'); } // init.js import { row } from 'public_js/app'; row(); Traceur (I use grunt-traceur task) compiles them to: // app.js System.register("public_js/app", [], function() { "use strict"; var __moduleName = "public_js/app"; function row() { alert('row'); } return {get row() { return row; }}; }); // init.js System.register("public_js/init", [], function() { "use strict"; var __moduleName = "public_js/init"; var row = System.get("public_js/app").row; row(); return {}; }); I include compiled version of init.js to my HTML via simple script tag: &lt;script src="/path/to/compiled/init.js" type="module"&gt;&lt;/script&gt; And nothing happens. I don't see my alert. What am I doing wrong?
has title: Run function loaded from ecmascript 6 module
type: AnsweredQuestion
tagged with: traceur
has comment: http://stackoverflow.com/comment/41551536

http://stackoverflow.com/comment/41588330
type: Comment
comment on: http://stackoverflow.com/q/26471807
has text: If you check Pureiya's example, you'll see it's inline (note the closing div), so it will write to the current document. In your plnkr example, your use of setTimeout means the call is being used after the document has closed, and therefore a new one is created instead. More info here https://developer.mozilla.org/en-US/docs/Web/API/document.write
score: 0
type: QuestionComment

http://stackoverflow.com/a/26481617
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26481488
has comment: http://stackoverflow.com/comment/41599134
type: Answer
has comment: http://stackoverflow.com/comment/41602494
has comment: http://stackoverflow.com/comment/41604561
has comment: http://stackoverflow.com/comment/41631195
score: 1
has comment: http://stackoverflow.com/comment/41601302
has comment: http://stackoverflow.com/comment/41602404
has comment: http://stackoverflow.com/comment/41601476
answers question: http://stackoverflow.com/q/26481488
has comment: http://stackoverflow.com/comment/41599182
upvote count: 1
has body: You can use indexOf to check if the number is already in the array. And if it is, you can generate a new number. var userInput = document.getElementById('txtGen').value; var numbers = new Array(6); for (var i = 0; i &lt; numbers.length; i++) { var temp = 0; do { temp = Math.floor(Math.random() * userInput); } while (numbers.indexOf(temp) &gt; -1) numbers[i] = temp; } document.getElementById("numbers").innerHTML = numbers.join(); // &lt;- Write numbers to div.

gulp-watch
tags question: http://stackoverflow.com/q/26446039
type: Tag
tag name: gulp-watch

http://stackoverflow.com/comment/41649060
comment on: http://stackoverflow.com/q/26509144
type: Comment
score: 2
has text: What is the question or issue you are having with what you tried?
type: QuestionComment

http://stackoverflow.com/q/26389975
has title: Fail to invoke JavaScript Method
upvote count: 1
accepted answer: http://stackoverflow.com/a/26466208
type: Question
tagged with: c#
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26390249
answer count: 2
has body: I have a problem when I try to call method in javascript from C#. //Code C# in pageLoad string zone="something"; string script = "LoadZone(\"" + zone+ "\");"; ScriptManager.RegisterStartupScript(this, typeof(Page), "Load", script, true); //Code javaScript function LoadZone(res) { CargarMapa(); AgregarMarkerLoad(res); } This code works for me I put a breakpoint in the first line of the method "LoadZone" and go fine. But when I try to change the code to call another method in the same .js just does not work. //Code C# in pageLoad string zone ="something"; string script = "watchZone2(\"" + zone+ "\");"; ScriptManager.RegisterStartupScript(this, typeof(Page), "Load", script, true); //Code javaScript function watchZone2() { var aaa=""; } The method "watchZone2" is below the "LoadZone" in .js I do not know why this code not work (the last one). any idea?? Edit 1: I tried what you said @ematica: ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scr", "Javascript:LoadZone(" + zone + ");", true); but directly gives me another error : "Runtime Error in Microsoft JScript: 'loadzone' is undefined" I am researching this error.if you have any idea arises just let me know ! Thanks!
has answer: http://stackoverflow.com/a/26390249
downvote count: 0
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/26466208
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/26417802
type: Answer
has body: The main problem is that the end user should install some software that will work with the hardware device. Because your web application can be used on many different platforms then you should find/develop software for each platform and suggest users to install and configure this software. Yes, if you'll limit your users by the Windows platform then you may use any keyboard wedge or data logging software. One more: http://www.aggsoft.com/serial-data-logger/
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26415614
downvote count: 0

http://stackoverflow.com/comment/41397761
type: Comment
has text: Bergi: could you give a link to the dup? Thanks.
score: 0
comment on: http://stackoverflow.com/q/26369074
type: QuestionComment

http://stackoverflow.com/comment/41520310
score: 0
type: Comment
type: QuestionComment
has text: could you make the JSFiddle for better understanding?
comment on: http://stackoverflow.com/q/26438012

http://stackoverflow.com/q/26379660
downvote count: 0
tagged with: javascript
answer count: 1
has comment: http://stackoverflow.com/comment/46351166
has comment: http://stackoverflow.com/comment/41414799
favorite count: 0
tagged with: tampermonkey
upvote count: 2
type: UnansweredQuestion
has title: document.getElementById('idname').value just returns [object HTMLInputElement] when printed
score: 2
tagged with: web-scraping
has body: So I'm using a Tamper-monkey script that will scrape a singular page for text, return the value of 3 buttons on the page (pick_0, pick _1, and pick_2) and print them in a box lower on the page. It's more complicated than that but honestly I'm just trying to get it to read the stupid values first. So yeah what's killing me is that it hasn't been grabbing the values correctly, and I don't know if it's the way it's getting the element, or the way it's getting the page. Also EVERY single time I find an answer on any site, they specify that ".value" should be added to fix it, which it is. So I'm at a dead end, thus this question being posted. A friend gave me the page scraping code, which is what I'm worrying might not be working. However I've tried a few others on Stack Overflow, to no avail. Note: The TamperMonkey script is set to only run on the specific page I need to scrape anyways, thus him not really specifying it in the code. function getLink(url) { return $.ajax( { type: 'GET', async: true, url: url, }); } My variables: function inputs() { var pick_0b = document.getElementById('pick_0').value; var pick_1b = document.getElementById('pick_1').value; var pick_2b = document.getElementById('pick_2').value; } The printing part of it is working fine, it worked printing a dummy variable with similar syntax. But yeah, every time I try to print out one of these guys, I just either get one of these two. undefined [object HTMLInputElement] Help? Edit: HTML for the buttons themselves is thus:
has answer: http://stackoverflow.com/a/26405922
has comment: http://stackoverflow.com/comment/41414662
type: Question
has comment: http://stackoverflow.com/comment/41414340
has comment: http://stackoverflow.com/comment/41415275
has comment: http://stackoverflow.com/comment/41414439

http://stackoverflow.com/q/26410258
has title: JavaScript Object Syntax error
answer count: 2
has comment: http://stackoverflow.com/comment/41468918
upvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26410325
has body: I am trying to assemble an object with some form data, but I'm pretty sure I'm messing up the syntax - here's a snippet $Device1.u_data.create.nodes.[$('#device-1-ip-1').val()] = {"enabled": true}; $Device1.u_data.create.nodes.[$('#device-1-ip-2').val()] = {"enabled": true}; $Device1.u_data.create.nodes.[$('#device-1-ip-3').val()] = {"enabled": true}; $Device1.u_data.create.nodes.[$('#device-1-ip-4').val()] = {"enabled": true}; I think I must be messing something up with the piece that I'm trying to pull from the form. The error I'm seeing in the console is "SyntaxError: missing name after . operator" Anything obvious that I'm missing? Any help is much appreciated.
has comment: http://stackoverflow.com/comment/41468732
type: AnsweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26410325
possible better answer: http://stackoverflow.com/a/26410338
tagged with: javascript
has answer: http://stackoverflow.com/a/26410338
score: -1

http://stackoverflow.com/a/26397872
answers question: http://stackoverflow.com/q/26397776
score: 0
type: Answer
has body: $('.wrap').filter(function( index ) { return $(this).not(':has(img,video)').length; }).css( "background-color", "red" );

http://stackoverflow.com/q/26371076
score: 5
tagged with: javascript
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Chrome Extension: Programmatically setting browser action icon causes the icon to pixelate
favorite count: 0
upvote count: 5
has body: I tried to change the browser action icon in background.js using the following code chrome.browserAction.setIcon({path: "img/logo-off.png", tabId:tab.id}); However, this is causing the icon to be pixelated really bad (flappy bird style). Has anyone had the same problem? How should I solve it.
tagged with: css
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26371785
accepted answer: http://stackoverflow.com/a/26371785
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/26421433
upvote count: 1
has comment: http://stackoverflow.com/comment/41489262
has answer: http://stackoverflow.com/a/26423064
has comment: http://stackoverflow.com/comment/41489139
tagged with: javascript
has comment: http://stackoverflow.com/comment/41489130
has body: I want to compare three variables to be all equal. Of course this is not working: (a === b === c) // beware: true on (true === false === false) So I used (a === b &amp;&amp; b === c) But I am wondering if there is a shorter form (like the first one - but working) in which every variable is only evaluated once. EDIT: My use case is the following expression: (typeof a === typeof b &amp;&amp; typeof b === typeof c) I wanted to avoid to evaluate typeof b twice put typeof b into a variable
favorite count: 0
has comment: http://stackoverflow.com/comment/41489334
has comment: http://stackoverflow.com/comment/41489215
has comment: http://stackoverflow.com/comment/41488714
has comment: http://stackoverflow.com/comment/41489136
has comment: http://stackoverflow.com/comment/41488996
downvote count: 0
possible better answer: http://stackoverflow.com/a/26423064
type: Question
has comment: http://stackoverflow.com/comment/41488647
type: AnsweredQuestion
has title: Shorter form of (a == b && b == c)
has comment: http://stackoverflow.com/comment/41489460
score: 1
has comment: http://stackoverflow.com/comment/41488631
has answer: http://stackoverflow.com/a/26421488
accepted answer: http://stackoverflow.com/a/26421488
has comment: http://stackoverflow.com/comment/41488992
has comment: http://stackoverflow.com/comment/41488633
answer count: 2

http://stackoverflow.com/q/26399711
tagged with: node.js
type: AnsweredQuestion
has body: I curious if MongoDB has the option to save a object with another object (in the same schema) as its 'prototype'. For example: Say we have an object in the db like so { name : 'foo', lastName : 'bar', email : 'foo_bar@baz.com' } What i would like to do is get this object and update the email (for example) so the new object would become this: { name: 'foo', lastName : 'bar', email : 'some_other_email@baz.com' } As you can see there's a duplicated data here (namely the name and lastName properties). What i would like to do is save only the diffs so then the object would be on the email prop and a reft the original object like so { email : 'some_other_email@baz.com', __proto__ : originalObjectId //or whatever } I know I can just update the object directly or save a new copy of the object but i would like to have immutability and not save the whole object every time, i would like to only save the diff from the original. Is such a thing possible out of the box (by this i mean does mongo support and optimize such a this)? (or via some lib like mongoose or something) Or would i have to implement it myself? Cheers, Boogie
downvote count: 0
possible better answer: http://stackoverflow.com/a/26404269
score: 1
has answer: http://stackoverflow.com/a/26404269
type: Question
tagged with: mongodb
tagged with: javascript
has comment: http://stackoverflow.com/comment/41450543
has comment: http://stackoverflow.com/comment/41457421
answer count: 2
upvote count: 1
favorite count: 0
tagged with: mongodb-query
has title: MongoDB prototypal inheritance between persisted objects
has answer: http://stackoverflow.com/a/26399889
accepted answer: http://stackoverflow.com/a/26399889

http://stackoverflow.com/q/26452053
has title: Javascript slideshow using timers
tagged with: src
type: AnsweredQuestion
tagged with: slideshow
tagged with: javascript
has answer: http://stackoverflow.com/a/26452081
type: Question
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26452081
tagged with: timer
score: 0
has body: I'm apparently a bit of a dunce. I've been trying to get this to work as an onload slideshow that will randomly cycle through some images. I've looked through four different questions on here pertaining to how to change the src attribute using javascript and I think that I've avoided all of the problems that have been mentioned on those. The HTML calls the slideShow() function, but for the life of me I can't actually get the src to change and display on the page. Can someone please help me figure out what I've done wrong? &lt;script&gt;&lt;!-- function slideShow() { window.setInterval("changeImage()", 5000); } function changeImage() { var imgSrcs["images//traps//1.jpg", "images//traps//2.jpg", "images//traps//3.jpg", "images//traps//4.jpg"] var i = Math.floor((Math.random() * 3)); var element = document.getElementById("slideShow").src; element.innerHTML.src= imgSrcs[i]; } --&gt;&lt;/script&gt; The HTML element that goes with this is: &lt;p&gt;&lt;img src = "images//traps//1.jpg" alt = "Traps available for use" id = "slideShow"&gt;&lt;/p&gt;

http://stackoverflow.com/comment/41390548
type: Comment
has text: If you set it to `0` does it still select `1` on page load or does it stay as the default though?
type: AnswerComment
comment on: http://stackoverflow.com/a/26366283
score: 0

http://stackoverflow.com/a/26394256
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41440845
has body: It is not secure. The purpose of the password field is just to make it harder for someone to look over your shoulder and see the password in clear text. Everything in the DOM is in clear text and not secure though.
has comment: http://stackoverflow.com/comment/41441060
upvote count: 5
answers question: http://stackoverflow.com/q/26394224
has comment: http://stackoverflow.com/comment/41441183
score: 5
has comment: http://stackoverflow.com/comment/41440982

http://stackoverflow.com/comment/41516861
score: 0
type: Comment
type: QuestionComment
has text: It's not clear at all from your example what your inputs are and what the desired outputs are. Please clarify.
comment on: http://stackoverflow.com/q/26419822

http://stackoverflow.com/comment/41525560
type: Comment
has text: @JaredSmith its not json, but just an object.
type: AnswerComment
comment on: http://stackoverflow.com/a/26441061
score: 0

http://stackoverflow.com/comment/41545433
type: AnswerComment
comment on: http://stackoverflow.com/a/26447954
type: Comment
has text: I can't think of any that @Louis haven't listed already. May be he should copy and paste mine on top of his, so the whole is self-contained and acceptable?
score: 0

http://stackoverflow.com/a/26496342
answers question: http://stackoverflow.com/q/26496289
has comment: http://stackoverflow.com/comment/41626223
has comment: http://stackoverflow.com/comment/41625923
score: 0
has comment: http://stackoverflow.com/comment/41626217
has comment: http://stackoverflow.com/comment/41626248
has comment: http://stackoverflow.com/comment/41626075
type: Answer
upvote count: 1
downvote count: 1
has body: You have a few problems. Here is how it should look function MULTIPLY(price, shipping) { //Return the sum return price*shipping; } //Call MULTIPLY to multiply the two numbers var product=MULTIPLY(number1, number2);
has comment: http://stackoverflow.com/comment/41626044
has comment: http://stackoverflow.com/comment/41625879

http://stackoverflow.com/comment/41422573
has text: Seeing the image you posted, you will get multiple images from the database and when the user clicks on a particular image you want to get it's id??
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26384096
type: QuestionComment

http://stackoverflow.com/a/26407557
has body: This line: info[fn(selector.val()) ? 'removeClass' : 'addClass']('has-error'); is equivalent to this: var result = fn(selector.val()); if (result) info.removeClass("has-error"); else info.addClass("has-error"); How is that? Well, your code calls the function plucked from the list of validation routines stored in that data structure, passing the value of the field to be tested. The result of that function call is used as a true/false test in the ? : expression. If the result is true, the ? : resolves to the string "removeClass"; if false, to "addClass". Now, what is info? It's a jQuery object that refers to the closest piece of the DOM that (presumably) is where an error message would be displayed, or where some other indicator would be shown based on some CSS rule. The [ ] operator will take whichever of those two strings the ? : resolves to and use that as a property accessor. The net effect, therefore, is to reference either info.removeClass or info.addClass. Those are both references to jQuery methods, so one or the other will be called. In either case, the code wants to operate on the class name "has-error", because it wants to either add it (when the validation fails) or remove it (when the validation succeeds). That said, the code has a serious defect: if, for a given field, there is in fact a list of validation functions, the code will run all of them (which is fine). However, for each validation function, it sets or clears that "has-error" class without regard to prior validation results. That might work, if you're really careful with the ordering of the validation functions, but that's an awfully fragile way of doing things. I think it would be much more robust if it made each test and kept track of whether any test failed, and then after that process is complete for a given field it'd only then set or clear the "has-error" class. Fixing the code isn't too hard. Currently it iterates the the validation functions outside the iteration over the selected field…
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26407429
has comment: http://stackoverflow.com/comment/41464050
has comment: http://stackoverflow.com/comment/41464149
has comment: http://stackoverflow.com/comment/41463871
has comment: http://stackoverflow.com/comment/41463787
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41463965
has comment: http://stackoverflow.com/comment/41464228
answers question: http://stackoverflow.com/q/26407429
type: Answer

http://stackoverflow.com/a/26484923
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26484654
has body: Code below: var array = [ ["2014-08-13", 3], ["2014-08-14", 4], ["2014-08-13", 3], ["2014-08-12", 2], ["2014-08-13", 3], ["2014-08-12", 2] ]; function average(array) { var ret = {}, retArr = [], tmp, time, value; for(var i=0, len=array.length; i &lt; len; i++) { tmp = array[i]; time = tmp[0]; value = tmp[1]; if(time in ret) { ret[time].push(value) } else { ret[time] = [value]; } } for(var p in ret) { var total = 0; ret[p].forEach(function(val) { total += val; }); retArr.push([p, total / ret[p].length]); } return retArr; } average(array);
score: 1
upvote count: 1

http://stackoverflow.com/comment/41469533
comment on: http://stackoverflow.com/q/26410678
has text: In Javascript case matters, its: `getElementById` notice the lower case **d** on the end, you should be getting **undefined is not a function** in the javascript console (or similar error depending on browser)
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41509313
score: 0
comment on: http://stackoverflow.com/q/26432246
type: Comment
type: QuestionComment
has text: thanks for the help this is confusing

http://stackoverflow.com/comment/41550233
comment on: http://stackoverflow.com/q/26454635
has text: Your button is overwriting `form.submit` because it's named `submit`, change the name of the button, and it will work.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26475466
tagged with: jquery
tagged with: php
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41588714
has title: I am using window.history.replaceState to hide GET method's elements, but when I reload the page those elements are lost
has comment: http://stackoverflow.com/comment/41589870
tagged with: javascript
score: 0
has body: I am using window.history.replaceState to hide GET method's elements, but when I reload the page those elements are lost. So, when I reload the page I am redirecting to the index.php. I am attaching the script I use. &lt;script&gt; if(typeof window.history.replaceState == 'function') { window.history.replaceState({}, "Hide", ".#&lt;?php echo $_GET["menu"];?&gt;"); } &lt;/script&gt; I will appreciate any answers who can help, or at least helpful links where I can find the answer.

http://stackoverflow.com/comment/41387270
has text: I'm not sure what you mean by "code markup without HTML including." Would you mind elaborating?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26364304
type: Comment

http://stackoverflow.com/a/26402388
accepted answer of: http://stackoverflow.com/q/26394805
type: Answer
upvote count: 4
has body: The documentation explains what happens in the Control Flows section. Behind the scenes, it's all promises, even when you don't need to handle them yourself. If you do not specifically tell WebDriverJS otherwise, there is a promise manager that handles instructions so that in many cases, promises are handled for you. The documentation gives this example. If you give these instructions: driver.get(“http://www.google.com”); driver.findElement(webdriver.By.name('q')).sendKeys('webdriver'); driver.findElement(webdriver.By.name('btnG')).click(); driver.getTitle().then(function(title) { console.log(title); }); The promise manager weaves them like this: driver.get(“http://www.google.com”). then(function() { return driver.findElement(webdriver.By.name('q')); }). then(function(q) { return q.sendKeys('webdriver'); }). then(function() { return driver.findElement(webdriver.By.name('btnG')); }). then(function(btnG) { return btnG.click(); }). then(function() { return driver.getTitle(); }). then(function(title) { console.log(title); }); The reason you need to handle the promise returned by getTitle is that console.log is not a WebDriverJS function and thus does not participate in promise management.
downvote count: 0
type: AcceptedAnswer
score: 4
answers question: http://stackoverflow.com/q/26394805

http://stackoverflow.com/q/26397078
tagged with: ubuntu
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/41445360
favorite count: 0
has answer: http://stackoverflow.com/a/26397508
type: UnansweredQuestion
score: -3
tagged with: curl
downvote count: 3
has answer: http://stackoverflow.com/a/56203755
type: Question
has title: I am not able to install curl package on ubuntu 11.10
has body: I am trying to install meteor using : curl https://install.meteor.com | /bin/sh command on terminal but it gives me following error: The program 'curl' is currently not installed. You can install it by typing: sudo apt-get install curl And when I tried installing curl by command : sudo apt-get install curl Following error is shown to me: Reading package lists... Done Building dependency tree Reading state information... Done Package curl is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'curl' has no installation candidate Can anyone please tell me how to resolve this issue.
tagged with: javascript

http://stackoverflow.com/comment/41437739
type: Comment
has text: I don't think "See the documentation" is really enough for an answer.
comment on: http://stackoverflow.com/a/26392440
type: AnswerComment
score: 4

http://stackoverflow.com/q/26466220
has comment: http://stackoverflow.com/comment/41571115
score: 0
has comment: http://stackoverflow.com/comment/41576208
type: Question
accepted answer: http://stackoverflow.com/a/26466839
tagged with: javascript
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/41580331
has comment: http://stackoverflow.com/comment/41570903
has body: I am using a plugin called pStrength.jquery.js and it was working previously but for some reason it has stopped, i am not sure if i am doing anything wrong. This is the code on my page &lt;cfinclude template="header.cfm"&gt; &lt;cfparam name="ERROR" default=""&gt; &lt;cfparam name="FORM.ACTION" default=""&gt; &lt;cfparam name="form.NEWPASS1" default=""&gt; &lt;Cfparam name="form.NEWPASS2" default=""&gt; &lt;cfparam name="message" default=""&gt; &lt;style&gt; #myElement1, #myElement2 { padding:4px; margin:2px; border:solid 1px #999; } #myElement2 { background-color:#036; } div { margin-left:20px; margin-top:6px; } .left { float:left; } .clear { clear:both; } &lt;/style&gt; &lt;table border="0" cellpadding="0" cellspacing="1" width="780" class="Border" align="center"&gt; &lt;tr&gt; &lt;td class="Navsub" align="left" colspan="2"&gt;Reset Password&lt;/td&gt; &lt;/tr&gt; &lt;cfif FORM.ACTION eq "CHANGE"&gt; &lt;Cfif form.NEWPASS1 neq form.NEWPASS2&gt; &lt;Cfset error = 1&gt; &lt;Cfset message = "Your passwords did not match. Please retry"&gt; &lt;Cfelse&gt; &lt;cfquery name="update_password" datasource="#application.db#"&gt; update tbladmin set adminpass = '#form.newpass1#' where adminid = #session.adminid# &lt;/cfquery&gt; &lt;Cfset error = 0&gt; &lt;cfset message = "Your password has been updated. You will be required to enter it the next time you login"&gt; &lt;/Cfif&gt; &lt;cfoutput&gt; &lt;form id="myForm" action="?#createuuid()#" method="post"&gt; &lt;Cfif error neq ""&gt; &lt;Tr&gt; &lt;Td align="center" class="Error" colspan="2" bgcolor="##fb565d"&gt;#message#&lt;/Td&gt; &lt;/Tr&gt; &lt;/Cfif&gt; &lt;tr&gt; &lt;td align="right" class="Copy" valign="middle"&gt;New Password:&lt;/td&gt; &lt;td align="left" class="Copy" valign="top"&gt;&lt;input name="NEWPASS1" type="password" class="textblock" required="yes" message="Please enter your new password" id="myElement1" data-display="myDisplayElement1"&gt;&lt;div class="left" id="myDisplayElement1"&gt;&lt;/div&gt;&lt;/td&…
answer count: 1
tagged with: web
has comment: http://stackoverflow.com/comment/41570281
has title: Password Strength validator not submitting the form
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26466839
tagged with: coldfusion
type: AnsweredQuestion

http://stackoverflow.com/comment/41387412
score: 3
type: QuestionComment
has text: You should add at least one additional case to your list of examples: `1.3333 // result: { "pattern": 3, index: 0}` because a lot of the answers below are failing on this case. (I'm assuming you want a general solution and not just one that will work for *some* numbers.)
comment on: http://stackoverflow.com/q/26363390
type: Comment

http://stackoverflow.com/comment/41601928
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26483024
type: Comment
has text: This could work, it sucks a bit because it means people adding this manually (it will be in a CMS). However my question is, how would I invoke this embed() inside a .each()?

zooming
tags question: http://stackoverflow.com/q/26507447
tag name: zooming
type: Tag
tags question: http://stackoverflow.com/q/26411094
tags question: http://stackoverflow.com/q/26489088
tags question: http://stackoverflow.com/q/26423947
tags question: http://stackoverflow.com/q/26496583

http://stackoverflow.com/comment/41468463
type: QuestionComment
score: 1
has text: @ManjunathSiddappa the answers to the linked question contain all that you need.
comment on: http://stackoverflow.com/q/26410012
type: Comment

http://stackoverflow.com/q/26418662
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41484133
tagged with: javascript
score: -1
has title: Javascript implementation of php code for tracking visitor on page
upvote count: 0
linked to: http://stackoverflow.com/q/6033686
has body: I am writing php code to track the visitors details who is visiting that web page. Now i want to write a javascript code on the pages i want to track. The javascript code will be using that php file code which i am writing to track visitors. Can somebody please guide what should be my javascript code.
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26418706
accepted answer: http://stackoverflow.com/a/26418706
has comment: http://stackoverflow.com/comment/41484411
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/a/26957864
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26378733
has body: you can try use EventSource (SSE). I am using this: https://github.com/remy/polyfills/blob/master/EventSource.js but modified, for SignalR: http://a7.org/scripts/jquery/eventsource_edited.js I am working with it for one year, SignalR just check for window.EventSource and it works.
downvote count: 0

http://stackoverflow.com/comment/41477312
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26412991
has text: it COULD work with a web server as an intermediary, yes. However, since his code is ALREADY javascript, and nodeJS enables server-side javascript it seems like the path that would allow him the greatest re-use of his code. So the code would still sit on the same Windows 7 machine, would still be javascript, but would run in a container that enables port binding and responding to requests from the smart phone.
type: AnswerComment

http://stackoverflow.com/a/26510529
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I personally like (https://chrome.google.com/webstore/detail/jquery-debugger/dbhhnnnpaeobfddmlalhnehgclcmjimi?hl=en). It shows exactly what jQuery code is attached to an object.
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26510457
answers question: http://stackoverflow.com/q/26510457

http://stackoverflow.com/q/26445886
has body: I have a Rails app where I'm displaying a realtime clock in my application layout. I'm using this code to make it work: &lt;div id="time" class="time_display"&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; function checkTime(i) { if (i &lt; 10) { i = "0" + i; } return i; } function startTime() { var today = new Date(); var h = today.getHours(); var m = today.getMinutes(); var s = today.getSeconds(); // add a zero in front of numbers&lt;10 m = checkTime(m); s = checkTime(s); document.getElementById('time').innerHTML = h + ":" + m + ":" + s; t = setTimeout(function () { startTime() }, 500); } startTime(); &lt;/script&gt; What I'd like to be able to do is somehow give the user the option to switch between a realtime clock in military time and regular AM/PM time with the AM/PM included but clicking on the div. I've done some searching but haven't found anything that works too well. I'm open to any solutions someone might have be it JS or jQuery. Any help would be greatly appreciated. If my question is not clear, please let me know.
score: 0
type: UnansweredQuestion
tagged with: time
has title: Javascript change time between military and AM/PM onclick
has answer: http://stackoverflow.com/a/26445940
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26445943
tagged with: jquery
tagged with: ruby-on-rails-3

http://stackoverflow.com/comment/41590178
comment on: http://stackoverflow.com/q/26474475
type: Comment
type: QuestionComment
has text: I found their code with Albers projections https://github.com/proj4js/proj4js/blob/932ca6296d7b09d7695a012b11c9fe8ee43262e7/lib/projections/aea.js and it is too complicated for me unfortunately.
score: 0

http://stackoverflow.com/comment/41611902
comment on: http://stackoverflow.com/q/26425501
has text: @CheranShunmugavel - I'll definitely try that. That was why I thought the question was worth asking, even though I'm well aware there is no by-ref in JavaScript. There may be some weird workaround for COM with arrays and such. Thanks.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41527111
type: Comment
comment on: http://stackoverflow.com/a/26441918
type: AnswerComment
has text: hey @edi9999 can i use string.replace(a[k]/g,b[k]);
score: 0

calculator
tags question: http://stackoverflow.com/q/26446490
tags question: http://stackoverflow.com/q/26409331
tags question: http://stackoverflow.com/q/26458544
tags question: http://stackoverflow.com/q/26395842
type: Tag
tags question: http://stackoverflow.com/q/26428029
tag name: calculator
tags question: http://stackoverflow.com/q/26445526

http://stackoverflow.com/q/26469798
has comment: http://stackoverflow.com/comment/41577726
has comment: http://stackoverflow.com/comment/41577971
tagged with: onblur
answer count: 0
tagged with: dynamic
has comment: http://stackoverflow.com/comment/41580302
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41579771
type: Question
score: 1
has body: I have written a simple validation function for a series of input tags. These work fine first time round but when I re-write the parent div html using jQuery, the blur function no longer triggers. Basically, the script will not allow the questionnaire to move forward to the next page unless all input fields validate. Once all input fields do validate, I make a copy of the current "page" of the questionnaire and store it in a variable called previousPage - this allows me to rewrite the questionnaire if the user clicks back (along with the previously entered values). Everything works - up until the point where a user changes an input on going "back" but then because the blur event is not triggering, the validation is not running and the form can be progressed despite being incomplete. Here is my blur hook: $("body").on('blur', 'input', function(){ rules = ''; rulesValues = ''; lastInput = $(this).attr('id'); if($(this).data('rules')){ rules = $(this).data('rules').split(','); } if($(this).data('rules-values')){ rulesValues = $(this).data('rules-values').split(','); } validateData = $(this).val(); if(rules &amp;&amp; rulesValues){ $.each(rules, function(index, value) { validationResult = inputValidator(rules[index],rulesValues[index],validateData); if(validationResult !== "PASSED"){ $('#'+lastInput+'').after('&lt;div class="validationFail"&gt;'+validationResult+'&lt;/div&gt;'); $('#'+lastInput+'').addClass('emptyInput'); incomplete = true; }else{ incomplete = false; } }); } }); Here is a fiddle which illustrates the problem: Fiddle
tagged with: validation
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41580008
favorite count: 0
has title: Validation not working on dynamic inputs - jQuery

http://stackoverflow.com/comment/41647447
comment on: http://stackoverflow.com/a/26501053
type: Comment
score: 0
type: AnswerComment
has text: You're welcome. I would recommend you to downgrade to latest Browserify 4, it is working just fine in there.

http://stackoverflow.com/a/26388372
score: 0
answers question: http://stackoverflow.com/q/26385752
has body: You can't expect Google crawlers to click all your buttons and discover every URL you want to be searchable. You CAN, however, submit a sitemap to google that tells them explicitly how your site is organized. Search around online for Google webmaster tools. I'm not an expert on it, but I suspect you'll find what you're looking for.
type: Answer

http://stackoverflow.com/a/26418175
answers question: http://stackoverflow.com/q/26418153
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: It won't keep its value through pages, and the two pages will not alert the same thing. There must be some other code in your page that sets name to some value.

http://stackoverflow.com/a/26426427
has body: isUndefined could be written as testValue === undefined like for every other value. This does not work with NaN however, as NaN !== NaN. Without the ability to use a comparison, there was need for an isNaN function to detect NaN values.
type: Answer
answers question: http://stackoverflow.com/q/26426298
upvote count: 4
downvote count: 0
score: 4

http://stackoverflow.com/a/35522110
answers question: http://stackoverflow.com/q/26446039
type: Answer
downvote count: 1
score: 2
upvote count: 3
has body: I have had the same error. I resolved it by adding () after the plumber. Here is the code. Earlier Code: gulp.task('scripts',function(){ gulp.src('admin-scripts.js') .pipe(plumber) .pipe(uglify().on('error', function(e){ console.log(e); })) .pipe(gulp.dest('build/js')); }); Fixed Code: gulp.task('scripts',function(){ gulp.src('admin-scripts.js') .pipe(plumber()) .pipe(uglify().on('error', function(e){ console.log(e); })) .pipe(gulp.dest('build/js')); }); I was missing the () after plumber. Hope this helps.

http://stackoverflow.com/q/26372842
has body: Say I have multiple arrays. var array1= []; var array2= []; var array3= []; And I have another array of objects, each with a health parameter. Say I push the first object in this array into array1, array2 and array3. Now if I edit the health parameter of array1's object: array1[0].health -= 50 it changes the health for each arrays object. How can I do it so it only does it for the array im calling into?
linked to: http://stackoverflow.com/q/122102
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41402502
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/26372924
has title: Stop the changing of one objects param affecting copies of that object
possible better answer: http://stackoverflow.com/a/26372872
answer count: 3
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26372887
accepted answer: http://stackoverflow.com/a/26372887
has answer: http://stackoverflow.com/a/26372872
score: 0

http://stackoverflow.com/comment/41652176
comment on: http://stackoverflow.com/a/26510996
score: 0
type: Comment
has text: Yeah but I want it so the sidebar is displayed unless the user wants to collapse it. Thanks though.
type: AnswerComment

http://stackoverflow.com/comment/41452813
type: QuestionComment
has text: If I ping the site, I get a response. But if I `curl`, I get this error `curl: (7) Failed connect to torrentz.eu:80; Bewerking is nu bezig`. The last part means something along the lines of "Editing is taking place right now".
comment on: http://stackoverflow.com/q/26391635
score: 0
type: Comment

http://stackoverflow.com/comment/41543702
has text: you are trying to fade in ` ` but it is always visible in your code after the first time it fades in
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26451184

http://stackoverflow.com/comment/41547502
comment on: http://stackoverflow.com/q/26453151
type: QuestionComment
has text: @hindmost but this doesnt mean that only links are clickable in mobiles , anything can be clickable as long as it is visible on sreen.
type: Comment
score: 0

http://stackoverflow.com/comment/41388333
type: QuestionComment
has text: @Teemu issue persists in FF 32.0.2, 32.0.3, 33.0. Do you see a logging after clicking on "intuitive" of homepage prior to any scrolling? The event should fire since the anchor is mid-page..
score: 0
comment on: http://stackoverflow.com/q/26365191
type: Comment

http://stackoverflow.com/comment/41584040
type: QuestionComment
has text: "attr('value')" didn't change the result. If I change my value to static value like "value="100"" it will print 100 in my console so it is taking the value from there. And that's true that I have multiple li elements with the same ID when list is iterated, but I don't know what to do for that.
score: 0
comment on: http://stackoverflow.com/q/26472976
type: Comment

http://stackoverflow.com/q/26452386
tagged with: angularjs
tagged with: local-storage
has comment: http://stackoverflow.com/comment/41547780
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41547817
has answer: http://stackoverflow.com/a/26453732
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26453732
has comment: http://stackoverflow.com/comment/41547854
answer count: 1
has comment: http://stackoverflow.com/comment/41546581
has body: I'm listing an array of objects saved into Localstorage in a table-like layout. Each row displays data saved in a particular object. I want to be able to edit and update certain properties from the object once it has already been saved into LocalStorage. This is how a couple of my objects looks like: [{ "date":"2014 10 16", "time":"20.22", "car":"396", "driver":"Seb", "from":"A", "destination":"B", "pax":"3", "arrival":"23.10" }, { "date":"2014 10 16", "time":"23.22", "car":"46", "driver":"Eric", "from":"C", "destination":"E", "pax":"3", "arrival":"00.10" }] So far my frontend code displaying the Destination property looks like this: HTML {{record.destination}} // Shows current value Destination // Shows select with options to be picked to update property Edit Ok //Toggles between current value and select and triggers editData function Relevant JS: $scope.editData = function (record) { record.destination = $scope.locationList2; jsonToRecordLocalStorage($scope.recordlist); } So far when I trigger editData it just deletes the Destination property, it doesn't update it with the model of locationList2 from the Select. What am I missing? EDIT Here's the complete ng-repeat piece of code: {{record.time}} {{record.car}} {{record.driver}} {{record.from}} {{record.destination}} Destination {{record.pax}} Also, I here's a Plunkr to ilustrate the issue! Add a driver, car code and location before starting to see the app running and the mentioned problem.
has title: Editing property from Object in ng-repeat from LocalStorage

http://stackoverflow.com/q/26404785
upvote count: 2
has title: Reddit Api Error trying to get reddit self text via snoocore node.js
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: reddit
downvote count: 0
answer count: 1
tagged with: javascript
has body: I'm tryng to get the self.text on a post and using this route: reddit('/r/Denmark/comments/2jc5yk/how_to_live_in_denmark.json').listing({ context: 1, limit: 10, sort: 'hot', }) .then(function(result) { console.log(result); }); I have also tried using .get(), without .json and without /how_to_live_in_denmark but still the same error. When I input the route in my browser, I get the desired JSON. The error i get: Uncaught Error: Invalid path provided! This endpoint does not exist. Make sure that your call matches the routes that are defined in Reddit's API documentation What am i doing wrong?
favorite count: 0
has answer: http://stackoverflow.com/a/26724205
accepted answer: http://stackoverflow.com/a/26724205
tagged with: node-webkit
tagged with: node.js
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/26510779
has answer: http://stackoverflow.com/a/26512136
accepted answer: http://stackoverflow.com/a/26512136
has comment: http://stackoverflow.com/comment/41652838
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41652964
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26512917
has answer: http://stackoverflow.com/a/26511491
has title: Need help using Javascript to insert an onclick event
type: Question
has comment: http://stackoverflow.com/comment/41651662
tagged with: google-analytics
has body: I am attempting to use Event tracking in Google Analytics. In order to achieve this I need to add an onclick attribute to certain links (The ones I was asked to track) like so: Check out example.com The CMS I am using does not have an option to add onclick events to the menu and I don't want to track every link in the main navigation. I only have a beginner's level understanding of javascript, but I have been looking for a way to use it to insert the onclick status above to only certain href values. Any assistance would be greatly appreciated.
has comment: http://stackoverflow.com/comment/41652550
tagged with: javascript
has comment: http://stackoverflow.com/comment/41652761
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26511491
tagged with: jquery
has comment: http://stackoverflow.com/comment/41652811

http://stackoverflow.com/q/26383548
tagged with: jquery
has comment: http://stackoverflow.com/comment/41421568
has comment: http://stackoverflow.com/comment/41421409
has comment: http://stackoverflow.com/comment/41421423
has comment: http://stackoverflow.com/comment/41421727
has comment: http://stackoverflow.com/comment/41421563
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/41421399
type: UnansweredQuestion
has title: jquery not running php
has body: I've found some code that allows me to upload photos using using $_files Logout and in upload_file.php <?php ob_start(); // Connect to server and select databse. $link = mysqli_connect("$host", "$username", "$password", "$db_name")or die("cannot connect"); $allowedExts = array("gif", "jpeg", "jpg", "png", "JPG"); if(!empty($_FILES['file']['name'])) { $temp = explode(".", $_FILES["file"]["name"]); $extension = end($temp); if ((($_FILES["file"]["type"] == "image/gif") ||($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/x-png") || ($_FILES["file"]["type"] == "image/png")) && ($_FILES["file"]["size"] < 20000000) && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . " "; } else { echo "Upload: " . $_FILES["file"]["name"] . " "; echo "Type: " . $_FILES["file"]["type"] . " "; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB "; echo "Temp file: " . $_FILES["file"]["tmp_name"] . " "; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { $sql="INSERT INTO $tbl_name (name, type, size) VALUES ('" . mysqli_real_escape_string($link , $_FILES["file"]["name"]) . "','" . mysqli_real_escape_string($link , $_FILES["file"]["type"]) . "','" . mysqli_real_escape_string($link , $_FILES["file"]["size"]) . "')"; if (!mysqli_query($link,$sql)) { die('Error: ' . mysqli_error($link)); } move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } header("location:main_login.php"); } } } else { if ( !empty($_SERVER['CONTENT_LENGTH']) && empty($_FILES) && empty($_POST) ) { echo 'The uploaded zip was too large. You must upload a file smaller than ' . ini_get("upload_max_filesize"); } } ?> but now I've add Jquery Mobile ui buttons from here http://www.w3sc…
tagged with: php
downvote count: 1
has answer: http://stackoverflow.com/a/26383895
score: -1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26402292
linked to: http://stackoverflow.com/q/16063394
tagged with: node.js
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26404598
has comment: http://stackoverflow.com/comment/41454216
has comment: http://stackoverflow.com/comment/41454364
tagged with: javascript
tagged with: inheritance
has comment: http://stackoverflow.com/comment/41454178
has body: In C#, inheritance is as easy as: class Animal { string name; public Animal() { } } class Dog : Animal { public Dog() : base() { this.name = "Dog"; } } In node.js, I want to have two files (animal.js and dog.js) replicate the above setup while being as simple and non-hacky as possible. Is this even possible with node.js? If it matters, I'd like to do all this so that I can pass the Animal type through a function without checking the subclass as there will be dozens of classes inheriting the Animal class.
has comment: http://stackoverflow.com/comment/41454058
score: 0
has comment: http://stackoverflow.com/comment/41459913
linked to: http://stackoverflow.com/q/7486825
answer count: 1
has title: Proper inheritance for node.js
accepted answer: http://stackoverflow.com/a/26404598

http://stackoverflow.com/comment/41436751
has text: Please explain your answer a bit instead of just saying "try this".
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26391453
type: Comment

http://stackoverflow.com/q/26492288
has title: Add Argument to JS Promise
tagged with: promise
has comment: http://stackoverflow.com/comment/41688598
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41619027
score: 1
has body: How can I alter the code I have to accomplish to goal of referencing the original event (or properties/methods of it) in the subsequent code. tViz.addEventListener(tableauSoftware.TableauEventName.MARKS_SELECTION, onMarksSelection); function onMarksSelection(marksEvent) { return marksEvent.getMarksAsync().then(showMarksHelp); } function showMarksHelp(marks){ I want to access a method from the marksEvent variable but here I can only access the marks variable from getMarksAsync(). I need it here because stuff will also be based on the marks variable contained here. } I feel like I could restructure my JS to accomplish this or pass something in somewhere, but after reading about Promises and the Tableau documentation I'm still lost. I don't want to use any global variables. EDIT So I changed my code to the below: function onMarksSelection(marksEvent) { var marks = marksEvent.getMarksAsync().then(function(marks){ showMarksHelp(marks,marksEvent) }); } function showMarksHelp(marks,marksEvent){} Is this a/the correct method to accomplish what I did? I just made it up but it seems like it works.
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26492645
downvote count: 0
tagged with: javascript
answer count: 1
tagged with: tableau-api
favorite count: 0
accepted answer: http://stackoverflow.com/a/26492645

http://stackoverflow.com/comment/41508844
type: QuestionComment
type: Comment
has text: if css is set to display loading over top of calendar container, it should work
score: 1
comment on: http://stackoverflow.com/q/26431904

http://stackoverflow.com/a/26454397
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26454316
upvote count: 2
has body: Modify your function a little: function changeImage(src, a) { var img = document.getElementById('imageReplace'); img.src = src; img.title = a.title; } and HTML: my link So you basically pass HTMLAnchorElement object (a tag) into changeImage function where you can use its properties like title. There you set image title equal to link one.

http://stackoverflow.com/q/26385703
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41425430
tagged with: forms
has body: I've got a form that doesn't allow you to check checkboxes on the first entry, which is very weird. It's almost like it doesn't register the click. If however, you submit the form and try and check the same checkboxes after submitting the first form, it allows you to check the checkboxes. Why is this? This is what my checkboxes look like: &lt;label ng-repeat="sector in sectors" for="{{sector}}"&gt; &lt;input type="checkbox" id="{{sector}}" value="{{sector}}" ng-model="newService.sectors[sector]"&gt;{{sector}} &lt;/label&gt; I'm also trying to work out how to implement $setPristine on this form so it gives the form a class of .ng-pristine when submitted. I'm very new to Angular and am slowly trying to understand how this all works. I've set up a Fiddle here: http://jsfiddle.net/nh63w6e0/2/ Any help is appreciated. Thanks in advance!
type: Question
accepted answer: http://stackoverflow.com/a/26388818
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Angular: $setPristine on Form and Checkbox Issue
score: 0
has comment: http://stackoverflow.com/comment/41426490
has answer: http://stackoverflow.com/a/26388818
tagged with: angularjs
tagged with: checkbox

http://stackoverflow.com/comment/41649154
has text: What do you want to accomplish? Its confusing. Your span with id `clickable` does not have anything attached to it. Just make sure that after using prepend, you reapply `$("#clickable").off("click").on("click", function(event){})`
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26509430
score: 0

ckeditor
tags question: http://stackoverflow.com/q/26485316
tags question: http://stackoverflow.com/q/26510486
tags question: http://stackoverflow.com/q/26398142
tag name: ckeditor
tags question: http://stackoverflow.com/q/26398260
tags question: http://stackoverflow.com/q/26354317
tags question: http://stackoverflow.com/q/26396840
tags question: http://stackoverflow.com/q/26384868
tags question: http://stackoverflow.com/q/26491031
tags question: http://stackoverflow.com/q/26374904
tags question: http://stackoverflow.com/q/26384943
tags question: http://stackoverflow.com/q/26475998
tags question: http://stackoverflow.com/q/26439020
type: Tag
tags question: http://stackoverflow.com/q/26486395

http://stackoverflow.com/comment/41428741
has text: well that is strange, because i added it with 'require(["dojo/dom"])' and it is now working in the fiddle but not in my application. did you change something more than loading it via 'dojo.require("dojo.dom")' and changing 'dom.byId' to 'dojo.dom.byId'?
comment on: http://stackoverflow.com/a/26385042
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27755556
upvote count: 0
has body: Thank you this saved me hours. I modified mine to work with $resource for my Factory but it's essentially the same... $scope.loadMore = function() { moreNewsletters = WPFactory.query({ 'page' : $scope.pageNum, 'filter[posts_per_page]': 10, param1: 'posts', 'filter[cat]': 8, 'filter[orderby]': 'ID', }, function(data,responseHeaders) { angular.forEach(moreNewsletters, function(value, key) { value.image1 = ThumbnailFactory.getThumbnail(value.content); }); var i = data.length; $scope.newsletters = $scope.newsletters.concat(data); $scope.newsletters.push(data); $scope.$broadcast('scroll.infiniteScrollComplete'); $scope.pageNum +=1; }); }; Although I am getting an extra blank item at the bottom of 10 items.
type: Answer
score: -1
answers question: http://stackoverflow.com/q/26414326
downvote count: 1

http://stackoverflow.com/a/26491751
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26490508
answers question: http://stackoverflow.com/q/26490508
type: Answer
upvote count: 1
has body: Based on charlietfl's answer and Evilzebra's comment, this worked for me: Updated fiddle: http://jsfiddle.net/vcfpd450/2/ function addemployee() { var lastname = document.getElementById('txtlastname'); var firstname = document.getElementById('txtfirstname'); var select = document.getElementById('lbxname'); var option = document.createElement('option'); option.innerHTML=padStr(lastname.value) + firstname.value; select.appendChild(option); } function padStr(str){ var x = str.length; while(x &lt; 31){ str+='&amp;nbsp'; ++x; } return str; } CSS: #lbxname { font-family: monospace; } Basically, I add spaces to the string until I reach the desired width (31 in this case). Using a monospace font-family makes sure the width is consistent with the number of characters.

http://stackoverflow.com/a/28765889
has body: There are a few issues with svgmin, for example one with removeUnknownsAndDefaults and one with collapseGroups. I disabled aforementioned plugin in my grunt task and my svg files are ok now, but it depends on your svg files and exactly what plugin is breaking them. Try the following config and check if it fixes your problem: svgmin: { options: { plugins: [{ collapseGroups: false }, { removeUnknownsAndDefaults: false }] }, dist: { files: [{ expand: true, cwd: '&lt;%= path.app %&gt;/images', src: '{,*/}*.svg', dest: '&lt;%= path.dist %&gt;/images' }] } } If it doesn't and you don't want to spend time and find the svgmin plugin which causes the issues, simply remove svgmin task from concurrent:dist task but don't forget to add 'images/{,*/}*.{svg}' to copy:dist task inside src array so they get copied to dist/ folder.
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/55863596
answers question: http://stackoverflow.com/q/26414675
upvote count: 4
has comment: http://stackoverflow.com/comment/51406778
downvote count: 0

http://stackoverflow.com/comment/41565854
has text: Why not `ng-click="boom(input)"`? No need to pass in the event.
type: AnswerComment
comment on: http://stackoverflow.com/a/26463661
type: Comment
score: 2

http://stackoverflow.com/comment/41442742
comment on: http://stackoverflow.com/q/26387209
type: Comment
type: QuestionComment
score: 2
has text: Is it possible you also have elasticY set true? I know of this bug: https://github.com/dc-js/dc.js/issues/667 but am not aware of a 'bigger bug'. If this is such, please [report it](https://github.com/dc-js/dc.js/issues/new)!

http://stackoverflow.com/a/26427168
has comment: http://stackoverflow.com/comment/41500756
has body: Demo: http://jsfiddle.net/Lts1rg18/ Assuming $data["expires"] is a date string; var expDate = new Date(&lt;?php echo "$data['expires']"; ?&gt;); var now = new Date(); var oneMonthFromNow = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate()); if(expDate &lt;= oneMonthFromNow) { $('#expiryDate').show(); } else { $('#expiryDate').hide(); }
has comment: http://stackoverflow.com/comment/41565042
type: Answer
has comment: http://stackoverflow.com/comment/41501250
answers question: http://stackoverflow.com/q/26426991
score: 2
has comment: http://stackoverflow.com/comment/41571530
upvote count: 2
has comment: http://stackoverflow.com/comment/41500225
accepted answer of: http://stackoverflow.com/q/26426991
has comment: http://stackoverflow.com/comment/41502082
has comment: http://stackoverflow.com/comment/41564262
has comment: http://stackoverflow.com/comment/41564987
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41500371
downvote count: 0

http://stackoverflow.com/q/26395128
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41442453
has comment: http://stackoverflow.com/comment/41442226
has comment: http://stackoverflow.com/comment/41442374
answer count: 1
has comment: http://stackoverflow.com/comment/41442517
tagged with: angularjs
has title: Angular format input value as date with modal
has answer: http://stackoverflow.com/a/26395397
has body: I have an input that accepts the datetime picker as an option. Now when choosing a date it shows correctly. When loading the date in when say the user presses an edit button from one of the entries the date shows incorrect as format (Don't know the name of the date format): Thu Oct 09 2014 05:06:00 GMT+1100 (AEDT) My code is as such, my mission is to format the date on the input no matter how it's loaded. &lt;input type="text" class="form-control" datepicker-popup="{{'dd-MMMM-yyyy'}}" ng-model="" is-open="openedStart" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" /&gt;
accepted answer: http://stackoverflow.com/a/26395397
type: AnsweredQuestion
score: 0
type: Question

http://stackoverflow.com/q/26493756
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26497594
favorite count: 0
tagged with: encryption
upvote count: 1
has comment: http://stackoverflow.com/comment/41624539
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26497594
has comment: http://stackoverflow.com/comment/41624185
score: 1
tagged with: rsa
has title: RSA Encrypt String longer than key
has body: Hei Guys, i'm encryping Strings with JS and a Public Key. I use the JSBN code but the problem is in creating a BigInt. RSA.js does: // Copyright (c) 2005 Tom Wu var m = pkcs1pad2(text,(this.n.bitLength()+7)&gt;&gt;3); // getting the Bigint if(m == null) return null; // nullcheck var c = this.doPublic(m); // encrypting the BigInt The problem is in "pkcs1pad2". The function has a check, if the text is longer den the BitLength of the key. If so, return, else create a BigInt. // Copyright (c) 2005 Tom Wu if(n &lt; s.length + 11) { // TODO: fix for utf-8 alert("Message too long for RSA"); return null; } var ba = new Array(); var i = s.length - 1; while(i &gt;= 0 &amp;&amp; n &gt; 0) { var c = s.charCodeAt(i--); if(c &lt; 128) { // encode using utf-8 ba[--n] = c; } else if((c &gt; 127) &amp;&amp; (c &lt; 2048)) { ba[--n] = (c &amp; 63) | 128; ba[--n] = (c &gt;&gt; 6) | 192; } else { ba[--n] = (c &amp; 63) | 128; ba[--n] = ((c &gt;&gt; 6) &amp; 63) | 128; ba[--n] = (c &gt;&gt; 12) | 224; } } ba[--n] = 0; var rng = new SecureRandom(); var x = new Array(); while(n &gt; 2) { // random non-zero pad x[0] = 0; while(x[0] == 0) rng.nextBytes(x); ba[--n] = x[0]; } ba[--n] = 2; ba[--n] = 0; return new BigInteger(ba); I can't figure out, what the author means with "// TODO: fix for utf-8". Can anyone explain this? &amp;/ give a working answer?

http://stackoverflow.com/comment/41379398
type: AnswerComment
type: Comment
has text: 1. JSP absolutely cannot do this, browser history is clien code task.
comment on: http://stackoverflow.com/a/26360573
score: 0

http://stackoverflow.com/comment/41414815
type: QuestionComment
comment on: http://stackoverflow.com/q/26379903
has text: Can you please define "not working" - what exactly are you having problems with? Is it a syntax error? Please be more specific with regard to what you need help with.
score: 0
type: Comment

http://stackoverflow.com/a/26430725
downvote count: 0
has comment: http://stackoverflow.com/comment/41508621
type: Answer
has comment: http://stackoverflow.com/comment/41508398
accepted answer of: http://stackoverflow.com/q/26430584
score: 1
has comment: http://stackoverflow.com/comment/41508990
has body: If you just need an id that is unique per the lifetime of a page, you can use a simple monotomically increasing counter in the page: var getUniqueID = (function() { var cntr = 0; return function() { return cntr++; }; })(); var idA = getUniqueID(); var idB = getUniqueID(); To make sure your ids are unique among all users is a taller task. Without involving a central server that coins unique ids for you, the general concept here is to create an id that is a combination of three things: A token that is unique to the user (like a userID) A token that is guaranteed to be unique for the session (like what we have above) A random value. Done right, there can never be a collision between two different users (because the userID is in the id) and the counter makes it so no user ever generates the same id twice in the same session and the random value makes the odds of a user generating the same id themselves in the same session extremely small. var getGUID = (function() { var cntr = 0; return function(userID) { var rand = Math.random().toString().replace(".", ""); return userID + "_" + rand + "_" + cntr++; }; })(); var idA = getGUID(myUserID); var idB = getGUID(myUserID); Note: this is the simpler approach on GUID generation that assumes you already have a userID. There is a whole lot of research and literature on various strategies for generating a GUID which you can certainly read a lot more about if you want something beyond this. Some references on the topic: http://en.wikipedia.org/wiki/Globally_unique_identifier http://betterexplained.com/articles/the-quick-guide-to-guids/ http://www.uddi.org/pubs/draft-leach-uuids-guids-01.txt
upvote count: 1
answers question: http://stackoverflow.com/q/26430584
has comment: http://stackoverflow.com/comment/41507865
has comment: http://stackoverflow.com/comment/41508259
has comment: http://stackoverflow.com/comment/41507517
type: AcceptedAnswer

http://stackoverflow.com/a/28919600
downvote count: 1
score: 3
has comment: http://stackoverflow.com/comment/50929325
answers question: http://stackoverflow.com/q/26502679
has body: browserify-ng-html2js has been designed to resolve this problem. Simply add in package.json : "browserify": { "transform": ["browserify-ng-html2js"] } And you'll see if it walks the talks :)
has comment: http://stackoverflow.com/comment/49354939
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/60654682

http://stackoverflow.com/comment/41386549
score: 3
has text: Are you actually serializing it to JSON at some point? It looks like you're basically just working with a JavaScript object there.
comment on: http://stackoverflow.com/q/26364493
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41569070
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26463924
has text: I'm in the process of coming up with a solution to this (only using AngularJS) so I'm interested to see what comes of this.

http://stackoverflow.com/q/26489509
tagged with: javascript
tagged with: sorting
has body: I have the following list of objects, for example, as the data source: var data = [ {"id": 456, "name": "ngf", "price": 9}, {"id": 576, "name": "ghdf", "price": 14}, {"id": 756, "name": "dtdf", "price": 16}, {"id": 743, "name": "fsd", "price": 19}, {"id": 354, "name": "gf", "price": 28}, {"id": 678, "name": "hjmd", "price": 42}, {"id": 783, "name": "fgh", "price": 55}, {"id": 345, "name": "gdv", "price": 60}, {"id": 785, "name": "ghj", "price": 67}, {"id": 869, "name": "hd", "price": 87}, {"id": 234, "name": "hgf", "price": 95} ] (the list is sorted by the objects' price value on purpose, because that's what it's like in my code for real) This list actually represents a data source for products shown on the page. Now, I need to create dynamic price ranges for filtering this list for display, in the following way: Up to $10 $11 - 30 $31 - $50 > $50 These ranges are NOT arbitrary here and are specifically based on the price values in the current list of objects (products, as I've mentioned). Nevertheless, it is only an example and in the real code on my website, this list is dynamic and the prices can vary in a very wide overall range (for example, it can be from $0.5 to $1,000). Even the amount of products in this list is dynamic. The only that's not dynamic here is always having 4 ranges of prices, where the first if "upto x" and the last is "above y". I need to write a javascript code that can take this list and its dynamic prices and create the appropriate ranges. Please note that I already have some kind of an algorithm for that (sorting the list from low to high, getting the average of it, getting the percentage of each of the prices against the entire amount of products and so on), but I haven't been able to implement it in JS code de-facto. That's why I'm asking here for a working JavaScript code and not just the logic or theoretical idea. Thank you in advance.
tagged with: filter
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41614081
upvote count: 1
has title: javascript - creating dynamic price ranges (not slider)
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/41613019
score: 1
has comment: http://stackoverflow.com/comment/41633595
has comment: http://stackoverflow.com/comment/41613992
has answer: http://stackoverflow.com/a/26501106
has comment: http://stackoverflow.com/comment/41623374
answer count: 1
tagged with: arrays
downvote count: 0

http://stackoverflow.com/comment/41550869
type: AnswerComment
has text: you are correct my array size is for minutes lol not seconds thanks +1
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26454218

http://stackoverflow.com/comment/41640530
type: Comment
comment on: http://stackoverflow.com/q/26504538
type: QuestionComment
has text: @MaxArt ok, I assume that the key is in string and I just see it in Chrome as non-string. If so, what does the object doesn't work with NoUiSlider and the one that I shown in the question does? Thanks
score: 0

http://stackoverflow.com/q/26475247
has comment: http://stackoverflow.com/comment/41588034
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26475307
has comment: http://stackoverflow.com/comment/41588209
tagged with: function
upvote count: 0
has comment: http://stackoverflow.com/comment/41587918
has answer: http://stackoverflow.com/a/26475307
has comment: http://stackoverflow.com/comment/41587911
has comment: http://stackoverflow.com/comment/41588132
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41624128
answer count: 2
has body: I want to extend Function.prototype, but on a new prototype which I'll call Func. I want to do this to modify the toString method. I've been trying a load of things to achieve this, but I can't seem to come up with anything. Can this be done, and if so, what is the best way to it? Ideally I'd want to do f = new Func(function () {}) and then later call f.toString to use my modified toString method.
has comment: http://stackoverflow.com/comment/41625034
has comment: http://stackoverflow.com/comment/41624774
has comment: http://stackoverflow.com/comment/41587883
has comment: http://stackoverflow.com/comment/41640109
favorite count: 0
has comment: http://stackoverflow.com/comment/41587963
has title: Extending `Function` in JavaScript
has answer: http://stackoverflow.com/a/26975850
has comment: http://stackoverflow.com/comment/41588063
has comment: http://stackoverflow.com/comment/41588287
has comment: http://stackoverflow.com/comment/41588293
accepted answer: http://stackoverflow.com/a/26975850
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41588862

http://stackoverflow.com/comment/41493081
type: QuestionComment
has text: I agree with the duplicate target being a not useful, but duplicates are defined be the question, not the quality of the answers.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26423193

http://stackoverflow.com/q/26442907
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41528993
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29193429
has body: I've spent a fair bit of time on the web looking at the various ways of detecting a touch device, but this surprisingly complicated issue does not seem to have a definitive answer. Based on this article, I've decided to pursue the following approach. // Run immediately and assign a global variable (touch_enabled) so it is accessible anywhere. // First try to detect (not entirely reliable) window.touch_enabled = !!('ontouchstart' in window) || !!('onmsgesturechange' in window); // Overwrite/set touch enabled to false on mousemove $(window).on('mousemove', function() { window.touch_enabled = false; }); // Overwrite/set touch enabled to true on touchstart $(window).on('touchstart', function () { window.touch_enabled = true; }); I'm wondering if anyone can point out any issues with this method. I have not field tested it yet and will be doing so right away, but any second opinions would be appreciated. Below is a quick demo. window.touch_enabled = !!('ontouchstart' in window) || !!('onmsgesturechange' in window); $(window).on('mousemove', function() { window.touch_enabled = false; }); $(window).on('touchstart', function () { window.touch_enabled = true; }); setInterval(function() { $('.output').text(window.touch_enabled); }, 200); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; Touch Enabled = &lt;span class="output"&gt;&lt;/span&gt;
score: 2
tagged with: detect
has answer: http://stackoverflow.com/a/29195212
upvote count: 2
has title: Detecting Touch Devices With Jquery
type: Question
has comment: http://stackoverflow.com/comment/41529641
tagged with: mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/41529716
has comment: http://stackoverflow.com/comment/41530692
tagged with: touch

http://stackoverflow.com/q/26454105
tagged with: jquery-ui-sortable
tagged with: jquery-ui
score: -1
has body: I am looking to have a jquery list automatically sort into two equally sized columns on load. Can't figure out how to get it to work - using the 'split-list' function doesn't work with the sortable plugin. http://jsfiddle.net/3swmnjjh/ Any ideas of how to get a list of five like this to split into two columns of two and three where it is autoupdated when items are dragged in between? One Two Three Four Five
has title: jQuery sortable list into two columns?
has answer: http://stackoverflow.com/a/26493844
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: list
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41618199
downvote count: 1
type: Question

http://stackoverflow.com/q/26431958
tagged with: regex
has answer: http://stackoverflow.com/a/33521231
tagged with: node.js
type: AnsweredQuestion
score: 4
has body: I'm using elasticsearch in a NodeJS project, which is breaking upon entering one of the Lucene keywords into the search box. I'm looking for a simple implementation to escape their special characters. Is regex the best way? I've been fiddling with the regex for a bit now, and felt as if there were probably others that have already gone through this process.
accepted answer: http://stackoverflow.com/a/26466646
type: Question
tagged with: javascript
tagged with: lucene
upvote count: 4
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26466646
favorite count: 0
has title: Escaping Lucene Characters using Javascript Regex
possible better answer: http://stackoverflow.com/a/33521231

http://stackoverflow.com/q/26361896
possible better answer: http://stackoverflow.com/a/26362114
type: Question
has title: add/remove class on click and on document load
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26362114
has comment: http://stackoverflow.com/comment/41382729
tagged with: javascript
has answer: http://stackoverflow.com/a/26362090
has answer: http://stackoverflow.com/a/26362220
has comment: http://stackoverflow.com/comment/41383550
has comment: http://stackoverflow.com/comment/41383242
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26363640
favorite count: 0
answer count: 5
has comment: http://stackoverflow.com/comment/41382870
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/26362090
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/26362379
has body: I have got 2 rows of html. One row contains plain html and another row contains ul li lists. First case: On page load I want to change the text color of row one depending on which li is active. Second Case On click any li from second row, I would like to change the color of first row html depending on what data I have clicked in second row. My code First row Text 1 Text 2 Second Row Text 1 Text 2 I have tried and created a jsfiddle as demo: Any help is highly appreciated. Thanks in advance.

recursion
type: Tag
tags question: http://stackoverflow.com/q/26456871
tag name: recursion
tags question: http://stackoverflow.com/q/26451440
tags question: http://stackoverflow.com/q/26495349
tags question: http://stackoverflow.com/q/26363302
tags question: http://stackoverflow.com/q/26502457
tags question: http://stackoverflow.com/q/26512821
tags question: http://stackoverflow.com/q/26416566
tags question: http://stackoverflow.com/q/26440553
tags question: http://stackoverflow.com/q/26360878
tags question: http://stackoverflow.com/q/26473836
tags question: http://stackoverflow.com/q/26442676

http://stackoverflow.com/comment/41460038
type: QuestionComment
has text: @Snellface, exactly right - very large number. I will have plenty of those and there is no uniformed formula to derive that numbers.
comment on: http://stackoverflow.com/q/26397876
score: 0
type: Comment

http://stackoverflow.com/q/26456558
accepted answer: http://stackoverflow.com/a/26456707
answer count: 2
has comment: http://stackoverflow.com/comment/41553732
tagged with: function
tagged with: jslint
tagged with: javascript
has title: My functions are either not declared properly or in the right place, "use strict".
has comment: http://stackoverflow.com/comment/41553646
upvote count: 1
has comment: http://stackoverflow.com/comment/41553851
has comment: http://stackoverflow.com/comment/41553798
favorite count: 0
has comment: http://stackoverflow.com/comment/41553831
has comment: http://stackoverflow.com/comment/41553743
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41553610
has comment: http://stackoverflow.com/comment/41553814
possible better answer: http://stackoverflow.com/a/26457423
has body: I've been using JSLint on my code, and this part of my code I just can't figure out... JSLint gives me the following message: Function statements should not be placed in blocks.Use a function expression or move the statement to the top of the outer function. and thit message implies to the following functions: function callbackRed() { AND function callMIDRed() { I've tried assigning them to variables, and putting them even in variables at the top of the function(turnEvent)... but it just looks uglier and it doesn't work when I tried it...(maybe I'm calling the code wrong). function turnEvent(x, y) { "use strict"; var kassi = collides(rects, x, y); if (kassi) { context.fillStyle = "White"; context.fillRect(kassi.x, kassi.y, 90, 110); function callbackRed() { setTimeout(function returnSizeRed() { context.fillStyle = kassi.color; context.fillRect(kassi.x, kassi.y, 90, 110); }, 50); } function callMIDRed() { setTimeout(function displayMidRed() { context.fillStyle = kassi.color; context.fillRect(kassi.x + 12, kassi.y + 12, 60, 80); return callbackRed(); }, 50); } setTimeout(function displayRectRed() { context.fillStyle = kassi.color; context.fillRect(kassi.x + 35, kassi.y + 35, 20, 40); return callMIDRed(); }, 50); } }//turnEvent();
has answer: http://stackoverflow.com/a/26457423
type: Question
has answer: http://stackoverflow.com/a/26456707
has comment: http://stackoverflow.com/comment/41553748

http://stackoverflow.com/comment/41616939
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26490711
has text: You should rather use ajax.
score: 0

http://stackoverflow.com/q/26416873
type: Question
answer count: 1
tagged with: javascript
has title: Why does my drop down menu move all the main links below with the siblings?
has answer: http://stackoverflow.com/a/26416924
score: 0
has body: I have a pretty simple CSS/JS drop down menu. The problem is, when I click on select1, select 2 and 3 also drop down with the rest of the children links. http://codepen.io/donnaloia/pen/GqiKl This shows exactly what I'm talking about. How do I fix this? HTML Select1 Apple Orange Banana Pineapple Mango Select2 Apple Orange Banana Pineapple Mango Select3 Apple Orange Banana Pineapple Mango CSS .dropdown { position: relative; margin: 50px auto; display: table; font-family: sans-serif; font-size: 11pt; color: #FC3; line-height: normal; text-align: left; font-smoothing: antialiased; } .dropdown .title { cursor: pointer; height: 45px; padding: 0 20px; border-radius: 5px; display: block; box-shadow: 0 0 0 1px #FC3; line-height: 45px; } .dropdown .title:after { content: ''; float: right; width: 0; height: 0; margin: 20px 0 0 20px; border-width: 5px 4px 0; border-style: solid; border-color: #FC3 transparent transparent transparent; } .dropdown .drop { position: relative; top: 100%; margin-top: 1px; border-radius: 0 0 5px 5px; display: none; overflow: hidden; box-shadow: 0 0 0 1px #FC3; } .dropdown .drop li { cursor: pointer; padding: 10px; } .dropdown .drop li:hover { background: #FC3; color: #FFF; } .select .title { border-radius: 5px 5px 0 0; } .select .title:after { transform: rotate(180deg); } JS $('.dropdown .title').on('click',function(){ $(this).parent().toggleClass('select').find('.drop').toggle(); }); $('.dropdown .drop li').on('click',function(){ var $this = $(this), input = $this.text(); $('.dropdown .title').text(input); });
tagged with: css
type: UnansweredQuestion

http://stackoverflow.com/comment/41427575
comment on: http://stackoverflow.com/q/26382551
type: Comment
has text: Okay, okay, after the excitement died down - these are the problems:: is there a way to make 'contact us' active when the page is scrolled right to the bottom? It also doesn't respond to well when scrolling upwards... not sure how to fix this... think it's because of my offset().top - 150
score: 0
type: QuestionComment

http://stackoverflow.com/a/26456204
has body: I would do it like this Personally, I'm not a big fan of Promises. I think the API is extremely verbose and the resulting code is very hard to read. The method defined below results in very flat code and it's much easier to immediately understand what's going on. At least imo. Here's a little thing I created for an answer to this question // void asyncForEach(Array arr, Function iterator, Function callback) // * iterator(item, done) - done can be called with an err to shortcut to callback // * callback(done) - done recieves error if an iterator sent one function asyncForEach(arr, iterator, callback) { // create a cloned queue of arr var queue = arr.slice(0); // create a recursive iterator function next(err) { // if there's an error, bubble to callback if (err) return callback(err); // if the queue is empty, call the callback with no error if (queue.length === 0) return callback(null); // call the callback with our task // we pass `next` here so the task can let us know when to move on to the next task iterator(queue.shift(), next); } // start the loop; next(); } You can use it like this var urls = [ "http://example.com/cat", "http://example.com/hat", "http://example.com/wat" ]; function eachUrl(url, done){ http.get(url, function(res) { // do something with res done(); }).on("error", function(err) { done(err); }); } function urlsDone(err) { if (err) throw err; console.log("done getting all urls"); } asyncForEach(urls, eachUrl, urlsDone); Benefits of this no external dependencies or beta apis reusable on any array you want to perform async tasks on non-blocking, just as you've come to expect with node could be easily adapted for parallel processing by writing your own utility, you better understand how this kind of thing works If you just want to grab a module to help you, look into async and the async.eachSeries method.
score: 2
upvote count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/41628349
has comment: http://stackoverflow.com/comment/41616871
type: Answer
has comment: http://stackoverflow.com/comment/41628404
answers question: http://stackoverflow.com/q/26454865

http://stackoverflow.com/comment/41534649
has text: @max still same error
type: QuestionComment
comment on: http://stackoverflow.com/q/26446007
score: 0
type: Comment

http://stackoverflow.com/q/26480763
has body: I want to create a simple javascript slideshow with images moving to left and right on clicking the pre and next buttons. The code is as follows.The problem is when i run in browser nothing shows up. Help is much appreciated and i am new to javascript Use function to create rollover Next Pre
has answer: http://stackoverflow.com/a/26481375
has title: Creating slideshow in javascript
accepted answer: http://stackoverflow.com/a/26481375
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41598497
type: Question
has answer: http://stackoverflow.com/a/26481384
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26481384
score: 0
answer count: 2

http://stackoverflow.com/a/26442160
answers question: http://stackoverflow.com/q/26442084
score: 2
has body: You cannot put an if statement in the middle of a string concatination in your last append call. do this instead content = " " + element.name + " " + element.time + " " + element.type + " " + element.change_in_balance + " " + element.method + " "; if (element.status == 'New Transaction') content += " Pending "; $('#overviewlist tbody').append(content);
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/q/26455086
upvote count: 3
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26456035
tagged with: ember.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26456035
has body: In prototyping a login functionality to my ember app, I am using the route to make a query to the store based on a given username. If that username is not found, my API returns an object with a message property. Here is that route: App.LoginRoute = Ember.Route.extend({ actions: { getUsername: function(username){ this.store.find('user', {username: username}).then(function(user){ var eid = user.get('eid'); console.log(eid); if (eid) { self.controller.send('transition', "index"); } else { self.controller.set('model', "Oops! That's not right.");} }); } } });` If the username exists in the databse, the API will send back user object. It loads into the store just fine if the username exists, I can see the record under Data in Ember Inspector. However, I cannot figure out how to get the properties of that user object. In the .then I am passing the returned information, and attempting to call .get on that, but that always returns undefined. What is the proper way to get the properties of whatever is returned from a store.find('store', {query})?
downvote count: 0
has title: Getting properties of Query Find
type: Question
score: 3
tagged with: ember-data
tagged with: javascript

http://stackoverflow.com/a/26412991
has comment: http://stackoverflow.com/comment/41474980
has comment: http://stackoverflow.com/comment/41474833
accepted answer of: http://stackoverflow.com/q/26412464
answers question: http://stackoverflow.com/q/26412464
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41477312
has comment: http://stackoverflow.com/comment/41474766
has comment: http://stackoverflow.com/comment/41475090
has comment: http://stackoverflow.com/comment/41474503
has body: I propose a different approach. If want you want is to be able to bind to a port and respond to requests consider installing node.js and covert your webapp into a node.js app. Here is a good resource for learning node
type: Answer
has comment: http://stackoverflow.com/comment/41494198
has comment: http://stackoverflow.com/comment/41474161
has comment: http://stackoverflow.com/comment/41485897
score: 0
has comment: http://stackoverflow.com/comment/41474999
has comment: http://stackoverflow.com/comment/41474098

http://stackoverflow.com/a/26452740
upvote count: 1
score: 1
has body: You need to prefix the URL with the http:// protocol code. Otherwise, the browser treats it as a relative link.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26452712

http://stackoverflow.com/q/26413675
score: 1
type: Question
tagged with: javascript
has title: How to fix frozen div when using compressor.reduction.value to monitor compression reduction
answer count: 3
has answer: http://stackoverflow.com/a/26433887
upvote count: 1
tagged with: web-audio-api
favorite count: 0
has answer: http://stackoverflow.com/a/26518112
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26492974
has body: My problem is the following. I am attempting to connect the compressor.reduction.value of the compressor node to a div's height so I can monitor the compression reduction effect dynamically. This works fine. The problem is when the audio signal stops the div freezes at its current position. I would like the div to not freeze and have it's height go to zero. The way I fixed this is by using a setInterval that checks for the height of the div and if it remains at exactly the same height for more than a few seconds then the display is set to none effectively hiding the div. Now my question is two fold. First, if there is a better way to do this please share, but irrespective there is one little thing that is irking me that I can't figure out. When I write the code as such it works. However, it looks a bit ugly since the compressor node is outside the play function.......... var compressor = audioContext.createDynamicsCompressor(); soundObj.play = function() { $(".compression-meter").css("display", "block"); var playSound = audioContext.createBufferSource(); compressor.threshold.value = -40; compressor.ratio.value = 20; playSound.buffer = soundObj.soundToPlay; playSound.connect(compressor); compressor.connect(audioContext.destination) playSound.start(audioContext.currentTime); compReductionMeter() } /*______________ Compressor metering __________*/ var cachedMeterValue = null function compReductionMeter() { cachedMeterValue = $(".compression-meter").height() var reduction = compressor.reduction.value; var bar = $(".compression-meter"); bar.height((-1 * reduction) + '%'); requestAnimationFrame(compReductionMeter); }; window.setInterval(function() { if ($(".compression-meter").height() == cachedMeterValue) { console.log("checking compression meter height when matched with cachedMeterValue.It is " + $(".compression-meter").height()) $(".compression-meter").css("display", "none") } }, 2000); When I write the code like this the div doesn't even appear and I am not sure why. …
tagged with: settimeout
downvote count: 0
tagged with: html5-audio

http://stackoverflow.com/q/26430575
has title: How do I use a radio button to send a user to a new website in JavaScript?
has comment: http://stackoverflow.com/comment/41506043
tagged with: javascript
has comment: http://stackoverflow.com/comment/41506229
accepted answer: http://stackoverflow.com/a/26432388
has answer: http://stackoverflow.com/a/26430756
answer count: 2
has comment: http://stackoverflow.com/comment/41505965
has comment: http://stackoverflow.com/comment/41505934
downvote count: 0
possible better answer: http://stackoverflow.com/a/26430756
has comment: http://stackoverflow.com/comment/41506016
favorite count: 0
has comment: http://stackoverflow.com/comment/41506052
has comment: http://stackoverflow.com/comment/41505940
tagged with: http://stackoverflow.com/tag/html
has body: What I want the program to do is make a form and have 2 radio buttons and 1 text. Then I want it to collapse the text and radio value together into one and take me to that page: If I input text with like "facebook" and the radiobutton value is .com I want it to take facebook + .com and send me to that page. A Basic Form Redirection: Where do you want to go? .no .com
has answer: http://stackoverflow.com/a/26432388
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41506078
has comment: http://stackoverflow.com/comment/41506018
score: 1
has comment: http://stackoverflow.com/comment/41506228
has comment: http://stackoverflow.com/comment/41505948
has comment: http://stackoverflow.com/comment/41506236
upvote count: 1
type: Question

http://stackoverflow.com/a/26438898
has comment: http://stackoverflow.com/comment/41523892
has comment: http://stackoverflow.com/comment/41524449
score: 0
has comment: http://stackoverflow.com/comment/41523952
type: Answer
has comment: http://stackoverflow.com/comment/41522288
answers question: http://stackoverflow.com/q/26438466
has body: You can take reference of this link : http://jsfiddle.net/3kgbG/433/ It is working for me. $('.launchConfirm').on('click', function (e) { $('#confirm') .modal({ backdrop: 'static', keyboard: false }) .on('') .one('click', '[data-value]', function (e) { if($(this).data('value')) { //alert('confirmed'); } else { //alert('canceled'); } }); }); $('#confirm').on('shown', function () { $('#txtDemo').val($('#txtDemo').val()); $('#txtDemo').focus(); // do something… }) body, .modal-open .page-container, .modal-open .page-container .navbar-fixed-top, .modal-open .modal-container { overflow-y: scroll; } @media (max-width: 979px) { .modal-open .page-container .navbar-fixed-top{ overflow-y: visible; } } Launch Confirm Do you want to continue? Continue Cancel

http://stackoverflow.com/comment/41655200
type: Comment
type: QuestionComment
has text: Thanks @GenaMoroz @ojovirtual. I changed the onchange event attribute and added `$("select[name='flip-X']")` but not working.
comment on: http://stackoverflow.com/q/26511753
score: 0

http://stackoverflow.com/comment/41553447
type: Comment
comment on: http://stackoverflow.com/a/26456438
type: AnswerComment
has text: @AndréSilva Try the above code and see if that gives you the proper length?
score: 0

http://stackoverflow.com/comment/41542186
type: QuestionComment
type: Comment
has text: @TJ Yes it seems that I try to use a single cookie for both divs. Ιs this wrong? How can I manage multiple divs with cookies?
comment on: http://stackoverflow.com/q/26442698
score: 0

http://stackoverflow.com/q/26433689
has title: Dealing with erroneous Google content keywords
score: -1
favorite count: 0
type: UnansweredQuestion
tagged with: google-analytics
has answer: http://stackoverflow.com/a/26434079
tagged with: wordpress
downvote count: 1
linked to: http://stackoverflow.com/q/3207211
type: Question
answer count: 2
has body: I've been playing a lot closer attention to my website's SEO since a Panda release at the beginning of the year murdered me. One of the things I've noticed is that in Google webmaster tools some of the content keywords it lists are completely bogus. For example these are some highly ranked words that as far as I'm concerned should not be ranked at all. "browser" - Pulled from my noscript message "email" - pulled from a label in the comments section (I'm running WordPress) "JavaScript" - Pulled from my noscript message "address" - Pulled from the comments section is there a way I can get Google to either ignore certain chunks of html, or disregard certain words from it's keyword algorithm?
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26463124
tagged with: http://stackoverflow.com/tag/html
tagged with: seo
linked to: http://stackoverflow.com/q/14314111

http://stackoverflow.com/comment/41370186
has text: This depends how `name` is called. `this` does not always have the same reference, but if you do `this.del()` inside `name`, it will always work.
score: 0
comment on: http://stackoverflow.com/q/26355657
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26501259
tagged with: angularjs
has answer: http://stackoverflow.com/a/26506729
has comment: http://stackoverflow.com/comment/41634432
has comment: http://stackoverflow.com/comment/41634800
accepted answer: http://stackoverflow.com/a/26506729
upvote count: 1
has comment: http://stackoverflow.com/comment/41634494
downvote count: 1
has comment: http://stackoverflow.com/comment/41642795
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41642850
has title: Why the $get method isn't being called?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41634423
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41634866
answer count: 1
has body: I'm trying to write a provider in angular but I can't figure why the $get method isn't being called. I know what it is but I don't know when it's being called by angular, is it when the provider is injected? what do I need to return from there? can anyone make a simple example that demonstrate it? I tried the AngularJS examples but for the life of me I'm getting the same results. var RoutingProvider = (function () { function RoutingProvider() { this.$get = function ($injector) { console.log("do something"); return new RoutingProvider(); }; this.$get.$inject = ['$injector']; } RoutingProvider.prototype.register = function (routes) { console.log(routes); }; return RoutingProvider; })(); EDIT: Here is the example provided by angular documentation. function UnicornLauncher(apiToken, useTinfoilShielding) { this.launchedCount = 0; this.launch = function() { this.launchedCount++; } } bootstrap.provider('unicornLauncher', function UnicornLauncherProvider() { var useTinfoilShielding = false; this.useTinfoilShielding = function(value) { useTinfoilShielding = !!value; }; this.$get = ["apiToken", function unicornLauncherFactory(apiToken) { console.log("foo"); // let's assume that the UnicornLauncher constructor was also changed to // accept and use the useTinfoilShielding argument return new UnicornLauncher(apiToken, useTinfoilShielding); }]; }); bootstrap.config(["unicornLauncherProvider", function(unicornLauncherProvider) { unicornLauncherProvider.useTinfoilShielding(true); }]); Here is the plunk I made which demonstrates it. Again, I can't see the printed message coming from the $get function.
favorite count: 0
has comment: http://stackoverflow.com/comment/41642832

http://stackoverflow.com/q/26417984
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
has body: I want to use Font Awesome along with AngularJS to create checkbox. I want to use it in such a manner that I don't have to write much JavaScript to make it work. I have tried this so far. &lt;li ng-repeat="item in items" ng-class="{'fa fa-check':isSelected(item)}"&gt; &lt;/li&gt; I want to use fa-dot-circle-o class for selected radio and fa-circle-o for unselected radio. I also want to change the color of of these icons from black to blue.
tagged with: font-awesome
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26420275
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26420275
tagged with: css
has title: Using Font Awesome with AngularJs to create checkboxes

http://stackoverflow.com/a/26453366
has comment: http://stackoverflow.com/comment/41547693
upvote count: 2
has comment: http://stackoverflow.com/comment/41547820
has comment: http://stackoverflow.com/comment/41547646
has comment: http://stackoverflow.com/comment/41548050
has body: I don't think there is a need of regex here. You can just do it like this var str = "Hell no yes", match = null, no = str.indexOf("no"), yes = str.indexOf("yes"); if(no &gt;= 0 &amp;&amp; (yes &lt; 0 || no &lt; yes)) { // check that no doesn't exist before yes match = str.match(/yes/)[0]; // then match the "yes" }
has comment: http://stackoverflow.com/comment/41547664
has comment: http://stackoverflow.com/comment/41547764
has comment: http://stackoverflow.com/comment/41547731
downvote count: 0
answers question: http://stackoverflow.com/q/26453329
has comment: http://stackoverflow.com/comment/41547526
type: Answer
has comment: http://stackoverflow.com/comment/41547588
has comment: http://stackoverflow.com/comment/41547841
has comment: http://stackoverflow.com/comment/41547678
has comment: http://stackoverflow.com/comment/41547855
score: 2
has comment: http://stackoverflow.com/comment/41547698

http://stackoverflow.com/a/26430756
has comment: http://stackoverflow.com/comment/41507706
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41507342
has comment: http://stackoverflow.com/comment/41506459
answers question: http://stackoverflow.com/q/26430575
has comment: http://stackoverflow.com/comment/41506408
has comment: http://stackoverflow.com/comment/41507037
upvote count: 3
has comment: http://stackoverflow.com/comment/41507993
has comment: http://stackoverflow.com/comment/41506312
has body: Change type="submit" to type="button". Change this line: &lt;input type="submit" id="submit" name="submit" value="Submit" onclick="go()"&gt; to: &lt;input type="button" id="submit" name="submit" value="Submit" onclick="go()"&gt; In this case you don't need to submit a form. You are just trying to redirect the url. You didn't specify where to submit the form so it is submitting to itself that is your problem.
has comment: http://stackoverflow.com/comment/41508091
has comment: http://stackoverflow.com/comment/41507776
has comment: http://stackoverflow.com/comment/41507079
type: Answer
has comment: http://stackoverflow.com/comment/41508900

http://stackoverflow.com/q/26486877
type: Question
downvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26487031
answer count: 2
has body: i am a bee on PHP and i want a solution to switch between two pages on when selecting a radio button with out submit the page or redirecting the page ? Which one is the more appropriate way javascript or php ? Please help me with a suitable example.Thank you.
has comment: http://stackoverflow.com/comment/41608193
has title: Switching between pages on selecting the radio button without redirect or submit
has answer: http://stackoverflow.com/a/26486981
favorite count: 0
upvote count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41608064
score: -5

http://stackoverflow.com/comment/41424221
type: AnswerComment
type: Comment
has text: @Ziggy31 Did you get this figured out? If not, let me know and I will check out your fiddle.
comment on: http://stackoverflow.com/a/26367997
score: 0

validation
tags question: http://stackoverflow.com/q/26504303
tags question: http://stackoverflow.com/q/26454152
tags question: http://stackoverflow.com/q/26459240
tags question: http://stackoverflow.com/q/26391088
tags question: http://stackoverflow.com/q/26427054
tags question: http://stackoverflow.com/q/26433014
tags question: http://stackoverflow.com/q/26502550
tags question: http://stackoverflow.com/q/26481820
tags question: http://stackoverflow.com/q/26404836
tags question: http://stackoverflow.com/q/26417772
tags question: http://stackoverflow.com/q/26359861
type: Tag
tags question: http://stackoverflow.com/q/26443182
tag name: validation
tags question: http://stackoverflow.com/q/26388648
tags question: http://stackoverflow.com/q/26371929
tags question: http://stackoverflow.com/q/26499160
tags question: http://stackoverflow.com/q/26366868
tags question: http://stackoverflow.com/q/26448457
tags question: http://stackoverflow.com/q/26362622
tags question: http://stackoverflow.com/q/26406273
tags question: http://stackoverflow.com/q/26500534
tags question: http://stackoverflow.com/q/26356096
tags question: http://stackoverflow.com/q/26431463
tags question: http://stackoverflow.com/q/26389264
tags question: http://stackoverflow.com/q/26483812
tags question: http://stackoverflow.com/q/26451010
tags question: http://stackoverflow.com/q/26464350
tags question: http://stackoverflow.com/q/26437189
tags question: http://stackoverflow.com/q/26436253
tags question: http://stackoverflow.com/q/26453057
tags question: http://stackoverflow.com/q/26513548
tags question: http://stackoverflow.com/q/26488693
tags question: http://stackoverflow.com/q/26442603
tags question: http://stackoverflow.com/q/26457908
tags question: http://stackoverflow.com/q/26469798
tags question: http://stackoverflow.com/q/26467526
tags question: http://stackoverflow.com/q/26441793

http://stackoverflow.com/comment/41371591
type: Comment
type: QuestionComment
score: 0
has text: Already tried toggleClass, it starts to add/remove the classes randomly.
comment on: http://stackoverflow.com/q/26356310

http://stackoverflow.com/q/26391974
has title: Calling a prototype method while preserving state
has answer: http://stackoverflow.com/a/26392034
accepted answer: http://stackoverflow.com/a/26392034
has answer: http://stackoverflow.com/a/26392032
tagged with: javascript
score: 0
answer count: 2
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41442787
favorite count: 0
possible better answer: http://stackoverflow.com/a/26392032
linked to: http://stackoverflow.com/q/16063394
type: AnsweredQuestion
has body: I'm having trouble making a recursive call in this prototype method. The console prints: count 1 (index):30 Uncaught ReferenceError: count is not defined Instead, I need it to print: count 1 (index):30 count 2 (index):30 ... var MyClass, mc; MyClass = (function() { function MyClass() { this.count = 1; } MyClass.prototype.method = function() { console.log("count", this.count); this.count++; if (count === 2) { method(); } }; return MyClass; })(); mc = new MyClass(); mc.method(); http://jsfiddle.net/audfmotf/
type: Question

http://stackoverflow.com/comment/41520126
comment on: http://stackoverflow.com/q/26437614
has text: honestly i would say none, as its just a mock form for us to add the popup to.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26437338
has comment: http://stackoverflow.com/comment/41521159
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26437124
downvote count: 0
type: Answer
has body: By default, the year range starts 10 years ago and ends on 10 years from now, having the current year selected. This and other settings can be overwritten on widget initialization: options = { pattern: 'yyyy-mm', // Default is 'mm/yyyy' and separator char is not mandatory selectedYear: 2010, startYear: 2008, finalYear: 2012, monthNames: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'] }; $('#custom_widget').monthpicker(options); You can try this. This is working for me. $('#my_widget').monthpicker('disableMonths', [1, 2, 11, 12]); $('#my_widget').monthpicker('disableMonths', []); // re-enables all months Reference From : Month Picker Jquery

http://stackoverflow.com/a/26505717
accepted answer of: http://stackoverflow.com/q/26504609
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41675248
has comment: http://stackoverflow.com/comment/41642695
type: Answer
has comment: http://stackoverflow.com/comment/41672134
has comment: http://stackoverflow.com/comment/41674908
answers question: http://stackoverflow.com/q/26504609
has comment: http://stackoverflow.com/comment/41674246
has comment: http://stackoverflow.com/comment/41642735
has comment: http://stackoverflow.com/comment/41672573
has comment: http://stackoverflow.com/comment/41672777
has comment: http://stackoverflow.com/comment/41673741
has body: The problem is with this line of code $('.subitem').attr('title', $('.statusRollup').remove().html()) .html() gets the HTML contents of the first element in the set of matched elements so you are assigning the content inside the first &lt;div class="statusRollup"&gt; to all elements with class=".subitem" Try $('.subitem').each(function() { // Get the contents of the next element with class=statusRollup var status = $(this).closest('.item').next('.statusRollup').html(); $(this).attr('title', status); }); $('.statusRollup').remove();
has comment: http://stackoverflow.com/comment/41674358
has comment: http://stackoverflow.com/comment/41675281
has comment: http://stackoverflow.com/comment/41674409
score: 0

http://stackoverflow.com/q/26437475
type: Question
type: AnsweredQuestion
tagged with: reverse-geocoding
has title: Geocoder is automatically panning google map to the left
tagged with: google-maps
has comment: http://stackoverflow.com/comment/41520990
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41520531
has comment: http://stackoverflow.com/comment/41521489
score: 0
has body: I am creating a page with a marker that stays fixed at the center of a map, even if the user pans/zoom the map. When the user clicks on the marker it shows the full address of the marker. The problem is that the infoWindow.setContent() shows a string when I supply one, but pans the map to the left (and doesnt show the infoWindow) when I supply results[0].formatted_address. The code below is the reverse geocoding I have. The alert function (which I have uncommented) shows the address correctly. var geocoder = new google.maps.Geocoder(); geocoder.geocode({'latLng': input}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[0]) { //alert(results[0].formatted_address); infoWindow.setContent(results[0].formatted_address); infoWindow.open(map,marker); } else { alert('No results found'); } } else { alert('Geocoder failed due to: ' + status); } }); And my complete Javascript Code is: var map; var marker; var infoWindow = new google.maps.InfoWindow(); function initialize() { function setUpMap(){ var mapOptions = { zoom: 14, center: new google.maps.LatLng(22.519422, 88.35741400000006), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map_canvas'),mapOptions); google.maps.event.addListener(map, 'center_changed', function() { removeMarker(); }); google.maps.event.addListener(map, 'idle', function() { setMarker(); }); } function removeMarker(){ marker.setMap(null); } function setMarker(){ marker = new google.maps.Marker({ position: map.getCenter(), map: map, title:"Hello World!" }); google.maps.event.addListener(marker, 'click', function() { var input = marker.getPosition(); var geocoder = new google.maps.Geocoder(); geocoder.geocode({'latLng': input}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[0]) { //alert(results[0].formatted_address); infoWindow.setContent(results[0].formatted_address); infoWindow.open(map,marker); } else { alert('No results found'); …
has comment: http://stackoverflow.com/comment/41521050
has comment: http://stackoverflow.com/comment/41521487
has answer: http://stackoverflow.com/a/26439166
accepted answer: http://stackoverflow.com/a/26439166
has comment: http://stackoverflow.com/comment/41521257

http://stackoverflow.com/comment/41495882
comment on: http://stackoverflow.com/q/26425301
has text: Could you give a basic demo of this in a snippet including basic js / HTML / CSS?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42938329
type: Comment
comment on: http://stackoverflow.com/a/27212523
has text: I'm not moving away from my main page, by views I mean polymer elements. Those elements usually coexist in the main page, some of them may be hidden but that's all. As for defining the model directly in the main page, that would create circular dependencies as the main page would need to import the views and the views need to import the main page in return. Else how do you get a handle on the model from the views?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41401354
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26372111
type: AnswerComment
has text: Hi! Could you look at this http://jsfiddle.net/8d89ecdw/ I do got `function Super() {}` logged twice. But they are the newest prototypes. It should log `Super {}` twice I think..

http://stackoverflow.com/comment/41512397
score: 0
comment on: http://stackoverflow.com/a/26433635
has text: Maybe `mozColumnWidth` or `MozColumnWidth` will work. The latter definitely works.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26354147
has body: Call find on the newDiv, instead of all inputs within #education. Updated fiddle newDiv.find('input:text').val(''); var ed = 1; function new_education() { ed++; var newDiv = $('#education div:first').clone(); newDiv.attr('id', ed); var delLink = ' Delete Education ' + ed + ' '; newDiv.find('tr:first th').text('Education ' + ed); newDiv.append(delLink); newDiv.find('input:text').val(''); // <----------- added this $('#education').append(newDiv); } function deled(eleId) { d = document; var ele = d.getElementById(eleId); var parentEle = d.getElementById('education'); parentEle.removeChild(ele); //ed--; } Education Education 1 School Name Degree Type Degree Field Add New Education
accepted answer of: http://stackoverflow.com/q/26354104
answers question: http://stackoverflow.com/q/26354104
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41552642
comment on: http://stackoverflow.com/a/26455992
type: AnswerComment
type: Comment
has text: If `array2` is not necessarily the largest array, this approach could ignore the last numbers of `array1`.
score: 1

http://stackoverflow.com/comment/41574203
type: Comment
score: 1
has text: your JSON is invalid, you have an extra closing curly brace.
type: QuestionComment
comment on: http://stackoverflow.com/q/26468283

http://stackoverflow.com/a/26396076
has body: You have not used any id with , use id="myForm", then reset button will work perfectly. Close your validate function properly. You have not add any place for showing your result.
upvote count: 1
answers question: http://stackoverflow.com/q/26395842
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/26432866
type: UnansweredQuestion
tagged with: forms
has body: I'm creating a scoring ballot to score submitted contest videos. I use the same HTML form for all videos to score. The only fields that are being dynamically updated with java script are: judge name and a contestant name. My problem is the value that I set up with java script is showing on the form itself but is not recorded in a csv file. Here is my HTML: Select your name Judge#1 Judge#2 Judge#3 Judge#4 Judge#5 Judge#6 Based on this option select they would get a set of videos they have not completed scoring on, and first scoring form with video embedded is displayed. Initially they are hidden on the page. &lt;form id="ballot1" action="javascript: sendBallot()" method="post" enctype="multipart/form-data"&gt; &lt;table border="0" style="border-collapse: collapse" width="100%" id="table3"&gt; &lt;tr&gt; &lt;td&gt;&lt;input type="hidden" name="Contestant" value="Contestant1"&gt;&lt;/td&gt; &lt;td width="78%"&gt;&lt;input name="form_judge" id="form_judge" value=""&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;p&gt;&lt;span style="font-size:1em;"&gt;&lt;strong&gt;1. Efficacy of Practice - 50%&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;label class="ballot"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;a. Video explores relevant subject matter &lt;/label&gt; &lt;/td&gt; &lt;td&gt; &lt;select class="ballot" id="one_a_score" name="one_a_score" valign="bottom"&gt; &lt;option value="0" selected&gt;Select Score&lt;/option&gt; &lt;option value="2"&gt;Poor&lt;/option&gt; &lt;option value="4"&gt;Below average&lt;/option&gt; &lt;option value="6"&gt;Average&lt;/option&gt; &lt;option value="8"&gt;Good&lt;/option&gt; &lt;option value="10"&gt;Excellent&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;div class="buttons"&gt; &lt;input type="submit" name="submit" value="Submit Form" id="submit"/&gt; &lt;input type="reset" value="Reset" id="resetBtn"/&gt; &lt;/div&gt; My java script to set up the form values: function showBallo…
type: Question
score: 0
answer count: 1
tagged with: javascript
has title: settin up a text input value with Javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: submit
has answer: http://stackoverflow.com/a/26433078

http://stackoverflow.com/comment/122785798
comment on: http://stackoverflow.com/a/26498702
has text: Has anyone managed to do this with mdb5 autocomplete?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26355740
accepted answer of: http://stackoverflow.com/q/26355291
has body: Scroll Bottom on docReady You can add an hashtag to your Foo a url like: [yourlink]#scrollBottom Click Me and in the first page not add any JS, in the destination page add this code: $(function(){ if(location.hash.indexOf("scrollBottom") >= 0) $('html, body').delay(1000).animate({ scrollTop: $("body").height() }, 'slow'); }) with this, if there is an hashtag #scrollBottom in the URL, page scrolls to bottom after 1 second (one second to show you the delay, set what you like). add Hashtah dynamically on click You can add #hashtag dynamically when someone click Foo a edit your handler: $(document).ready(function () { $('.Foo a').click(function (e) { e.prevemtDefault(); location.href = $(this).attr("href") + "#scrollBottom"; }); }); or $(document).ready(function () { $('.Foo a').click(function () { $(this).attr("href", $(this).attr("href") + "#scrollBottom"); }); }); #scrollBottom is just an example, you can use one whatsoever. :) try...
has comment: http://stackoverflow.com/comment/41370391
answers question: http://stackoverflow.com/q/26355291
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41370543
type: Answer

http://stackoverflow.com/q/26430628
type: Question
has comment: http://stackoverflow.com/comment/41506740
accepted answer: http://stackoverflow.com/a/26430835
has comment: http://stackoverflow.com/comment/41506881
has title: ScrollTo() function is not working properly with sections
tagged with: javascript
score: 0
answer count: 1
has body: I have a series of sections on an application that I just finished developing. I'm using the scrollTo plugin for jQuery. It's always worked nicely in the past for me. What the application is suppose to do is the following: All sections load and the first section immediately expands, everything else remains collapsed (this works) You can click on another section, and the section that is currently open will collapse, and the one you clicked will expand (this works) After expansion is completed, the window will scroll to the top of the expanded section (this does not work) I need help on step three there. My code is below. I have searched for various topics on the scrollTo() plugin and the the use of ScrollTop. I have tried both, but nothing has changed. I'm wondering if it has something to do with when the toggle function is called but I"m not sure. I'm really hoping to find an answer here. If you need further explanation or code, please let me know! //module expansion and contraction $('.module-heading').click(function(){ var id = $(this).attr('id'); var data = $(this).data('toggle'); $('.app-section').each(function(){ if($(this).is(':visible')){ $(this).toggle('slow'); } }) $(data).toggle('slow', function(){ $(id).scrollTo(100); }); }); Here is sample HTML as well Pre-Application Questionaire Here is a link to a fiddle http://jsfiddle.net/5q48n0z1/4/
has comment: http://stackoverflow.com/comment/41506654
tagged with: jquery
has comment: http://stackoverflow.com/comment/41506429
favorite count: 0
has comment: http://stackoverflow.com/comment/41506352
has comment: http://stackoverflow.com/comment/41506686
has comment: http://stackoverflow.com/comment/41506368
has answer: http://stackoverflow.com/a/26430835
has comment: http://stackoverflow.com/comment/41506611
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/41506994
downvote count: 2
has comment: http://stackoverflow.com/comment/41506770

http://stackoverflow.com/a/26463937
answers question: http://stackoverflow.com/q/26463861
has body: You're calling event.preventDefault();. This prevents the default functionality of the event, and ultimately prevents your link from being fired. If you need this functionality in place for the other a elements in your footer, I suggest you add a class name specifically to those and modify your event handler to only apply to those elements: ... ... ... $('footer > ul > li a.prevent-default').click(function(event) { event.preventDefault(); ... }); JSFiddle demo.
type: Answer
has comment: http://stackoverflow.com/comment/41566812
has comment: http://stackoverflow.com/comment/41566774
score: 0
has comment: http://stackoverflow.com/comment/41566534
has comment: http://stackoverflow.com/comment/41566495

http://stackoverflow.com/comment/41601751
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26424568
type: Comment
has text: Thanks Lossleader, would I then set this up as an event conversion with the campaign hubspot1.

http://stackoverflow.com/a/26449914
type: AcceptedAnswer
has body: I have accomplished this many times by placing all related HTML elements inside a container DIV and using ng-show. For your example, I would create a DIV for current and savings account types (ng-show="user.account_type===current||user.account_type===savings") and another DIV for all leasing and insurance account types (ng-show="user.account_type===leasing||user.account_type===insurance"). If the logic gets more complicated than a small JavaScript snippet then I move it into a $scope method such as isCurrentOrSavingsAccount().
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26449824
answers question: http://stackoverflow.com/q/26449824

http://stackoverflow.com/a/26554118
upvote count: 10
type: Answer
has comment: http://stackoverflow.com/comment/74427175
downvote count: 0
has body: Does this help? Dropzone.options.myDropzone = { init: function() { thisDropzone = this; this.on("success", function(file, responseText) { var responseText = file.id // or however you would point to your assigned file ID here; console.log(responseText); // console should show the ID you pointed to // do stuff with file.id ... }); } }; For example, I have mine set up to attach the server path to the image name and pass this as a value into a form field on submit. As long as you define responseText to point to the file ID you should get a return on this. This link might be helpful as well: https://github.com/enyo/dropzone/issues/244
has comment: http://stackoverflow.com/comment/44351840
has comment: http://stackoverflow.com/comment/74404560
score: 10
answers question: http://stackoverflow.com/q/26421731

http://stackoverflow.com/comment/41525422
type: QuestionComment
has text: @colonelsanders I don't want the `id=93` to be visible in the url.
comment on: http://stackoverflow.com/q/26441052
score: 0
type: Comment

http://stackoverflow.com/q/26393369
tagged with: mootools
type: Question
has comment: http://stackoverflow.com/comment/41440799
has title: MooTools-Core: uncaught TypeError: undefined is not a function
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41441026
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41440890
upvote count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/41440851
accepted answer: http://stackoverflow.com/a/26399742
type: AnsweredQuestion
has body: I have this code function: window.addEvent('domready', function() { $('myForm').addEvent('submit', function(e) { var content = CKEDITOR.instances['comment'].getData(); $('comment').setProperty('value',content) e.stop(); var log = $('log_res').empty().addClass('ajax-loading'); this.set('send', {onComplete: function(response) { log.removeClass('ajax-loading'); log.set('html', response); }}); this.send(); }); }); im getting: Uncaught TypeError: undefined is not a function currently using: mootools-core: 1.5.1
has answer: http://stackoverflow.com/a/26399742

http://stackoverflow.com/q/26417029
tagged with: javascript
has title: Extjs grid cell editor jumps away from cell
favorite count: 0
tagged with: extjs
has answer: http://stackoverflow.com/a/26428976
score: 3
upvote count: 3
has body: Im having this issue in Extjs grid editing. When I tab from a dropdown editor to a textarea editor, the textarea editor jumps down the screen, away from the cell I should be editing: I have no idea how to fix this. It only happens 1/2 of the time, so I believe there is some race condition, but Im not sure. Ive spent a lot of time debugging and stepping through the editing code and the textarea starts out in the grid cell, but some event fires or something and it then moves.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26428976
tagged with: appsdk2
type: Question
answer count: 1
downvote count: 0
tagged with: rally

http://stackoverflow.com/comment/41529372
comment on: http://stackoverflow.com/q/26443167
has text: The problem is because you're ending the mysqli connection before calling the function. As @MarkBaker said.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41372678
type: Comment
type: QuestionComment
has text: you have fault in your script coping address or posting values to another page??
comment on: http://stackoverflow.com/q/26356869
score: 0

http://stackoverflow.com/comment/41562191
type: Comment
has text: @Cerbrus: :-) The only way that doesn't completely replace the object, perhaps.
type: AnswerComment
comment on: http://stackoverflow.com/a/26461609
score: 0

http://stackoverflow.com/comment/41372142
has text: I have two types of `sub_menu`: the first one slide to the right, the other one to the left. That's why I set `left` outside of `animate`
comment on: http://stackoverflow.com/a/26356326
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41495580
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26410283
has text: @ps0604 Not to get into a long discussion here, by why not? It's a valid use of the attributes according to the standards.
score: 0

http://stackoverflow.com/a/26461401
has body: Try this out... $(document).ready(function(){ // When DOM is ready... $('input').on('change',function(){ // Every Input field would get into this Event... to change only for id=input_1 -> '#input_1' //Alternative to 'change' would be 'keyup', because change is only called when the input field losts his focus... alert(this.id); switch(this.id) { case 'input_1': alert('input 1!'); break; case 'input_2': alert('input 2!'); break; //.... } }); }); Greetings
score: 0
answers question: http://stackoverflow.com/q/26461210
type: Answer

http://stackoverflow.com/comment/41464936
has text: http://crypto.stackexchange.com/questions/8112/is-this-scheme-a-provably-fair-random-number-generation
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26408145
score: 0

http://stackoverflow.com/a/26464351
has body: Try: $.each($('selector'), function() { $(this)append($(this).index()); });
type: Answer
answers question: http://stackoverflow.com/q/26464272
score: 0

http://stackoverflow.com/q/26358066
score: 0
has title: submit done only after two click
has answer: http://stackoverflow.com/a/26358386
accepted answer: http://stackoverflow.com/a/26358129
type: Question
possible better answer: http://stackoverflow.com/a/26358386
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26358129
answer count: 2
has body: i need to check the value before submit so i tried the two method to do so but the same problem the problem is that user need to click once again after check is true i tried with chrome , firefox and IE and the same problem always here index.php Num <?php echo (isset($_POST['submit']))?'submit done':''; ?> and here check.php <?php echo ($_POST['num']==1)?'true':'false'; ?>
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41684536
type: Comment
comment on: http://stackoverflow.com/a/26520638
score: 0
type: AnswerComment
has text: Hi, thanks for the suggestion, unfortunately this did not work for me either. I'm currently trying to use preg_replace to change a \" to a \"". This isn't working currently, do you have any ideas? So far I've got: $pattern = '(\\\")'; $replacement = '\\\ "'; preg_replace($pattern, $replacement, $js_code); which converts it to \ "" which also isn't correct due to the space, any ideas how I can replace it with a \"" ?

http://stackoverflow.com/comment/41561600
comment on: http://stackoverflow.com/q/26461031
score: 0
type: QuestionComment
has text: Yeah, exactly! Nice discovery ;))
type: Comment

http://stackoverflow.com/a/26425405
downvote count: 0
score: 4
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26425083
answers question: http://stackoverflow.com/q/26425083
type: Answer
has comment: http://stackoverflow.com/comment/41496335
upvote count: 4
has body: You have used redirect_to action: "course_page1", format: "html" and return which is not right. Redirection will work fine if it was an html request but not ajax. So if you want to redirect despite the fact that the request was an ajax, use may something like this format.js { render :js =&gt; "window.location.href = '#{course_page_path}'" } Or remove the remote: true attribute from the link so it would work just fine. Hope that helps

http://stackoverflow.com/q/26459022
has answer: http://stackoverflow.com/a/26459120
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
has comment: http://stackoverflow.com/comment/41557934
type: Question
tagged with: object
score: -2
has comment: http://stackoverflow.com/comment/41557837
tagged with: javascript
linked to: http://stackoverflow.com/q/500606
answer count: 1
linked to: http://stackoverflow.com/q/9187337
has comment: http://stackoverflow.com/comment/41557845
favorite count: 0
has title: How can I delete a target json by key value?
has body: [Object, Object, Object, Object] Object{ id:33, val:'a' }, Object{ id:56, val:'b' }, Object{ id:77, val:'a' }, Object{ id:89, val:'d' } Now I want to delete the Object where id = 56 How can I do that using js? There is the result I want. [Object, Object, Object] Object{ id:33, val:'a' }, Object{ id:77, val:'a' }, Object{ id:89, val:'d' } Thanks.
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41557813

http://stackoverflow.com/q/26405927
has answer: http://stackoverflow.com/a/26406133
type: Question
possible better answer: http://stackoverflow.com/a/26406430
has answer: http://stackoverflow.com/a/26406430
downvote count: 0
tagged with: javascript
has body: I have a input and two radio buttons. The input accepts a number for a time period a person lives at a residence. The radio buttons are months &amp; years. I want to fill a 2nd input using the 1st input value (numerical value of length at residence) and either the value for months or years based on the radio selected. I've made it spit out the time, but it spits out the value for both radio button because I did not have an if statement to check. I already have jquery in my form and it works. I just need this small section of my form to work. My question is, how do I set up the conditional statement for checking what radio is checked? HTML &lt;input type="number" value="" required maxlength="5" class="form-control" name="homeLength" id="homeLength"&gt; &lt;input type="radio" id="years" value="Years" name="length" required&gt; Years &lt;input type="radio" id="months" value="Months" name="length"&gt; Months jQuery $('#months').click(function () { if ($(this).attr("checked") == "checked") { $('#homeLength, #months').bind('keypress blur', function () { $('#homeTime').val($('#homeLength').val() + ' ' + ' ' + $('#months').val() + ' ' + ' '); }); } }); $('#years').click(function () { if ($(this).attr("checked") == "checked") { $('#homeLength, #years').bind('keypress blur', function () { $('#homeTime').val($('#homeLength').val() + ' ' + ' ' + $('#years').val() + ' '); }); } });
tagged with: jquery
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/26406172
has comment: http://stackoverflow.com/comment/41461080
upvote count: 1
type: AnsweredQuestion
score: 1
has title: fill input if radio is selected using jquery
accepted answer: http://stackoverflow.com/a/26406172

http://stackoverflow.com/a/26408658
type: Answer
has body: More complex variant if (!(sex == 'm' || sex == 'f')) { check = 1; error= error + " Please enter a valid sex \n"; }
score: 0
answers question: http://stackoverflow.com/q/26408429

http://stackoverflow.com/q/26427707
has comment: http://stackoverflow.com/comment/41509625
has title: Checking argument names inside a function
type: Question
tagged with: function
has body: Is there a way in javascript to check an arguments identifier name inside a function ??? for example: var config = function(callback){ if(callback.definedArgumentName == 'argumentName') //do something }; config(function(argumentName){ //do something }); I am asking if there is something that can replace -callback.definedArgumentName- in this example.
answer count: 1
has comment: http://stackoverflow.com/comment/41501017
tagged with: javascript
tagged with: callback
score: 0
has answer: http://stackoverflow.com/a/26432939
tagged with: arguments
tagged with: identifier
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41509554
has comment: http://stackoverflow.com/comment/41501833

http://stackoverflow.com/comment/41632140
score: 0
type: QuestionComment
type: Comment
has text: Further to sean's remark, properly placed `console.log(ajax.responseText)` might be insightful as well.
comment on: http://stackoverflow.com/q/26499879

http://stackoverflow.com/a/26466646
accepted answer of: http://stackoverflow.com/q/26431958
has comment: http://stackoverflow.com/comment/114525715
has comment: http://stackoverflow.com/comment/49819932
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/72437503
type: Answer
score: 13
answers question: http://stackoverflow.com/q/26431958
has comment: http://stackoverflow.com/comment/50476566
upvote count: 13
has body: Just needed to fiddle more. var escaped = query.replace(/([\!\*\+\&amp;\|\(\)\[\]\{\}\^\~\?\:\"])/g, "\\$1"); Globally replace all instances of the chars lucene would yell about with their escaped version.

http://stackoverflow.com/comment/84221429
type: Comment
has text: And don't forget to set the :docinfo: attribute in your adoc, to the corresponding value! (also explained in the docs linked by @LightGuard)
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26478439

http://stackoverflow.com/a/26416408
type: AcceptedAnswer
score: 0
has body: You can either use: style: 'overflow: hidden; text-overflow: ellipsis;' // or style: { overflow: 'hidden', 'text-overflow': 'ellipsis' }
type: Answer
accepted answer of: http://stackoverflow.com/q/26416253
answers question: http://stackoverflow.com/q/26416253

http://stackoverflow.com/comment/41509153
has text: And you can't construct a date from just a month value. If you give it a single parameter, it will be interpreted as milliseconds epoch time. Again - read the docs.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26432246

http://stackoverflow.com/q/26397830
accepted answer: http://stackoverflow.com/a/26398018
has comment: http://stackoverflow.com/comment/41446830
tagged with: razor
has title: How to display the tooltip in exact location with in the table?
tagged with: asp.net-mvc-4
type: AnsweredQuestion
tagged with: asp.net-mvc-3
type: Question
tagged with: javascript
score: 0
has body: I have a table were the row is being looped and and for some instance I want to hover the mouse of one of its tr under the td with a class="updeltd" and display a div element as its tooltip. My problem is when I hover the mouse on that td I can only be able to display my tooltip on the first row of the table instead of the row where I put the mouse. I think I have a problem on my javascript function. Here's the details, Thanks... jQuery/Javascript function: function DispTooltip() { var ttipshow = document.getElementById("tooltip"); ttipshow.style.display = "block"; var coord = $(this).closest('table').find('td[class="updeltd"]').offset(); $('#tooltip').css({ top: coord.top, left: coord.left - 345 }); } Tooltip: This is my tooltip HTML View: @Html.DisplayNameFor(model => model.ID) @Html.DisplayNameFor(model => model.Name) @Html.DisplayNameFor(model => model.Address) @Html.DisplayNameFor(model => model.Age) @Html.DisplayNameFor(model => model.Occupation) @Html.DisplayNameFor(model => model.Nationality) @foreach (var item in Model) { @Html.DisplayFor(modelItem => item.ID) @Html.DisplayFor(modelItem => item.Name) @Html.DisplayFor(modelItem => item.Address) @Html.DisplayFor(modelItem => item.Age) @Html.DisplayFor(modelItem => item.Occupation) item.Nationality)" style="display:none" /> @Html.DisplayFor(modelItem => item.Nationality) @Html.ActionLink("Edit/Delete Records", "UpdateDeleteRec", new { id=item.ID}) }
answer count: 1
has answer: http://stackoverflow.com/a/26398018
tagged with: jquery

http://stackoverflow.com/comment/41482667
type: QuestionComment
score: 0
has text: Can you console.log the arrays? Perhaps you are missing a \n
comment on: http://stackoverflow.com/q/26417772
type: Comment

http://stackoverflow.com/comment/41548276
type: AnswerComment
comment on: http://stackoverflow.com/a/26449428
type: Comment
has text: Yeah. That's due the way `XMLHttpRequest` API has been specified. See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest for some nice extra info.
score: 0

http://stackoverflow.com/q/26402534
favorite count: 0
has answer: http://stackoverflow.com/a/26408784
answer count: 9
has answer: http://stackoverflow.com/a/61575658
has answer: http://stackoverflow.com/a/57233335
has body: What is the angular's $watch function equivalent in React.js? I want to listen state changes and call a function like getSearchResults(). componentDidMount: function() { this.getSearchResults(); }
has answer: http://stackoverflow.com/a/65685109
score: 222
type: AnsweredQuestion
has title: How to listen state changes in react.js?
downvote count: 0
has answer: http://stackoverflow.com/a/26414427
accepted answer: http://stackoverflow.com/a/26414427
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/52200418
tagged with: javascript
has answer: http://stackoverflow.com/a/64510846
upvote count: 222
has answer: http://stackoverflow.com/a/35648197
has answer: http://stackoverflow.com/a/74587350
possible better answer: http://stackoverflow.com/a/26408784

http://stackoverflow.com/comment/41398105
type: Comment
score: 2
has text: @0__ I did not say that you cannot have a `val` which is a closure. That is allowed.
type: AnswerComment
comment on: http://stackoverflow.com/a/26370251

http://stackoverflow.com/a/26507226
score: 0
has body: You should create an option element in DOM and add that to your list, like in: var oSelect = document.getElementById("positions"); var oOption = document.createElement("option"); oOption.text = "Next option"; oSelect.add(oOption);
type: Answer
answers question: http://stackoverflow.com/q/26506965

http://stackoverflow.com/comment/41402646
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26372672
score: 1
has text: @colonelsanders pointed out the key issue with the code, which I found in my solution posted below. The small white border is probably due to the default browser style sheet.

http://stackoverflow.com/comment/41644696
comment on: http://stackoverflow.com/q/26506965
type: QuestionComment
type: Comment
score: 2
has text: Instead of building the literal HTML, use [createElement](https://developer.mozilla.org/en-US/docs/Web/API/document.createElement) and [appendChild](https://developer.mozilla.org/en-US/docs/Web/API/Node.appendChild)

jquery
tags question: http://stackoverflow.com/q/26493913
tags question: http://stackoverflow.com/q/26477597
tags question: http://stackoverflow.com/q/26407720
tags question: http://stackoverflow.com/q/26391218
tags question: http://stackoverflow.com/q/26486838
tags question: http://stackoverflow.com/q/26511432
tags question: http://stackoverflow.com/q/26361541
tags question: http://stackoverflow.com/q/26473891
tags question: http://stackoverflow.com/q/26359595
tags question: http://stackoverflow.com/q/26499999
tags question: http://stackoverflow.com/q/26402420
tags question: http://stackoverflow.com/q/26386004
tags question: http://stackoverflow.com/q/26509216
tags question: http://stackoverflow.com/q/26428355
tags question: http://stackoverflow.com/q/26485018
tags question: http://stackoverflow.com/q/26426360
tags question: http://stackoverflow.com/q/26506138
tags question: http://stackoverflow.com/q/26504590
tags question: http://stackoverflow.com/q/26393630
tags question: http://stackoverflow.com/q/26426241
tags question: http://stackoverflow.com/q/26409596
tags question: http://stackoverflow.com/q/26498747
tags question: http://stackoverflow.com/q/26502576
tags question: http://stackoverflow.com/q/26413422
tags question: http://stackoverflow.com/q/26444503
tags question: http://stackoverflow.com/q/26490915
tags question: http://stackoverflow.com/q/26406575
tags question: http://stackoverflow.com/q/26438974
tags question: http://stackoverflow.com/q/26493142
tags question: http://stackoverflow.com/q/26502805
tags question: http://stackoverflow.com/q/26394224
tags question: http://stackoverflow.com/q/26476777
tags question: http://stackoverflow.com/q/26428655
tags question: http://stackoverflow.com/q/26443944
tags question: http://stackoverflow.com/q/26483617
tags question: http://stackoverflow.com/q/26492191
tags question: http://stackoverflow.com/q/26456001
tags question: http://stackoverflow.com/q/26463790
tags question: http://stackoverflow.com/q/26459042
tags question: http://stackoverflow.com/q/26452901
tags question: http://stackoverflow.com/q/26481820
tags question: http://stackoverflow.com/q/26387637
tags question: http://stackoverflow.com/q/26407429
tags question: http://stackoverflow.com/q/26357072
tags question: http://stackoverflow.com/q/26400145
tags question: http://stackoverflow.com/q/26390580
tags question: http://stackoverflow.com/q/26486914
tags question: http://stackoverflow.com/q/26504797
tags question: http://stackoverflow.com/q/26432391
tags question: http://stackoverflow.com/q/26509430
tags question: http://stackoverflow.com/q/26384840
tags question: http://stackoverflow.com/q/26419058
tags question: http://stackoverflow.com/q/26471169
tags question: http://stackoverflow.com/q/26491545
tags question: http://stackoverflow.com/q/26495571
tags question: http://stackoverflow.com/q/26442603
tags question: http://stackoverflow.com/q/26490508
tags question: http://stackoverflow.com/q/26509127
tags question: http://stackoverflow.com/q/26489660
tags question: http://stackoverflow.com/q/26399599
tags question: http://stackoverflow.com/q/26372946
tags question: http://stackoverflow.com/q/26393690
tags question: http://stackoverflow.com/q/26483659
tags question: http://stackoverflow.com/q/26403701
tags question: http://stackoverflow.com/q/26407874
tags question: http://stackoverflow.com/q/26495213
tags question: http://stackoverflow.com/q/26404117
tags question: http://stackoverflow.com/q/26414894
tags question: http://stackoverflow.com/q/26392052
tags question: http://stackoverflow.com/q/26413091
tags question: http://stackoverflow.com/q/26481000
tags question: http://stackoverflow.com/q/26475378
tags question: http://stackoverflow.com/q/26467058
tags question: http://stackoverflow.com/q/26480137
tags question: http://stackoverflow.com/q/26365868
tags question: http://stackoverflow.com/q/26377178
tags question: http://stackoverflow.com/q/26459438
tags question: http://stackoverflow.com/q/26503048
tags question: http://stackoverflow.com/q/26512584
tags question: http://stackoverflow.com/q/26497524

http://stackoverflow.com/a/26493836
type: Answer
has comment: http://stackoverflow.com/comment/41621847
has comment: http://stackoverflow.com/comment/41622481
has comment: http://stackoverflow.com/comment/41622411
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26493012
answers question: http://stackoverflow.com/q/26493012
score: 0
has body: 1) should use a Service to share data between controllers. technically, you could attach values on $rootScope and it would be visible across controllers, but that is considered bad form and can cause problems later (like using global variables -- can definitely have unintended side effects as the project grows if someone accidentally attaches a conflicting value). 2) not sure exactly what you're asking here. you can load a partial based on the given route/state (using ngRoute or ui-router). two different routes could use the same generalInfo.html partial, but with different data being pulled in their respective controllers. is that what you're asking? 3) $resource is an abstraction of $http -- if you're pulling data from a REST server, $resource may be a better fit, as it abstracts a little of the wiring necessary. however, if the server varies from traditional REST principles too much, or if it's not REST at all, you may just want to roll your own data access directly with $http. Of course, if it's REST and more complex, also consider restangular -- which is a more feature rich abstraction.

http://stackoverflow.com/comment/41425396
score: 0
type: AnswerComment
type: Comment
has text: Thank you user3866023 and all of the above users for your input. I will implement this code and hope that this is my solution :)
comment on: http://stackoverflow.com/a/26385290

http://stackoverflow.com/comment/41477882
type: Comment
score: 3
comment on: http://stackoverflow.com/q/26415090
has text: If implemented with html5 mode, proper rewrite to index.html, and the inclusion of a sitemap, your seo will be just fine. sitemap is optional, but it would be a good idea to include it anyway.
type: QuestionComment

http://stackoverflow.com/comment/41633541
type: Comment
score: 1
type: QuestionComment
has text: This works for your current input. `'4x+2y+1z'.replace(/(\d)([a-z])/g, '$1*$2')`
comment on: http://stackoverflow.com/q/26500713

http://stackoverflow.com/a/26461358
has body: Onchange is not a function, is a property. You must set onchange equal to the function you want. document.getElementById('input_1').onchange = function(){ //Do what you want }
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26461210
downvote count: 0
score: 1

http://stackoverflow.com/comment/41533431
type: QuestionComment
type: Comment
has text: @Markasoftware Furthemore, I think its script which returns the day of week is working only if the first day of the year is Monday.
comment on: http://stackoverflow.com/q/26445145
score: 0

http://stackoverflow.com/comment/41393476
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26367902
has text: just did still the same.

http://stackoverflow.com/a/26360065
has comment: http://stackoverflow.com/comment/41380513
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Actually, javascript is object oriented. What you have done is one way of creating an object - but not the best one. A better way for creating objects in javascript is to use prototype of an object (the closest you get to inheritance). so your code will look something like this: function AnswerQuestion(query) { this.query = query; this.template = 'answers_searchresult'; this.container = '#answers'; }; AnswerQuestion.prototype.SearchForAnswer = function () { var O = this; $.ajax({ type: "POST", datatype: 'json', url: "/WebServices/GlobalWebService.asmx/AnswersSearch", data: JSON.stringify({ q: this.query }), contentType: 'application/json; charset=utf-8', success: function (data) { O.SearchForAnswerSuccess(data.d); }, error: function (data) { log("Answers Search Fail"); } }); }; AnswerQuestion.prototype.SearchForAnswerSuccess = function (data) { var template = Handlebars.template[this.template]; $(this.container).append(template(data)); }; } than you would initialize your object like this: var answerQuestion = new AnswerQuestion(); That's just a quick explanation of course... javascript has design-patterns for name-spacing objects, parasitic inheritance... I suggest starting here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript
answers question: http://stackoverflow.com/q/26359891

http://stackoverflow.com/a/26433159
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26433035
has body: Your problem is that you're referring to selectors that don't match anything. For instance, #textEmail (used in the equalTo property) won't match anything in your current DOM. Replace this line: &lt;input type="text" name="textEmail" class="form-control" /&gt; With this line: &lt;input type="text" id="textEmail" name="textEmail" class="form-control" /&gt; Alternatively, you can use a different selector in your equalTo property: // ... rules: { // ... textEmail2: { equalTo: "[name=textEmail]" }, // ...
answers question: http://stackoverflow.com/q/26433035
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26467570
has comment: http://stackoverflow.com/comment/41579675
has body: Try to add ng-click to your Proceed button and define function which will analyse value of your selected data.clientSide and then call $location.path(url). You need to inject $location service into your controller. JavaScript: $scope.goSomewhere = function () { var path; switch($scope.data.clientSide) { case 'uso': path = '/uso'; break; case 'oaso': path = '/oaso'; break; case 'tpftso': path = '/tpftso'; break; } $location.path(path); }; And HTML: Proceed Demo: http://plnkr.co/edit/jawx0OivVmu2EyNmAbR9?p=preview Edit My answer above is related to angular-route, not to ui-router. In the last you need to use all the same code except of function call. Instead of location.path() it must me $state.go(yourStateName) Please note, not url, but state name. Edit2 Here is code for ionic framework (almost the same) + settings of application. Config: .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('main', { url: "/main", templateUrl: 'main.html' }) .state('usoStateName', { url: '/uso', templateUrl: 'page.html', controller: 'usoCtrl' }) .state('oasoStateName', { url: '/oaso', templateUrl: 'page.html', controller: 'oasoCtrl' }) .state('tpftsoStateName', { url: '/tpftso', templateUrl: 'page.html', controller: 'tpftsoCtrl' }); $urlRouterProvider.otherwise('/main'); }); And function: $scope.goSomewhere = function () { var path; switch($scope.data.clientSide) { case 'uso': path = 'usoStateName'; break; case 'oaso': path = 'oasoStateName'; break; case 'tpftso': path = 'tpftsoStateName'; break; } $state.go(path); }; Demo: http://plnkr.co/edit/0sk3dECPNm35HgMqiprt?p=preview
type: Answer
accepted answer of: http://stackoverflow.com/q/26466477
answers question: http://stackoverflow.com/q/26466477
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41579629
has comment: http://stackoverflow.com/comment/41573955
has comment: http://stackoverflow.com/comment/41578966
has comment: http://stackoverflow.com/comment/41573327
has comment: http://stackoverflow.com/comment/41573147
has comment: http://stackoverflow.com/comment/41577476
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26487382
has body: I have recorded an action set using the Photoshop Actions Panel. One of the steps is a custom javascript. At the end of the javascript, a test is preformed. If passed, the action should continue. If failed, the action should stop. I'm not talking about a simple return statement within the javascript. I want the equivalent of Actions &gt; Insert Stop in javascript form. Is this possible? #target photoshop if (documents.length != 0) { // app.actionsPanel.stop(); }
has title: Use Photoshop Custom JavaScript to Stop Actions Panel Playback
has comment: http://stackoverflow.com/comment/41655773
has comment: http://stackoverflow.com/comment/41657261
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: photoshop-script
tagged with: javascript
tagged with: photoshop
score: 0

http://stackoverflow.com/comment/41556336
type: Comment
comment on: http://stackoverflow.com/a/26458173
has text: Thanks. I should have thought of that before!
type: AnswerComment
score: 0

http://stackoverflow.com/q/26432865
has comment: http://stackoverflow.com/comment/41510391
has answer: http://stackoverflow.com/a/26432975
score: 0
tagged with: angularjs
has title: Modifying array with asycronus data
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41510366
has body: I have a very curious problem that I'm sure someone in the world has figure out. Let's keep thing simple however. Ok, here we go. So I have a plain array of objects. Let's say 5 objects for now. [{id: 1, data: 'stuff'}, {id: 2, data: 'stuff'}, {id: 3, data: 'stuff'}, {id: 4, data: 'stuff'}, {id: 5, data: 'stuff'}] What I then do is make 3 ajax requests which all, obviously, come back and different times. What I want to do is update this array based on the id's. For example I send off 3 ajax requests and receive new data for objects 1, 2 and 4. I'll need to update the data property in the respectives objects in the array. I'm using Array.splice to do the update. What I'm finding is that there are times, since the data comes in at different times, that things aren't updated correctly. I think this is because what splice does is actually remove the object from the array then re-inserts the new array in afterwards. It seems like there are instances when the splice method is in the middle of removing an object, then another response comes in and tries to remove another object, however, that object is not in the correct index, since the first object was removed and hasn't been inserted in yet. So the updating is off.
has answer: http://stackoverflow.com/a/26432991
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41510547
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/41545175
type: Comment
score: 0
type: AnswerComment
has text: +1 for brevity (plus I can replace the '3' with the object containing the dynamic value which changes easily versus regex) though I'm going with the `substring` answer I'm sure that this will fit better for others regardless. Plus I've *got* to break in to `prototype` at some point...
comment on: http://stackoverflow.com/a/26451872

http://stackoverflow.com/comment/41595563
score: 0
type: AnswerComment
has text: i'd like to use this because i have multiple textboxes, but it seem s to be not working, can you link me a working fiddle for this?
type: Comment
comment on: http://stackoverflow.com/a/26479569

http://stackoverflow.com/comment/41571135
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26466570
has text: _when i use it in a widget_, are you including this widget by Ajax?

http://stackoverflow.com/a/26482965
type: Answer
has comment: http://stackoverflow.com/comment/41626925
has comment: http://stackoverflow.com/comment/41603487
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26477958
score: 1
has comment: http://stackoverflow.com/comment/41614509
answers question: http://stackoverflow.com/q/26477958
has comment: http://stackoverflow.com/comment/41625468
has comment: http://stackoverflow.com/comment/41625830
has comment: http://stackoverflow.com/comment/41602886
upvote count: 1
type: AcceptedAnswer
has body: As suggested by Arun, you need a directive. It seems that you want to pass the HTML retrieved elsewhere to the view (as opposed to the directive fetching the HTML on its own). I guess you could create a directive that extracts stuff from HTML. app.directive("find", function($compile){ var html = ""; var selector = ""; // use jQuery to construct an object from html and .find using the selector function render(scope, elem){ if (html === "") return; var jqHtml = angular.element("&lt;div&gt;").html(html).find(selector); elem.empty(); elem.html(jqHtml.html()); // $compile, such that any directives/expressions in the imported HTML //are compiled and linked to the right scope $compile(elem.contents())(scope); } return { restrict: "E", scope: true, link: function(scope, elem, attrs){ // $observe the attributes for changes attrs.$observe('selector', function(newValue){ selector = newValue; render(scope, elem); }); attrs.$observe('html', function(newValue){ html = newValue; render(scope, elem); }); } }; }); The usage is: &lt;find html="{{html}}" selector="#t1"&gt;&lt;/find&gt;

http://stackoverflow.com/comment/41547365
type: QuestionComment
comment on: http://stackoverflow.com/q/26452885
score: 0
has text: Oh, my angular module seem complicate so need more times to prepare a plunk. If you know how to ngModel and ngChange can work in custom directive, Can you explain or show me your code ?
type: Comment

http://stackoverflow.com/comment/41392089
score: 1
has text: Is that part of code within a `$(function() { ... code here ... })` or `$(document).ready(function() { ... code here ... })` ? Was it whithin File1?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26367348

http://stackoverflow.com/q/26402497
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/20263741
tagged with: javascript
score: 0
has title: Calculate MD5 or SHA of an Image using CryptoJS
tagged with: cordova
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/65126591
tagged with: md5
tagged with: sha
has body: I have a requirement where I need to calculate hash of an Image and upload it to a webservice. The image is captured using Cordova API and the API returns a URI of that image. I checked the CryptoJS but it is taking a string as input. var hash = CryptoJS.MD5("Message"); Any way we can calculate hash for the image ? CryptoJS Lib : CryptoJS Home Page Any other library is also fine as long as it can be used from Cordova App.
has answer: http://stackoverflow.com/a/26404565

http://stackoverflow.com/comment/41414756
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26379831
has text: @Bergi can provide answer?
score: 0

http://stackoverflow.com/comment/41414222
type: Comment
score: 1
has text: I stand corrected. What I posted [seems to work](http://plnkr.co/edit/jduccryiJFygsM9VuOG7?p=preview). Though if you want the `id as` bit as well that doesn't seem to play nicely. Possible workaround [here](http://gurustop.net/blog/2014/01/28/common-problems-and-solutions-when-using-select-elements-with-angular-js-ng-options-initial-selection/)
comment on: http://stackoverflow.com/a/26378574
type: AnswerComment

http://stackoverflow.com/comment/41414876
comment on: http://stackoverflow.com/a/26378566
score: 0
has text: are you creating this table dynamically? Then provide that code please. It ll help me to help you.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26458625
score: 1
answers question: http://stackoverflow.com/q/26439580
has comment: http://stackoverflow.com/comment/41560399
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41560071
has body: You can use .setElement to change the image. For example, let's say you have a fabricJS image objects called "myFabricObect". Then if you have an html image element---, on your page, you can load your myFabricObject with the "newImage" like this: myFabricObject.setElement(document.getElementById("newImage")); You could also new-up a javascript Image() and assign that to myFabricObject: var img=new Image(); img.onload=function(){ myFabricObject.setElement(img); } img.src="myNewImage.png";
type: Answer
has comment: http://stackoverflow.com/comment/41560459

http://stackoverflow.com/comment/41603818
comment on: http://stackoverflow.com/a/26484585
score: 0
type: AnswerComment
has text: /p=true/i a typo? Should be True instead of true, since we don't test for lower/upper case
type: Comment

http://stackoverflow.com/comment/41491370
has text: Thanks George. Making the variable global was the right move :)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26421489
type: Comment

http://stackoverflow.com/comment/41532494
type: Comment
type: AnswerComment
score: 0
has text: Thanks a lot Divakar. I just used the first part (PHP) of your answer. I was trying to put the "if" before the line. With the inside the "if" it worked. Thanks.
comment on: http://stackoverflow.com/a/26441765

http://stackoverflow.com/a/26412619
has comment: http://stackoverflow.com/comment/41474123
has comment: http://stackoverflow.com/comment/41473396
has comment: http://stackoverflow.com/comment/41474961
score: 0
has comment: http://stackoverflow.com/comment/41474334
has comment: http://stackoverflow.com/comment/41474580
has comment: http://stackoverflow.com/comment/41473833
answers question: http://stackoverflow.com/q/26412464
has comment: http://stackoverflow.com/comment/41475336
has comment: http://stackoverflow.com/comment/41473916
type: Answer
has comment: http://stackoverflow.com/comment/41483100
has comment: http://stackoverflow.com/comment/41473921
has comment: http://stackoverflow.com/comment/41474213
has comment: http://stackoverflow.com/comment/41474236
has comment: http://stackoverflow.com/comment/41473997
has body: you can install wifi share apps to your android device they will connect your phone and pc over http protocol or install ftp server to pc or android device
has comment: http://stackoverflow.com/comment/41474458
has comment: http://stackoverflow.com/comment/41473700
has comment: http://stackoverflow.com/comment/41474859

http://stackoverflow.com/comment/41605909
type: Comment
has text: Notice the Javascript tag. I'm guessing OP doesn't want to manually add classes to every e
comment on: http://stackoverflow.com/a/26485784
type: AnswerComment
score: 0

http://stackoverflow.com/a/27281949
answers question: http://stackoverflow.com/q/26407665
upvote count: 1
downvote count: 0
type: Answer
score: 1
has body: I recently fixed a bug that might help. If your value that you were replacing was 0 -- as a value, not a string -- IE11 would only append the replacement string instead of actually replacing it. Here's what I was working with: buf = buf.replace( /%%TOTALAMOUNT%%/gim, "$" + parseFloat( g_UserPurchases[LCV].CurrencyValue.val() ).toFixed(2) ); This printed: "%%TOTALAMOUNT%%.00" I fixed it by checking: if( ( g_UserPurchases[LCV].CurrencyValue.val() == 0 ) || ( g_UserPurchases[LCV].CurrencyValue.val() === 0 ) ){ //IE fix: IE did not like the $ character and didn't replace if val = 0 buf = buf.replace( /%%TOTALAMOUNT%%/gim, "&amp;#36;0.00"); } Please note: IE11 didn't replace the the dollar sign character, $. So, I used the character code instead: &amp;#36; Hope this helps!

http://stackoverflow.com/q/26384241
has answer: http://stackoverflow.com/a/26385953
type: UnansweredQuestion
upvote count: 2
score: 1
tagged with: google-chrome
downvote count: 1
type: Question
tagged with: javascript
has title: How To Get New URL on Tab Switch Google Chrome Extension?
has body: I'm trying to get the current URL of the CURRENT tab in chrome. But this does not refresh when I change the tab. document.addEventListener('DOMContentLoaded', function () { document.getElementsByTagName('body')[0].innerHTML = document.location; }); Simple enough. It works well, but it shows the same location when I switch tabs. How do I overcome this?
tagged with: google-chrome-extension
answer count: 1
favorite count: 0

http://stackoverflow.com/q/26454331
has comment: http://stackoverflow.com/comment/41551782
score: 0
possible better answer: http://stackoverflow.com/a/26459253
tagged with: signalr
tagged with: asp.net-mvc
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26458655
has title: Using SignalR to notify current caller
type: AnsweredQuestion
tagged with: asp.net
type: Question
has comment: http://stackoverflow.com/comment/41553124
answer count: 2
has answer: http://stackoverflow.com/a/26459253
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/26458655
has body: The short version In my POST action routine, how can I send a notification to some JavaScript running in the client? It seems that SignalR should be an easy solution, but I don't know how to do a callback to the SignalR client that lives in JavaScript in the POST action's client page. Specifically, it seems that I need a "connection ID" in order to ask SignalR to talk to a specific client, but I don't know how to get one of those either in my POST action or in the client JavaScript. The whole (not so ugly) story In my MVC app, my POST action may take a long time to complete. If the POST action decides that it will take a long time to complete, I want to notify some JavaScript on the page so that it can display a "please wait..." notification to the user. This seems like something that SignalR should make really easy for me. Following the basic tutorial, I added a Hub and created a JS callback in my view: Note that the Hub has no methods. My client only needs a read-only notification. It has no need to call any methods on the Hub to write message to the outside world. public class MyHub: Hub { } The view just has a form with a submit button and a hidden "Please wait" message that the SignalR routine can display. The view model has a string property that I can use to pass the SignalR "connection ID" to the POST controller (assuming I can figure out how to get it). @model SignalRTest.Models.MyViewModel @using (Html.BeginForm()) { @Html.HiddenFor(m => m.SignalrConnectionId) Go to it! } Please wait... @section scripts { } Meanwhile back in my POST controller action, I call the JS callback: [HttpPost] public async Task<ActionResult> MyAction(MyViewModel model) { // We've decided that this will take a while. Tell the client about it... var context = GlobalHost.ConnectionManager.GetHubContext<MyHub>(); context.Clients.All.myCallback(); //context.Clients.Client(model.SignalrConnectionId).myCallback(); await Task.Delay(2000); return RedirectToAction("NextPage"); } Now, my pro…

http://stackoverflow.com/a/33823827
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/55413794
type: Answer
has body: I have recently used the Tableau Rest API and found it pretty useful while querying against a project or a workbook for it's details so I would suggest you take a look at Tableau REST API reference. It should help you solve problems 1 and 2 that you have stated. I used Postman to confirm that I was getting the details I wanted and then continued development using the Tableau REST API wrapper in Python (I have forked off this repo to support some functionality that was not available here). Also, the REST API supports authentication against the server but I have used Admin permissions for all my interactions so user account authentication needs verification. The 3rd problem you have stated seems like you would need to use the JavaScript API to load the view into an iFrame. You would need to set up Trusted Authentication on the Tableau server to be able to embed views. You can find more details here and here.
answers question: http://stackoverflow.com/q/26487329
upvote count: 2
has comment: http://stackoverflow.com/comment/55413957

http://stackoverflow.com/q/26365365
has answer: http://stackoverflow.com/a/26370954
accepted answer: http://stackoverflow.com/a/26370954
tagged with: gm-xmlhttprequest
has body: I created a basic script for Greasemonkey in order to search for the word test on Stack Overflow. According to GM_xmlhttpRequest documentation, parameters for the request should be indicated in the data argument. // ==UserScript== // @name Test Search SO // @namespace Test Search SO // @description Test Search SO // @include http://YOUR_SERVER.COM/YOUR_PATH/* // @version 1 // @grant GM_xmlhttpRequest // ==/UserScript== alert("Ready?"); GM_xmlhttpRequest({ url: "http://stackoverflow.com/search", method: "GET", data: "q=test", onload: function(response) { document.getElementsByTagName("html")[0].innerHTML = response.responseText; alert("Done."); } }); Unfortunately, the result is just the page http://stackoverflow.com/search like if data was ignored. How can I fix this, please?
tagged with: greasemonkey
answer count: 1
downvote count: 0
tagged with: javascript
has title: How to submit to a basic, external form page using GM_xmlhttpRequest?
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: forms
type: Question

http://stackoverflow.com/a/26489293
answers question: http://stackoverflow.com/q/26489095
has body: You should take a look more closer on Sencha's Ext.Template. Sencha's tpl system is actually one of the best I think on representing data from your store or with just a single model. Here's a sample of Xtemplate with conditional statement. Ext.define('MyProject.view.Navigation', { extend: 'Ext.dataview.List', xtype: 'navigation', requires: ['Ext.data.Store'], config: { store: 'NaviLinks', cls: 'nav-list', //itemTpl: '{additional_text} {fa_icon} {name}', itemTpl: new Ext.XTemplate([ ' {icon} {name}', ' ', ' ', ' [{additional_text}] ', ' ' ]) }, initialize: function() { this.callParent(); } });
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41613547
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41626631
score: 2
accepted answer of: http://stackoverflow.com/q/26489095

http://stackoverflow.com/comment/41506994
score: 0
has text: http://jsfiddle.net/5q48n0z1/4/
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26430628

http://stackoverflow.com/comment/41657085
score: 0
type: Comment
type: QuestionComment
has text: if you want jquery to load faster, why don't you download a minified copy onto your server instead of loading it from the internet every time, and load the images async?
comment on: http://stackoverflow.com/q/26513574

http://stackoverflow.com/comment/41562559
type: QuestionComment
has text: How have you added qtip to your theme?
score: 0
comment on: http://stackoverflow.com/q/26460779
type: Comment

http://stackoverflow.com/q/26369786
upvote count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/41396868
type: Question
tagged with: anchor
has comment: http://stackoverflow.com/comment/41396839
score: -2
tagged with: hyperlink
tagged with: javascript
duplicate of: http://stackoverflow.com/q/11772100
answer count: 1
tagged with: jquery
has body: I'm attempting to output a link from a page of a site back to the linking site. invoiceNo &amp; rawPrice are variables that are extracted from the page prior to this and values extracted and converted to the appropriate string and float values. If I hard code values in (invoice001) and (29.99), for example, the script runs fine. However, as it stands all that happens is the variable name being displayed in the link. Any help would be greatly appreciated. Thanks &lt;script type="text/javascript"&gt; window.invoiceData = $('h2').text(); window.invoiceNo = invoiceData.substr(14); window.priceBeforeCurrencyStrip = $('td.priceCol.balance').text(); window.price = parseFloat(priceBeforeCurrencyStrip.match(/[0-9.]+/)); &lt;/script&gt; &lt;script type="text/javascript" src="https://.......&amp;SaleID='+invoiceNo+'&amp;OrderVal='+price'"&gt; &lt;/script&gt;
favorite count: 0
has answer: http://stackoverflow.com/a/26370047
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Append multiple Javascript variables onto a URL
linked to: http://stackoverflow.com/q/11772100

http://stackoverflow.com/comment/41477345
type: QuestionComment
has text: JavaScript cannot close other tabs due to security issue. Besides, you should not close client's browser or tab from your code. What is the reason behind it?
comment on: http://stackoverflow.com/q/26414669
score: 0
type: Comment

http://stackoverflow.com/comment/41615489
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26490452
type: Comment
has text: @FelixKling: I defined it in php file.. I am very new to javascript and json so sorry if I have some basic mistakes..

http://stackoverflow.com/comment/41627129
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26497080
type: AnswerComment
has text: ahh i missed that.. LOL!! But OP says it works while running from the console of the browser. It must just be a timing issue i suppose.

http://stackoverflow.com/comment/58503935
score: 2
comment on: http://stackoverflow.com/a/35400846
type: AnswerComment
type: Comment
has text: You're posting the same code in answers to several questions. If the questions are actually duplicates, please flag them as such instead of answering.

http://stackoverflow.com/q/26444168
has comment: http://stackoverflow.com/comment/130667777
has comment: http://stackoverflow.com/comment/41531080
has comment: http://stackoverflow.com/comment/41531087
has answer: http://stackoverflow.com/a/26449175
has body: My Query: What is the most efficient way to reference nested JavaScript objects? I have found a couple so far, and am wondering which is the most efficient, and if there are any others which are better than those which I list here. The problem involves usage of a root object, similarly to that which many JavaScript frameworks use. The root object is compulsory. Please do not post answers which do not use a root object. Note that this is specifically intended for root/sub-root objects which have long names - referencing a.b would be useless, whilst referencing abcdefghijklm.nopqrstuvwxyz would be extremely useful. EDIT: Just to clarify a couple of things: Via efficiency I mean firstly code length (which could in turn affect performance, but that is slightly less important). I am concerned about code length partially because of file size - yes, I would be minifying it afterwards - but also due to readability for anyone viewing my original code (including myself). Performance is also slightly important, I don't want long workarounds which would slow down execution. The referencing would be mostly for commonly used sub-objects, NOT EVERY SINGLE ONE. I state (in method 1) that many global variables would need to be created - due to the fact that I was assuming that all of the first-level sub-objects would be commonly used. Objects to be referenced: The object foo contains the various sub-objects bar, baz and qux, each of which contain various other objects. var foo = { bar: { bar: {}, baz: {}, qux: {} }, baz: { bar: {}, baz: {}, qux: {} }, qux: { bar: {}, baz: {}, qux: {} } }; Method 1 - Reference Variables: The first method involves creating a variable for each of the sub-objects. var bar = foo.bar; var baz = foo.baz; var qux = foo.quz; foo.bar.baz could then be referenced simply via bar.baz, and foo.qux.qux via qux.qux. Advantages: Reference variables can be very concise - a single character is the minimum possible length. Disadvantages: If there are many sub-objects t…
tagged with: reference
has comment: http://stackoverflow.com/comment/41539569
has comment: http://stackoverflow.com/comment/41539593
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/41531759
possible better answer: http://stackoverflow.com/a/26444986
downvote count: 1
has answer: http://stackoverflow.com/a/26444986
tagged with: object
accepted answer: http://stackoverflow.com/a/26449175
has comment: http://stackoverflow.com/comment/41532988
linked to: http://stackoverflow.com/q/6393943
score: 2
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/41531202
favorite count: 0
has comment: http://stackoverflow.com/comment/41539535
type: Question
has title: Most efficient way to reference nested object

http://stackoverflow.com/comment/50057344
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26451634
has text: If you have a solution, feel free to answer your own question and accept the answer :)
score: 0

http://stackoverflow.com/a/26408914
answers question: http://stackoverflow.com/q/26408714
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41466487
has comment: http://stackoverflow.com/comment/41467059
downvote count: 0
has comment: http://stackoverflow.com/comment/41466629
upvote count: 2
has body: To give you a ColdFusion specific answer (rather than just CSS) try this: #paragraphformat(message)# That automatically replaces carraige returns with BR tags. -mark

http://stackoverflow.com/a/26447629
has comment: http://stackoverflow.com/comment/41537395
has body: This is because .val() actually returns an object: Object [value]. Just do parseFloat on it: console.log( parseFloat( $('#myinput').val() ).countDecimals() );
answers question: http://stackoverflow.com/q/26447603
has comment: http://stackoverflow.com/comment/41537417
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41537379

forms
tags question: http://stackoverflow.com/q/26391297
tags question: http://stackoverflow.com/q/26506140
tags question: http://stackoverflow.com/q/26449646
tags question: http://stackoverflow.com/q/26427372
tags question: http://stackoverflow.com/q/26466281
tags question: http://stackoverflow.com/q/26403081
tags question: http://stackoverflow.com/q/26472533
tags question: http://stackoverflow.com/q/26434444
tags question: http://stackoverflow.com/q/26483812
tags question: http://stackoverflow.com/q/26462493
tags question: http://stackoverflow.com/q/26453612
tags question: http://stackoverflow.com/q/26508049
tags question: http://stackoverflow.com/q/26457994
tags question: http://stackoverflow.com/q/26451010
tags question: http://stackoverflow.com/q/26476242
tags question: http://stackoverflow.com/q/26483566
type: Tag
tags question: http://stackoverflow.com/q/26422243
tags question: http://stackoverflow.com/q/26433677
tags question: http://stackoverflow.com/q/26436253
tags question: http://stackoverflow.com/q/26375251
tags question: http://stackoverflow.com/q/26369648
tags question: http://stackoverflow.com/q/26500135
tags question: http://stackoverflow.com/q/26374504
tags question: http://stackoverflow.com/q/26411367
tags question: http://stackoverflow.com/q/26499263
tags question: http://stackoverflow.com/q/26444507
tags question: http://stackoverflow.com/q/26477449
tags question: http://stackoverflow.com/q/26511376
tags question: http://stackoverflow.com/q/26477504
tags question: http://stackoverflow.com/q/26499417
tags question: http://stackoverflow.com/q/26365619
tags question: http://stackoverflow.com/q/26430716
tags question: http://stackoverflow.com/q/26426616
tags question: http://stackoverflow.com/q/26426802
tags question: http://stackoverflow.com/q/26393970
tags question: http://stackoverflow.com/q/26392837
tags question: http://stackoverflow.com/q/26365365
tags question: http://stackoverflow.com/q/26509127
tags question: http://stackoverflow.com/q/26364837
tags question: http://stackoverflow.com/q/26508042
tags question: http://stackoverflow.com/q/26384886
tags question: http://stackoverflow.com/q/26380654
tags question: http://stackoverflow.com/q/26411807
tags question: http://stackoverflow.com/q/26354199
tags question: http://stackoverflow.com/q/26441793
tags question: http://stackoverflow.com/q/26357653
tags question: http://stackoverflow.com/q/26415377
tags question: http://stackoverflow.com/q/26463989
tags question: http://stackoverflow.com/q/26485685
tags question: http://stackoverflow.com/q/26369112
tags question: http://stackoverflow.com/q/26415274
tags question: http://stackoverflow.com/q/26410525
tags question: http://stackoverflow.com/q/26488693
tags question: http://stackoverflow.com/q/26417038
tags question: http://stackoverflow.com/q/26372791
tags question: http://stackoverflow.com/q/26490823
tags question: http://stackoverflow.com/q/26511832
tags question: http://stackoverflow.com/q/26385703
tags question: http://stackoverflow.com/q/26454635
tags question: http://stackoverflow.com/q/26506844
tags question: http://stackoverflow.com/q/26383507
tags question: http://stackoverflow.com/q/26393690
tags question: http://stackoverflow.com/q/26469103
tags question: http://stackoverflow.com/q/26432866
tags question: http://stackoverflow.com/q/26470751
tags question: http://stackoverflow.com/q/26501577
tags question: http://stackoverflow.com/q/26489636
tags question: http://stackoverflow.com/q/26393860
tags question: http://stackoverflow.com/q/26399367
tags question: http://stackoverflow.com/q/26433035
tags question: http://stackoverflow.com/q/26395597
tags question: http://stackoverflow.com/q/26380532
tags question: http://stackoverflow.com/q/26488799
tags question: http://stackoverflow.com/q/26494855
tags question: http://stackoverflow.com/q/26509144
tags question: http://stackoverflow.com/q/26454152
tags question: http://stackoverflow.com/q/26354696
tag name: forms
tags question: http://stackoverflow.com/q/26426567

http://stackoverflow.com/a/26465216
answers question: http://stackoverflow.com/q/26465032
has comment: http://stackoverflow.com/comment/41568359
score: 0
has comment: http://stackoverflow.com/comment/41568595
upvote count: 1
has body: The preventDefault function is a variable that does not exist (event) use only "e" there. In the "data" variable names, use double quotes. Do not use: data: {variable: variable} use: data: {variable: value}. Ie, variable and value with different names. $("#ajax-publish-blog").click(function (e){ e.preventDefault(); var titleBlog = $('#edit-blog-title').val(); var contenido = $('#edit-blog-content').val(); var image = $('.create-a-blog #hero').css('background-image'); var cleanup = /\"|\'|\)/g; var bg = image.split('/').pop().replace(cleanup, ''); var IDauthor = $('input[name=author]').val(); console.log("Blog Title = " + titleBlog + " // Blog Content = " + contentido + " // bg image = " + bg + " // authorID =" + IDauthor); $.ajax({ url: "../process/post-blog-process2.php", type: "POST", data: { 'blogTitle': titleBlog, 'content': contenido, 'image': bg, 'authorID': IDauthor }, dataType: 'json', success: function(data){ alert("ohyer" + " " + data.titleBlog + " " + data.IDauthor + " " + data.contenido + " " + data.image) }, error: function(data) { alert("ohno" + " " + data.titleBlog + " " + data.IDauthor + " " + data.contenido + " " + data.image) } }); });
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/41568552
type: Answer
accepted answer of: http://stackoverflow.com/q/26465032
has comment: http://stackoverflow.com/comment/41568442
has comment: http://stackoverflow.com/comment/41568357

http://stackoverflow.com/comment/41617425
comment on: http://stackoverflow.com/q/26488952
score: 0
type: Comment
type: QuestionComment
has text: Sorry for the long process. Now replace all your colorbox javascript with `jQuery(document).ready(function($){ $("#dato_lb").colorbox({width:"100%", innerHeight:"100%", inline:true}); $("#fuentes").colorbox({width:"50%", innerHeight:"50%", inline:true}); }); `

http://stackoverflow.com/comment/41617472
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26490917
has text: simple way to explain see i have 1 image. in that i have 25 rectangle. now when i click on 1 button i need one few rectangle to be displayed not other.

http://stackoverflow.com/a/26366384
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26365868
has body: If my guess is correct, you are putting script into div just because you need to load a script from remote location. Idea 1: Perhaps server hosting remote script allows CORS. In such case you could simply use something like jQuery getScript function to execute remote content: $.getScript( 'externalscript.js' ); There are many ways to get and execute scripts from remote locations (i.e. ScriptManJS) but as you are not able to load remote content, you should probably stick with what is currently available to you - JQuery or plain JavaScript. Idea 2: If remote host does not support CORS (browser throws exception in debugger console and nothing happens), perhaps you have some server of your own which you could use as a proxy? Your server could download required script and then allow your code to download it using AJAX (either cross-domain or locally, depending what system you are modifying). In this way you could bypass the CORS limitation. Idea 3: Finally, why do you say that you are not able to put script into head using JavaScript? Did you try something like (I think newscript should be used as a jQuery object in this case): $('head').append( $( newscript ) );
has comment: http://stackoverflow.com/comment/41390232

http://stackoverflow.com/comment/41428475
type: QuestionComment
has text: Thanks Bowerbros. that was useful.
comment on: http://stackoverflow.com/q/26363554
score: 0
type: Comment

http://stackoverflow.com/q/26503869
downvote count: 0
score: 2
type: AnsweredQuestion
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26503896
answer count: 2
accepted answer: http://stackoverflow.com/a/26503889
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26503889
has title: What's the reason to make a conditional without a result?
has body: I came across this code: navigation.on('click', '.main-nav-item', function (e) { var clickedNavItem = $j(this), className = clickedNavItem.data('class'), midNavItem = $j('.' + className, midNavigation); midNavItem.length &gt; 0 &amp;&amp; e.preventDefault(); }); I try to understand the purpose of the last row: midNavItem.length &gt; 0 &amp;&amp; e.preventDefault(); It seems to stop the click if midNavItem.Length > 0, but I don't under stand the syntax of this. It ought to be_ if(midNavItem.length &gt; 0) { e.preventDefault() }; Not two conditionals. Why would you write it like this?
possible better answer: http://stackoverflow.com/a/26503896

http://stackoverflow.com/q/26374093
has answer: http://stackoverflow.com/a/26478053
answer count: 2
has comment: http://stackoverflow.com/comment/41420548
has title: How to create a list of numbers with given range, quartiles and median?
has body: I have the following requirements: A function to create a "list" container to hold a group of data with numValues data, and the range, median, and interquartile ranges assigned. Pass TRUE if you want the data elements to be arranged in ascending order. Pass –1 for either extreme, either quartile, or the median if you do not require them to be specific values. For example: makelist(3, 5, -1, 8, -1, 9, TRUE) will return "5, 8, 9" Both quartile values must be supplied to the makelist() function. If either one is not, they are both ignored. I have the beginnings of the function below (In JavaScript). I'm looking for some help in figuring out the quartile part of this (how to create the spread of numbers to satisfy the quartile requirements). makelist = function(numValues, lowerExtreme, lowerQuartile, median, upperQuartile, upperExtreme, sortData) { if (lowerExtreme == -1) lowerExtreme = 0; if (upperExtreme == -1) upperExtreme = lowerExtreme + 100; var magnitude = upperExtreme - lowerExtreme, // 9 - 5 = 4 quarter = magnitude * .25, midway = magnitude * .5, threeQuarters = magnitude * .75; quarter = lowerExtreme + quarter; midway = lowerExtreme + midway; threeQuarters = lowerExtreme + threeQuarters; if (lowerQuartile == -1) upperQuartile = quarter; if (upperQuartile == -1) lowerQuartile = threeQuarters if (median == -1) median = midway; var step = magnitude / (numValues - 1); // 4 / 3 = var quartet = { lowerExtreme: lowerExtreme, lower: [], lowerMid: [], upperMid: [], upper: [] } var fill = function(list, lowerExtreme, upperExtreme) { var lastPush = null, step = (upperExtreme - lowerExtreme) / ((numValues) * .25); for (var i = lowerExtreme; i &lt;= upperExtreme; i += step) { list.push(Math.round(i)); lastPush = i; } return lastPush; } quartet.lowerExtreme = fill(quartet.lower, quartet.lowerExtreme, lowerQuartile, step) || quartet.lowerExtreme; console.info("quartet.lower: " + quartet.lower + " quartet.lowerExtreme: " + quartet.lowerExtreme); quartet.lowerExtreme = fill(qu…
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26478053
upvote count: 1
has comment: http://stackoverflow.com/comment/41590170
has comment: http://stackoverflow.com/comment/41497870
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41486297
possible better answer: http://stackoverflow.com/a/26451971
score: 1
tagged with: math
has comment: http://stackoverflow.com/comment/41591276
has answer: http://stackoverflow.com/a/26451971
has comment: http://stackoverflow.com/comment/41561026
type: Question
has comment: http://stackoverflow.com/comment/41520718
tagged with: algorithm
has comment: http://stackoverflow.com/comment/41420793
tagged with: javascript

http://stackoverflow.com/a/26498882
answers question: http://stackoverflow.com/q/26498808
score: 4
has body: Could you make a Player model (class) with the Name, Score, Color, Attribs properties and store each Player in memory in a List<Player>: public class Player { public string Name { get; set; } public int Score { get; set; } public string Color { get; set; } public int[] Attribs { get; set; } } ... List<Player> myPlayers = new List<Player>(); Player joe = new Player(); joe.Name = "Joe"; joe.Score = 25; joe.Color = "red"; joe.Attribs = new int[] { 0, 1, 2, 3, 4 };; myPlayers.Add(joe); Using System.Linq you could query the List<Player> for specific players Eg: Player player = myPlayers.SingleOrDefault(p => p.Name == "Joe"); Extra credit - always test that player is not default before trying to use it: if (player != default(Player)) { // do something with joe }
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/41402752
has text: The link is created by Django... ` Delete `. First I tried to do like you mentioned ... but I missed how to pass `cluster.id` to the function call
type: Comment
comment on: http://stackoverflow.com/a/26373023
score: 0
type: AnswerComment

http://stackoverflow.com/a/26451960
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26451905
has body: Create a separate stylesheet called halloween.css and link it to page Start all the css rules with .halloween for example .halloween h1 {background:black;color:orange} Make a button which toggles a body class, with jquery for example: $('#button').click(function(){ $('body').toggleClass('halloween'); });
answers question: http://stackoverflow.com/q/26451905

http://stackoverflow.com/q/26455488
has comment: http://stackoverflow.com/comment/41551642
upvote count: 0
has title: how can i move Value from that function to the other variable on the that is available on out of the function?
downvote count: 5
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -5
has body: $(window).load(function(){ $("body").click(function(){ var s = window.getSelection(); s.modify('extend','backward','word'); var b = s.toString(); s.modify('extend','forward','word'); var a = s.toString(); s.modify('move','forward','character'); var z=b+a; z= z.trim(); var jvalue = "Fox"; }); }); var kvalue = jvalue; alert(kvalue);
has answer: http://stackoverflow.com/a/26455539
type: Question

http://stackoverflow.com/q/26471142
has comment: http://stackoverflow.com/comment/41579851
has answer: http://stackoverflow.com/a/26471226
type: AnsweredQuestion
has title: JQuery/DOM element "click" event registration: on("click") VS click() VS addeventlistener("click")
type: Question
answer count: 2
has body: I'm learning javascript, and I've seen more than one way of registering click events: $(DOMelement).click(function() {}); $(DOMelement).on('click',function() {}); (DOMelement).addEventListener('click', function() {}); Can someone tell me what's the best practice for event registration? Or the major advantage/disadvantage of each one? I'm asuming on() and click() are very similar, but since I'm just getting started I would like to know which is the most used so I can start writing efficient code from the start. Also, is it still a good practice to do the html onclick registration? &lt;button onclick="function()"&gt;&lt;/button&gt;
has comment: http://stackoverflow.com/comment/41579860
tagged with: javascript
tagged with: event-handling
tagged with: jquery
has comment: http://stackoverflow.com/comment/41580593
accepted answer: http://stackoverflow.com/a/26471226
has answer: http://stackoverflow.com/a/26471219
has comment: http://stackoverflow.com/comment/41580080
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26471219

http://stackoverflow.com/a/26428881
type: Answer
answers question: http://stackoverflow.com/q/26428852
score: 0
has comment: http://stackoverflow.com/comment/41504587
has body: setTimeout(function(){ //insert code here }, 1000); http://www.w3schools.com/jsref/met_win_settimeout.asp

http://stackoverflow.com/comment/41561266
comment on: http://stackoverflow.com/a/26460969
has text: Your back cover image (back_cover_page.jpg) is 780kb in size, it will load slow on slow internet connections. You can compress the image to a lesser size, maybe change image format, but apart from that you can't do anything about the loading time. It'll depend on internet speed...
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26366273
tagged with: javascript
tagged with: struts
has answer: http://stackoverflow.com/a/26366475
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/pdf
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26366468
has body: I have a jsp page from which i have to redirect to an external URL and this URL has a dynamic field at the end which i bring from another class. The task for me is to open this url in a new tab or window when that jsp is loaded. I tried the target attribute in the HTML tag but it did not work. &lt;html target="_blank"&gt; &lt;body&gt; &lt;% String filename=(String)request.getAttribute("fileToOpen"); response.sendRedirect("http://manuals/example/"+filename+".pdf"); %&gt; &lt;/body&gt; &lt;/html&gt;
has answer: http://stackoverflow.com/a/26368891
tagged with: java
type: Question
has title: JSP should redirect to a dynamic URL in a new window or tab
tagged with: jsp

http://stackoverflow.com/q/26449106
has comment: http://stackoverflow.com/comment/41540537
has body: When sending a XMLHttpRequest with async = false, the xhr.upload.onprogress events is never fired doing file upload. Source: var form = new FormData(); form.append("name", files[i].name); form.append("size", files[i].size); form.append("type", files[i].type); form.append("image", files[i]); var xhr = new XMLHttpRequest(); xhr.upload.onprogress = function(evt){ alert("Progress event fired!"); if (evt.lengthComputable) { var percentComplete = (evt.loaded / evt.total)*100; console.log(percentComplete); } }; xhr.onload = function() { console.log(files[i].name + " uploaded!"); }; xhr.open("post", "/images/upload", false); xhr.send(form); I have tested this in both Firefox and Chrome. I have no idea if i missed some documentation but could not find anything that indicated that the xhr.upload.onprogress event is not fired when async = false?. If i change the request to run with async = true it´s fired.
has answer: http://stackoverflow.com/a/26449965
type: Question
score: 3
has comment: http://stackoverflow.com/comment/41541467
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26449965
tagged with: ajax
tagged with: form-data
tagged with: xmlhttprequest
tagged with: asynchronous
favorite count: 0
type: AnsweredQuestion
has title: XMLHttpRequest onprogress not firing on async = false
upvote count: 3

http://stackoverflow.com/a/28252456
upvote count: 19
answers question: http://stackoverflow.com/q/26499538
has body: You've probably already solved your problem, but for anyone else out there that's struggling with this, here is my solution: var Twit = require('twit'); var T = new Twit({ consumer_key: '' , consumer_secret: '' , access_token: '' , access_token_secret: '' }) var options = { screen_name: 'sandagolcea', count: 3 }; T.get('statuses/user_timeline', options , function(err, data) { for (var i = 0; i &lt; data.length ; i++) { console.log(data[i].text); } }) This shows my last 3 tweets :) Cheers!
score: 19
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/63334968

http://stackoverflow.com/a/27434935
has body: Use "icon" and not "image". For example: title : 'Add Caution / Warning', icon : 'caution-warning', type : 'menubutton' and in your css file: i.mce-i-caution-warning { background-image: url('../images/caution-warning.png'); /* write the correct path */ }
type: Answer
answers question: http://stackoverflow.com/q/26380461
score: 0

http://stackoverflow.com/q/26363016
tagged with: variables
favorite count: 0
accepted answer: http://stackoverflow.com/a/26363298
has comment: http://stackoverflow.com/comment/41383768
score: -3
has body: This is my video. Using JS, how do I read the source of the video and put that URL into a variable?
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
has title: Put source of HTML5 video in JS variable
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/41383837
has answer: http://stackoverflow.com/a/26363298
possible better answer: http://stackoverflow.com/a/26363073
upvote count: 0
has answer: http://stackoverflow.com/a/26363073
tagged with: javascript
has answer: http://stackoverflow.com/a/26363042
has answer: http://stackoverflow.com/a/26363080
linked to: http://stackoverflow.com/q/767143

http://stackoverflow.com/comment/67225207
type: AnswerComment
has text: In fact, this answer caused me a trouble in a more sophisticated example, so I went for Sergio Toledo's one and everything got fine.
score: 0
comment on: http://stackoverflow.com/a/26486817
type: Comment

http://stackoverflow.com/comment/41383855
score: 0
comment on: http://stackoverflow.com/q/26359439
type: QuestionComment
type: Comment
has text: @Lightness How does that affect the answer?

http://stackoverflow.com/comment/41397556
type: QuestionComment
comment on: http://stackoverflow.com/q/26366269
score: 0
has text: @CSharper - OK, I get it, then what should I pass and how?
type: Comment

http://stackoverflow.com/comment/41550223
score: 0
comment on: http://stackoverflow.com/q/26454578
type: Comment
type: QuestionComment
has text: It doesn't look like this is all the relevant code. Where is the timer in your markup? What is models.competitors? I highly recommend you create a plunkr or a jsFiddle for really fast help.

http://stackoverflow.com/q/26447078
has title: Why the /users route in Express and Node?
has comment: http://stackoverflow.com/comment/41536497
has body: Edit: The default express app is this: var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var users = require('./routes/users'); ---------------------------------------- These refer to files that look like: var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res) { res.render('index', { title: 'Express' }); }); module.exports = router; ------------------------------ var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); // uncomment after placing your favicon in /public //app.use(favicon(__dirname + '/public/favicon.ico')); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', routes); app.use('/users', users); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); // error handlers // development error handler // will print stacktrace if (app.get('env') === 'development') { app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: err }); }); } // production error handler // no stacktraces leaked to user app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: {} }); }); module.exports = app; However, the documentation says: // this middleware will not allow the request to go beyond it app.use(function(req, res, next) { res.send('Hello World'); }) // requests will never reach this route app.get('/', function (req, res) { res.send('Welcome'); }) So my question, is why would a…
possible better answer: http://stackoverflow.com/a/37698774
has comment: http://stackoverflow.com/comment/41536728
tagged with: javascript
has answer: http://stackoverflow.com/a/37698774
score: 6
tagged with: express
has comment: http://stackoverflow.com/comment/41536693
type: AnsweredQuestion
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26447282
type: Question
has comment: http://stackoverflow.com/comment/41536523
has comment: http://stackoverflow.com/comment/41536471
answer count: 2
has comment: http://stackoverflow.com/comment/41536751
has comment: http://stackoverflow.com/comment/41536524
upvote count: 6
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26447282

http://stackoverflow.com/comment/41536595
comment on: http://stackoverflow.com/q/26447063
score: 0
type: Comment
type: QuestionComment
has text: take a look at ng repeat documentation .

http://stackoverflow.com/q/26498131
has body: I tried to view different sources and also looked into the forums posting similar question, but it didnt quite help me with the issue that im facing. I have a text input filed to which I'm adding a popover to show similar a list of names in the database. The inout field checks for validation, to see if the name entered is unique, if not it displays similar names available in the database that could be re-used. here is the popover snippet: $("#account_name_create").popover({ title: 'Twitter Bootstrap Popover', content: function (process) { this.accountCollection = new ipiadmin.collections.AccountCollection(); var newName = $("#new-account-form #account_name_create").val(); var userFilter = "accountName~'" + newName + "'"; this.accountCollection.fetch({ data: { "f": userFilter, "sortby": null, "type":"ipi", "pageno":0, "pagesize":2, "reversesort" : true }, cache: false, success: function(model, response, options) { var states = []; map = {}; $.each(model.aDataSet, function (i, state) { map[state.accountName] = state; states.push(state.accountName); }); process(states); //gives an error saying 'undefined is not a function (says process is undefined)' }, error: function(model, response, options) { console.log('error'); } }); }, }); here is the html: &lt;input type="text" id="account_name_create" name="account_name" class="" size="40" /&gt; I'm not sure how why it says 'process' as undefined. Also not sure if this would be the correct way of displaying the data in the popover. Any ideas?? Thanks!
tagged with: javascript
tagged with: jquery
has title: How to add content via ajax using the popover boostrap
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26498229
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/26498229
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/41535821
type: Comment
type: QuestionComment
score: 0
has text: just use `$.extend` to merge user defined options with your defaults. You normally wouldn't have `$(document).ready` within your plugin code
comment on: http://stackoverflow.com/q/26446440

http://stackoverflow.com/a/26399715
score: 0
answers question: http://stackoverflow.com/q/26399572
type: Answer
has body: Try this: $("input.color").css("background-color"); It will return you the specified background-color. and then do this to get the result: var color = $("input.color").css("background-color"); $("$target_element").css("background-color", color);

http://stackoverflow.com/q/26463491
has body: I have this code in native javascript and it works all right. it logs the textbox's current value &lt;script&gt; var boom = function(val) { console.log(val); }; &lt;/script&gt; &lt;input type="text" onclick="boom(this.value)"/&gt; Then I want to do the same on AngularJS without using model. Here is the code: $scope.boom = function(val) { console.log(val); }; &lt;input type="text" ng-click="boom(this.value)"/&gt; But it always logs undefined! Why?
has answer: http://stackoverflow.com/a/26463661
answer count: 3
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26463661
tagged with: angularjs
has answer: http://stackoverflow.com/a/26463618
has answer: http://stackoverflow.com/a/26463559
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41567618
upvote count: 10
has title: AngularJS - passing this.value into a function
type: Question
accepted answer: http://stackoverflow.com/a/26463559
tagged with: function
score: 10
tagged with: javascript
tagged with: angularjs-scope

http://stackoverflow.com/a/26451522
score: 13
upvote count: 13
has body: It appears that the MongooseArray#pull method only works if your elements have _id properties. I find it easier to use direct calls to update to avoid these sorts of surprises: mongoose.model('organization').update( {_id: user.organization}, {$pull: {members: {user: user._id}}}, function(err, numAffected) { ... } );
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26405798
type: Answer
accepted answer of: http://stackoverflow.com/q/26405798

http://stackoverflow.com/comment/41576942
comment on: http://stackoverflow.com/a/26462735
has text: Hi ignVinayak, are there any ways to check for errors in that function?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41604565
has text: IE8 SUCKS BRAH, don't use it
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26484877
type: Comment

http://stackoverflow.com/comment/41604036
comment on: http://stackoverflow.com/q/26465033
score: 1
has text: Depending what you are using to create the modal dialog, think of the dialog as a separate window. So when your session expires, it expires in the dialog. As part of the error handling, you should first close the dialog and then change the window.location. You could investigate broad-casting an event, and having a route that the app redirects to when the session expires.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/51916367
comment on: http://stackoverflow.com/q/26455646
score: 1
has text: This is a known issue with cordova. https://issues.apache.org/jira/browse/CB-8921
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26469125
downvote count: 0
score: 2
has body: To answer your question directly: I'm strongly suspect that you're getting the console.error: $apply already in progress which causes the $apply callback to not run. That said, you can get around that by using $timeout( cb ) instead of $scope.$apply( cb ). Be sure to dependency inject it if you want to use it: vm.showAllResults = showAllResults; function showAllResults(){ // Prevent 'bubbling' event.preventDefault(); event.stopPropagation(); // Second parameter notifies search to show full list of elements vm.search(vm.input.query, true); $timeout(function(){ vm.showAll = false; }); } However, as Avraam pointed out, in my opinion as well, vm.search should be a deferred method using $q (also dependency injected) which returns a promise, and calls .resolve/reject, which you use with .then like this: vm.showAllResults = showAllResults; function showAllResults(){ // Prevent 'bubbling' event.preventDefault(); event.stopPropagation(); // Second parameter notifies search to show full list of elements vm.search(vm.input.query, true) .then( function() { $timeout( function() { // &lt;-- This $timeout probably not needed... vm.showAll = false; }); }); }
answers question: http://stackoverflow.com/q/26467946
upvote count: 2
type: Answer

http://stackoverflow.com/a/26420311
answers question: http://stackoverflow.com/q/26419143
score: 0
has body: I have found my problem. it was a scroll section that causes the other jquery to stop. When I removed that part of the code, nothing bad with the carousel happened and the other parts worked fine!
type: Answer

http://stackoverflow.com/q/26425841
tagged with: jquery
has title: grabbing Reddit data via javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26426040
has comment: http://stackoverflow.com/comment/41496962
linked to: http://stackoverflow.com/q/8191105
score: 2
upvote count: 2
type: AnsweredQuestion
has body: I came across this post, which is pretty much what I'm looking to do: How to extract url data from Reddit API using JSON I have modified the jsfiddle that was provided (NSFW http://jsfiddle.net/DHKtW/170/) to read: $.getJSON("http://www.reddit.com/r/pics/.json?jsonp=?", function(data) { $.each(data.data.children, function(i,item){ console.log($('.score.likes').html(item)); }); }); My goal is to gather the total amount of upvotes on a given page. When you run this and look at the console, objects are being returned but not the actual number. I thought just calling html on the selector would return the number of votes but apparently am wrong. Any better way of doing this?
linked to: http://stackoverflow.com/q/10844664
type: Question
has answer: http://stackoverflow.com/a/26426040
has comment: http://stackoverflow.com/comment/41496740
has comment: http://stackoverflow.com/comment/41496639
tagged with: reddit
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26408714
has comment: http://stackoverflow.com/comment/41466125
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26408914
has answer: http://stackoverflow.com/a/26408883
tagged with: css
has comment: http://stackoverflow.com/comment/41466335
tagged with: coldfusion
type: AnsweredQuestion
has body: I am trying to display the message when I make a comment and it is not displaying all the new lines. so I have a text area and when I make a comment with it , its shows the way its supposed to text 1 text 2 this is the output of the message #message# but when I approve the comment the text shows text 1 text 2 how do I make my #message# show these new lines that were showing from text area ? thanks in advance
linked to: http://stackoverflow.com/q/11330993
type: Question
accepted answer: http://stackoverflow.com/a/26408883
tagged with: javascript
has title: message is not displayed on a new line
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26408850
possible better answer: http://stackoverflow.com/a/26408914

http://stackoverflow.com/comment/41464595
type: AnswerComment
has text: But, I think this is going to show the loading icon in all the pets that aren´t liked. I managed to do it using something like you commented yesterday: `ng-show="$currentIndex == $index"`. If you edit the answer with that I will vote you. Thanks!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26407843

http://stackoverflow.com/q/26418587
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41483954
has title: How to call a function on html event with context?
answer count: 1
accepted answer: http://stackoverflow.com/a/26418615
has comment: http://stackoverflow.com/comment/41484134
has answer: http://stackoverflow.com/a/26418615
has comment: http://stackoverflow.com/comment/41484049
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41483942
type: Question
has body: I want to access event properties in a js function which is called on html onkeypress event. HTML code &lt;input type="text" id="name" name="name" placeholder="Name" onkeypress='keypress_event()'&gt; Javascript function keypress_event(event) { console.log(event.charCode); }
has comment: http://stackoverflow.com/comment/41483972

http://stackoverflow.com/comment/41582378
type: Comment
type: QuestionComment
has text: @guimadaleno To be fair, you specified in your question that you didn't know how it worked. *"Does anyone know how do I run a Node.js script in my HTML page, without displaying the source code, as PHP does? Is that way how it really works?"* No, that's not at all how it works.
score: 0
comment on: http://stackoverflow.com/q/26472077

http://stackoverflow.com/comment/41448381
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26398379
has text: Thanks your reply, but if i want to check unknown property suppose var index = 'age'; var age = itemList[i].age, it will be error because age is not the property of that object, according to all of the case, which is better?
type: AnswerComment

http://stackoverflow.com/a/64510846
downvote count: 0
has comment: http://stackoverflow.com/comment/138074764
has comment: http://stackoverflow.com/comment/131670788
upvote count: 105
has body: In 2020 you can listen to state changes with the useEffect hook like this export function MyComponent(props) { const [myState, setMyState] = useState('initialState') useEffect(() =&gt; { console.log(myState, '- Has changed') },[myState]) // &lt;-- here put the parameter to listen, react will re-render component when your state will be changed }
score: 105
has comment: http://stackoverflow.com/comment/128718111
type: Answer
has comment: http://stackoverflow.com/comment/127924929
has comment: http://stackoverflow.com/comment/123029309
answers question: http://stackoverflow.com/q/26402534

http://stackoverflow.com/comment/41392754
comment on: http://stackoverflow.com/q/26366147
type: Comment
type: QuestionComment
has text: Yeah this isn't possible I'm pretty sure is the problem. Google maps has specific layers that are predetermined for where the map itself is drawn, where the text overlays are drawn, where the roads are drawn, where the shapes/polygons are drawn, where the traffic is drawn, where the info windows are drawn, etc. So basically these are in a set stack and you can't change it, you would have to make custom Overlays and stack them in yourself I think (this might have changed but last I used it you couldn't modify built in Overlay order).
score: 1

http://stackoverflow.com/q/26414669
has comment: http://stackoverflow.com/comment/41477680
type: Question
has comment: http://stackoverflow.com/comment/41477345
tagged with: c#
has comment: http://stackoverflow.com/comment/41477638
tagged with: javascript
has answer: http://stackoverflow.com/a/28506252
has answer: http://stackoverflow.com/a/26415180
has comment: http://stackoverflow.com/comment/41477169
has comment: http://stackoverflow.com/comment/41478106
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26415180
has body: I'm working on a asp.net project and I need to find a tab in a browser by the URL and close that tab... is there a way to do this by c# or scripting languages? the solutions that works even in one browser (i.e. firefox) is enough for me. thanks.
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/26448055
has title: find a browser tab by URL and close it
linked to: http://stackoverflow.com/q/4994040
has comment: http://stackoverflow.com/comment/41477451
answer count: 4
has answer: http://stackoverflow.com/a/26414852
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26448055

http://stackoverflow.com/q/26449970
has comment: http://stackoverflow.com/comment/41541500
favorite count: 0
score: -1
tagged with: tampermonkey
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: How can I do that for every 'a' tag in a page. My goal is to use this for Google search results to access results without google redirection (used in the href attribute) since the actual link is stored in the data-href attribute. So using Tampermonkey with the following script didn't work, and I don'k know why: $('body').append('&lt;input type="button" value="Fix Href Attributes" id="GG"&gt;'); $("#GG").css("position", "fixed").css("top", 18).css("left", 770); $('a').each(function(){ var $currentA = $(this); var dataHref = $currentA.attr('data-href'); $currentA.attr('href',dataHref); }); How can I do this?
has title: Replacing href attribute with data-href attribute using Javascript
has comment: http://stackoverflow.com/comment/41541584
has answer: http://stackoverflow.com/a/26450018
has comment: http://stackoverflow.com/comment/41541623
tagged with: google-chrome
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41541682
has comment: http://stackoverflow.com/comment/41541760
has comment: http://stackoverflow.com/comment/41541565
answer count: 1

http://stackoverflow.com/comment/41617115
comment on: http://stackoverflow.com/q/26490003
score: 0
has text: All you need to do is set a higher z-index on the object that is behind the clown head currently. If you make a JSFiddle using your assets, it will be easier for us to help you.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41375650
score: 3
comment on: http://stackoverflow.com/q/26358667
type: Comment
type: QuestionComment
has text: This might be more for codereview.stackexchange.com

http://stackoverflow.com/comment/41479987
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26416227
has text: Because I gave it a left value in my stylesheet.

http://stackoverflow.com/comment/41433774
type: Comment
type: QuestionComment
has text: Please post your code here, not just as a jsfiddle link.
comment on: http://stackoverflow.com/q/26390152
score: 0

http://stackoverflow.com/comment/41570508
has text: Maybe? Can you share with us what you have tried?
score: 0
comment on: http://stackoverflow.com/q/26466236
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41478898
score: 1
has text: `closest` doesn't work like that, it only looks at ancestors, second version is invalid syntax
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26415705

http://stackoverflow.com/comment/41499612
has text: Tip: If you could get a `string` out of the `date/time` in the format `YYYY/MM/DD HH:mm:ss` and concatenate it with the `title`, you then could sort the `array` by this _merged_ data.
score: 0
comment on: http://stackoverflow.com/q/26427305
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26385183
has comment: http://stackoverflow.com/comment/41428557
possible better answer: http://stackoverflow.com/a/26385297
has body: i want ask about accesskey how i can remove alt, i have this code &lt;a id="button_new_order" accesskey="n"&gt;&lt;img src="view/image/pos/new_off.png" title="&lt;?php echo $button_new_order; ?&gt;" alt="&lt;?php echo $button_new_order; ?&gt;"/&gt;&lt;/a&gt; so my acces key is n and i must press alt + n to get new order but i like to use n only cause make easy. how can i do that thanks. as for now im already know how to use accesskey on html but for make it simple i still dont know.
has comment: http://stackoverflow.com/comment/41424487
has comment: http://stackoverflow.com/comment/41424394
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26386435
tagged with: javascript
linked to: http://stackoverflow.com/q/593602
has answer: http://stackoverflow.com/a/43823799
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26385297
score: 0
answer count: 3
has title: remove alt from accesskey
has answer: http://stackoverflow.com/a/26386435

http://stackoverflow.com/comment/41611925
has text: How do you know this is not working? I don't see you're doing anything with the result of the ajax call, the zip file. You don't need to make it an ajax call, btw. Simple link to `ImageViewer/GetZipPhotos` should do what you want. Also, you probably want to use built-in `FileResult` and make the zip file in that action.
type: Comment
comment on: http://stackoverflow.com/q/26488690
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41630236
has text: @AnthonyForloney Do you mean I could do 'document.getElementById('subtotal', 'tax', 'total');'? Or do you mean put the computeCost function in there?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26498634

http://stackoverflow.com/comment/41654157
comment on: http://stackoverflow.com/q/26510942
type: Comment
has text: You're using global variables, so don't be surprised when some data of yours gets clobbered.
score: 1
type: QuestionComment

http://stackoverflow.com/q/26485018
type: Question
answer count: 2
has title: how to push data in array if there is data in another array
has answer: http://stackoverflow.com/a/26485176
tagged with: arrays
tagged with: javascript
tagged with: jquery
tagged with: jquery-select2
score: 0
has body: Ok, i know it might be simple for some guys, but i am trying this for hours and have no success till now. if i have data in this array var tDataValues = { id: "TenantID", text: "FullName", username: "Username", cnic: 'CNIC' } i am sending this variable to the function commonSelect2Templating(selector,url,tDataValues,minInputLength,placeholder); Note: I'm using Jquery Select2 (Sharing if it can help my question to understand.) Then in that function in results Section i am trying to assign values results: function(data, page) { var newData = []; var length = data.length + 1; for(var i = 0; i&lt;=length; i++){ } $.each(data, function (index,value) { newData.push({ id: value[tDataValues.id], //id part present in data text: value[tDataValues.text] //string to be displayed }); }); return { results: newData }; } This is the data coming from the Server: [{"TenantID":"13","FullName":"Rameez Hassana","Username":"Rameez","CNIC":"16141-6321136-1"},{"TenantID":"14","FullName":"Syed Haider Hassan","Username":"pakistanihaider","CNIC":"17301-5856870-1"},{"TenantID":"15","FullName":"Demo Tenant No 1","Username":"tn1","CNIC":"15165-6156685-6"}] Coming to the The Problem: Right now all the magic is happening here. $.each(data, function (index,value) { newData.push({ id: value[tDataValues.id], //id part present in data text: value[tDataValues.text] //string to be displayed }); Its Telling the code which is id and which is text, and it is working perfectly fine. Now the Problem here is function i am trying to make is Common Function for the select2, and if i have more values from db, like now i am getting from database how to make a loop and set those values one by one to its proper context. e-g tDataValues holds the fieldName cnic and server is sending the fieldName CNIC so how to make a loop that if cnic exist in both then it should simply assign, i can do that manually newData.push({ cnic: value[tDataValues.cnic] }); But like this it can not be a common function. i can not simply mak…
possible better answer: http://stackoverflow.com/a/26485375
accepted answer: http://stackoverflow.com/a/26485176
has answer: http://stackoverflow.com/a/26485375
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41604566

http://stackoverflow.com/comment/41604019
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26483846
has text: I'm confused what you're trying to repeat as `configType` is just a string value? You might want to post a jsfiddle of what you've got so far.
score: 0

http://stackoverflow.com/q/26415503
upvote count: 2
answer count: 2
has title: javascript replace matches after regex exec
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26415864
has answer: http://stackoverflow.com/a/26415547
tagged with: regex
tagged with: exec
has comment: http://stackoverflow.com/comment/41478577
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26415864
downvote count: 0
type: Question
has body: I have this text: &lt;div id="myDiv"&gt; myText: something1 othertext myText: something2 othertext myText: something3 .... &lt;div&gt; I'm matching only the text after the string: myText: on multiple lines using this js: var myDivText = document.getElementById('myDiv').innerHTML; var r = /myText:\s*([A-Za-z0-9-]+)/gim; var m; while ((m = r.exec(myDivText)) != null){ console.log(m[1]); } It outputs properly: something1, something2, something3, etc. Now I need to replace these matches with the word "ReplacedWord" How can I do it?
possible better answer: http://stackoverflow.com/a/26415547
tagged with: replace

http://stackoverflow.com/comment/41512898
type: Comment
type: QuestionComment
has text: Maybe this comment from the post you referenced may be helpful: This won't work if the loadMoreItems function takes shorter than 1000 msecs, because then destroy would be called after the bind – mhu Jun 26 at 10:58
comment on: http://stackoverflow.com/q/26434029
score: 0

http://stackoverflow.com/comment/41470176
type: QuestionComment
has text: Sorry, i have a bad habit of posting and editing, so much so that i often forget that i even do it. :)
score: 0
comment on: http://stackoverflow.com/q/26410791
type: Comment

http://stackoverflow.com/q/26500071
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: templates
tagged with: handlebars.js
has answer: http://stackoverflow.com/a/26506025
accepted answer: http://stackoverflow.com/a/26506025
has title: Use same Handlebars template for all the pages
has body: I have this use-case where I would like to have one navbar for all the pages. The technique which I used until now was to keep an external JSON file and fetch it using jQuery .getJSON library. I was using jQuery DOM methods to generate the HTML. That I am finding messy and would love to use Handlebars template instead. But my doubt is, in Handlebars you add script within script tag inside the HTML. So is there a way to just write an individual Handlebars template and invoke it on all the pages? I have done some searching and couldn't find anything. I am just asking if I can embed Handlebars template like that or I do have to explicitly embed for all the pages for which I need the navbar? In other words, can I add Handlebars template inside a xyz.js file.
type: AnsweredQuestion

http://stackoverflow.com/comment/51057865
score: 1
comment on: http://stackoverflow.com/a/31536638
type: AnswerComment
has text: Great. I'd give it a try. But it was centuries ago. :)
type: Comment

http://stackoverflow.com/comment/41607122
comment on: http://stackoverflow.com/q/26485049
has text: Hopefully [@jesup](http://stackoverflow.com/users/105687/jesup) sees this question and can answer for FireFox :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41488142
comment on: http://stackoverflow.com/a/26397679
has text: I add remote.message and page.error, but nothing change : http://s2.postimg.org/disy0fqc7/screen3.png . Maybe I missused ? can you explain how I can use the ressourse.* ? Really thanks for help and your patience, Im a CasperJS newbies x)
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41478258
score: 0
comment on: http://stackoverflow.com/q/26411492
type: Comment
type: QuestionComment
has text: Fair enough, but it is concise and the answer is exactly what someone looking for this type of thing would want, so I don't think it should be closed.

http://stackoverflow.com/comment/41494249
has text: The actual result is -3000, so £-3000.... I add the £ (but will do that later.. One of the filter removes - (minus symbol).. This is where i want the text (minus) to appear.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26423309

http://stackoverflow.com/q/26477072
score: 0
has answer: http://stackoverflow.com/a/26477260
has answer: http://stackoverflow.com/a/26477160
answer count: 3
has comment: http://stackoverflow.com/comment/41591316
upvote count: 1
has title: &= operator in javascript to reduce booleans
favorite count: 0
has comment: http://stackoverflow.com/comment/41591167
has answer: http://stackoverflow.com/a/26477168
has comment: http://stackoverflow.com/comment/41591168
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26477160
has comment: http://stackoverflow.com/comment/41591337
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26477260
has comment: http://stackoverflow.com/comment/41591253
tagged with: javascript
has comment: http://stackoverflow.com/comment/41591311
has comment: http://stackoverflow.com/comment/41591157
has body: I am trying to write an efficient function using idiomatic C style, and I have some concerns curiosity about the correctness performance. I have a function which takes a list of class strings and what it does is it walks up the DOM hierarchy matching nodes against the list of class strings. A check passes only if all of the class strings match with the element's className prop. So... function nearestParent(elem, clasz, stopat) { // stopat can be used to stop the search short. For speed. // make sure you do not use jquery elements if (typeof clasz === 'string') { clasz = [clasz]; } do { elem = elem.parentNode; for(var i=0,l=clasz.length,pass=true, cn=elem.className;i&lt;l;++i) { pass &amp;= ~cn.indexOf(clasz[i]); } if(pass) return elem; } while (elem &amp;&amp; elem != stopat); } The for loop as you can see here is basically checking for string matches using indexOf. However the pitfall that I see is that if the value returned by indexOf is odd, pass gets set to the wrong value: ~3 &amp; 1 = 0. So it seems like a correct implementation would be pass &amp;= cn.indexOf(clasz[i]) != -1; or perhaps pass &amp;= !!~cn.indexOf(clasz[i]);... I wonder which way is fastest?

http://stackoverflow.com/a/26460284
type: Answer
has comment: http://stackoverflow.com/comment/41560201
upvote count: 1
has comment: http://stackoverflow.com/comment/41562527
accepted answer of: http://stackoverflow.com/q/26460168
has body: You can use below code window.open("mywindow.html", "mywindow title", "left=460,top=200,location=1,status=1,scrollbars=1, width=400,height=250"); Properties url - for redirecting page name title - for window title left,top - for window position height/width - for window height/width scrollbars - it enables scrollbars on window. Edit : updated answer if(Request.QueryString["parameter1]=="demo") { Page.Title = "Demo title"; } else { Page.Title = "different title"; }
score: 1
has comment: http://stackoverflow.com/comment/41565213
has comment: http://stackoverflow.com/comment/41565286
has comment: http://stackoverflow.com/comment/41565410
has comment: http://stackoverflow.com/comment/41560333
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26460168
downvote count: 0
has comment: http://stackoverflow.com/comment/41560111
has comment: http://stackoverflow.com/comment/41560413

http://stackoverflow.com/comment/41577189
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26468965
has text: Well, that actually worked for positioning the arrow, but not the box, but I was able to adapt it and get it working (one variable for positioning the box, and one variable for positioning the arrow).

http://stackoverflow.com/q/26413564
tagged with: http://stackoverflow.com/tag/csv
has title: HighCharts Graphs don't load half the time
has body: I am displaying about 10 graphs on a webpage using highcharts. The problem I have having is that the graphs only load a portion of the time, usually around 50%. I am not sure if this is relevant, but the first graph, made using GDPC1.csv, loads every time. Here is the code I am using to create all the graphs: var xmlhttp = new XMLHttpRequest(); var unratexml = new XMLHttpRequest(); var cpixml = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { var d = csvToArray(xmlhttp.responseText); var c = csvToArray(unratexml.responseText); var x = csvToArray(cpixml.responseText); createGDPChart(d); createUNRATEChart(c); createCPIChart(x); } } xmlhttp.open("GET","GDPC1.csv",true); xmlhttp.send(); unratexml.open("GET","UNRATE.csv",true); unratexml.send(); cpixml.open("GET","test.csv",true); cpixml.send(); The only thing I can think of is that it has something to do with my if statement, maybe it comes up false most of the time, but I don't know enough about javascript to know what to change. Thanks in advance.
score: 0
accepted answer: http://stackoverflow.com/a/26413771
type: AnsweredQuestion
type: Question
tagged with: highcharts
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26413771

http://stackoverflow.com/comment/41773406
type: Comment
type: QuestionComment
has text: Honestly, I am not quite sure how to check that, I haven't updated it in awhile. Why are there new features, I can easily update it.
score: 0
comment on: http://stackoverflow.com/q/26507960

http://stackoverflow.com/q/26423075
has answer: http://stackoverflow.com/a/26423181
has title: Using jQuery to load icon based on contents
score: 0
has body: I have a website where the content is dynamically loaded from a database. The contents varies for each label. One may be generated as General:, whilst another may be generated as TV:. My question is, is there any way that jQuery could (based on the HTML output for the label) replace the NAME: with a font awesome icon? So for example: TV: Would become:
has answer: http://stackoverflow.com/a/26423268
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41491580
answer count: 5
accepted answer: http://stackoverflow.com/a/26423181
tagged with: css
has answer: http://stackoverflow.com/a/26423332
has answer: http://stackoverflow.com/a/26423158
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26423158
type: Question
has answer: http://stackoverflow.com/a/26423269
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26375592
downvote count: 0
has body: I am currently creating a d3 axis using d3.time.scale.utc(). My input for the axis is a series of time offsets in minutes (with decimal values). For example: var minuteOffsets = [0.03, 1.65, 3.22, ..., 89.91, 90.01]; I want to display these time offsets in mm:ss format on the axis. The axis labels can be at standard intervals, like so: +------+------+-- ... --+------+------+-- ... --+------+ 00:00 00:30 01:00 59:30 60:00 60:30 90:00 90:30 Note specifically that the minute value should show values >60. The seconds value has the normal range 0-59. When I tried using .tickFormat(d3.time.format('%M:%S')), it wraps the minute value back to 00:00 after the 45:00 label. I also had a look at duration from moment.js, but I can't figure out how exactly to incorporate that into my code.
favorite count: 0
tagged with: d3.js
has answer: http://stackoverflow.com/a/26623572
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26623572
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/41409476
score: 3
tagged with: time-series
tagged with: timespan
tagged with: javascript
has title: Show time durations on a d3 axis
answer count: 1

http://stackoverflow.com/q/26437290
tagged with: web-sql
upvote count: 1
has comment: http://stackoverflow.com/comment/41538458
has comment: http://stackoverflow.com/comment/41539880
favorite count: 0
has comment: http://stackoverflow.com/comment/41576426
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
tagged with: android
has body: I am creating a Phonegap app (Android and iOS) using AngularJS and Websql. My problem is that i am finding it difficult getting from the Websql query into controller/view. This is my code. My App {{cat.catID}} {{cat.Title}} {{cat.cCount}} {{cat.mCount}} Controller Script var inmomentNameSpace = angular.module('inmoment', []); inmomentNameSpace.controller('sampleController', function sampleController( $scope) { db.transaction(function(tx) { $("#catList").empty(); tx.executeSql( 'SELECT CATEGORY.catID, CATEGORY.Title, CATEGORY.image, COUNT(SUBCATEGORY.subID) as cCount, COUNT(MESSAGETB.mesID) as mCount, SUBCATEGORY.title, SUBCATEGORY.catID FROM CATEGORY LEFT OUTER JOIN SUBCATEGORY ON CATEGORY.catID = SUBCATEGORY.catID LEFT OUTER JOIN MESSAGETB ON SUBCATEGORY.subID = MESSAGETB.subID GROUP BY CATEGORY.catID ORDER BY CATEGORY.Title ASC', [], function(tx, results) { var len = results.rows.length; var catObj = []; for (var i = 0; i < len; i++) { catObj[i] = results.rows.item(i); } console.log(catObj); $scope.cats = catObj; }) }) }) When I console.log(catObj), I get the results alright, but they seem not work with my controller. I will be glad if anyone can help me. Thank you
answer count: 0
downvote count: 0
score: 1
type: Question
tagged with: javascript
has title: Working with AngularJS and Websql phonegap app
has comment: http://stackoverflow.com/comment/41519063

http://stackoverflow.com/q/26364489
type: AnsweredQuestion
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26370440
has title: Gulp-compile-handlebars for multiple html pages?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26370440
upvote count: 2
answer count: 1
tagged with: gulp
tagged with: handlebars.js
has body: As of now I just have two gulp tasks, ex gulp.task('handlebars-index'), gulp.task('handlebars-about'). Below is code from the docs, https://www.npmjs.org/package/gulp-compile-handlebars I am not sure how I can handle the task for two .handlebars files. var gulp = require('gulp'); var handlebars = require('gulp-compile-handlebars'); var rename = require('gulp-rename'); gulp.task('handlebars', function () { var templateData = { firstName: 'Kaanon' }, options = { ignorePartials: true, //ignores the unknown footer2 partial in the handlebars template, defaults to false partials : { footer : ' the end ' }, batch : ['./src/partials'], helpers : { capitals : function(str){ return str.toUpperCase(); } } } // here how do I add an index.html and say and about.html? return gulp.src('src/index.handlebars') .pipe(handlebars(templateData, options)) .pipe(rename('index.html')) .pipe(gulp.dest('dist')); }); You can see with the above the task basically takes the index.handlebars then compiles it and creates an index.html file. If I added an array of handlebar files how will the task know how to create the .html version? return gulp.src(['src/index.handlebars','src/about.handlebars']) .pipe(handlebars(templateData, options)) .pipe(rename('index.html')) .pipe(rename('about.html')) .pipe(gulp.dest('dist')); The above won't work obviously.
score: 2

http://stackoverflow.com/comment/41390298
score: 0
has text: Check the generated client html code and the corresponding your js code. Pls read this [link](http://www.dotnetodyssey.com/2014/10/04/calling-javascript-code-behind-asp-net-using-c-how-it-works/)
type: QuestionComment
comment on: http://stackoverflow.com/q/26356730
type: Comment

http://stackoverflow.com/comment/41434542
has text: yes we tried that code
comment on: http://stackoverflow.com/q/26390546
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41555548
has text: That is the minimal code and straight to point. Most the things such as PHP Codes has been stripped.
comment on: http://stackoverflow.com/q/26457555
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41551153
type: QuestionComment
comment on: http://stackoverflow.com/q/26455094
has text: @ValentinWaeselynck Please visit this link to see screenshot of my onEdit function https://drive.google.com/file/d/0B8oqG1tmIuPARkpwZU0wMW9RZDA/view?usp=sharing
score: 0
type: Comment

http://stackoverflow.com/comment/41384075
comment on: http://stackoverflow.com/q/26363160
has text: `sheetCount = Math.ceil(quantity / 50);` ?
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/131029511
comment on: http://stackoverflow.com/a/53665248
type: Comment
score: 0
type: AnswerComment
has text: Thanks, I was trying to use a class)

http://stackoverflow.com/comment/41538569
has text: i need to rotate imgar can we do that
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26448377
type: Comment

http://stackoverflow.com/a/26469704
accepted answer of: http://stackoverflow.com/q/26463673
upvote count: 2
has comment: http://stackoverflow.com/comment/41577583
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41577134
has comment: http://stackoverflow.com/comment/41578112
has comment: http://stackoverflow.com/comment/41606894
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41607505
downvote count: 0
has comment: http://stackoverflow.com/comment/41588784
has body: I don't think you can change anything on how Internet Explorer works. Indeed, it behave really badly with IE. What you should do, is using this simple workaround using fixed positionning : jsFiddle demo if (scrollTop &gt; 20) { // Stays fixed on top $("thead").css({ position: 'fixed', top: 0 }).closest('table').addClass('scrolling'); } else { // Moves with scroll $("thead").css({ position: 'static', top: 'auto' }).closest('table').removeClass('scrolling'); } Then you can remove this css : thead { position: absolute; top: 10px; } And add this one : table.scrolling { margin-top: 50px; } Edit : For more sophisticated integration, you might want to take a look at this ready-made plugin, tested and working fine with Internet Explorer : StickyTableHeaders
answers question: http://stackoverflow.com/q/26463673

http://stackoverflow.com/comment/41497062
type: Comment
has text: @Murphy1976 wow! OK, well a good lesson you've stumbled across is that web technologies change very quickly - an article from 2010 is, in some ways, inherently suspicious because so many things may have changed since then. Good luck!!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26412040

http://stackoverflow.com/q/26479545
has comment: http://stackoverflow.com/comment/41595426
has answer: http://stackoverflow.com/a/26479590
score: 0
has body: Title If I un-comment the second document.write() in the loop inside the function then it hangs (it does not display anything and times out). I appreciate your help.
answer count: 1
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26479590
has title: document.write hangs and times out
type: Question

http://stackoverflow.com/comment/67821356
type: Comment
has text: do not forget to empty cache or deactivate it
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/40281342

http://stackoverflow.com/q/26498459
has comment: http://stackoverflow.com/comment/41629768
has comment: http://stackoverflow.com/comment/41629661
downvote count: 1
has title: JavaScript loop table not placed right
type: Question
upvote count: 0
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26498532
answer count: 3
possible better answer: http://stackoverflow.com/a/26498546
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26498546
favorite count: 0
has body: I'm trying to make a calender but the daynames on top arent quite where they should be. the sunday box "sun" keep floating on the top left, i'd like to have it next to the other days (on the left of monday) var dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; var today = new Date(); var dag = today.getDay(); var myMonth = today.getMonth(); var jaar = today.getFullYear(); var volBtn = document.getElementById('Volgende'); var vorBtn = document.getElementById('Vorige'); function Kalender() { var myHTML = ''; myHTML += ' ' + monthNames[myMonth] + " " + jaar + ' '; for (var i = 0; i < dayNames.length; i++) { myHTML += ' ' + dayNames[i] + ' ' + ' '; if (i % 6 == 0) { myHTML += " "; } }; for (var i = 1; i <= monthLength[myMonth]; i++) { myHTML += " " + i + " "; if (i % 7 == 0) { myHTML += " "; } } myHTML += ' '; document.getElementById('div').innerHTML = myHTML; } var VolgendeFunc = function() { myMonth = myMonth + 1; if (myMonth == 11) { volBtn.disabled = true; vorBtn.disabled = false; } else { vorBtn.disabled = false; volBtn.disabled = false; } document.getElementById('month').innerHTML = myMonth; Kalender(); } var VorigeFunc = function() { myMonth = myMonth - 1; if (myMonth == 0) { vorBtn.disabled = true; volBtn.disabled = false; } else { vorBtn.disabled = false; volBtn.disabled = false; } document.getElementById('month').innerHTML = myMonth; Kalender(); } Kalender(); #div { font-size: 19px; } #div tr { color: #2b2b2b; width: 30px; height: 30px; line-height: 30px; text-align: center; border: 1px solid #e6e6e6; cursor: default; } #cal { font-size: 30px; -moz-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.25); -webkit-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.25); margin: 50px auto; font: "Helvetica Neue"; display: table; } #cal td { color: #2b2b2b; width: 30px; …
accepted answer: http://stackoverflow.com/a/26498532
has answer: http://stackoverflow.com/a/26498565
tagged with: css
has comment: http://stackoverflow.com/comment/41629704
type: AnsweredQuestion

http://stackoverflow.com/comment/41437324
comment on: http://stackoverflow.com/a/26392117
has text: For some reason it adds the class before the bottom of the div reaches the top of the page
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26425713
has comment: http://stackoverflow.com/comment/110233317
has comment: http://stackoverflow.com/comment/41496332
answers question: http://stackoverflow.com/q/26425637
score: 137
has body: Using regex: var str = "my car is red"; var stringArray = str.split(/(\s+)/); console.log(stringArray); // ["my", " ", "car", " ", "is", " ", "red"] \s matches any character that is a whitespace, adding the plus makes it greedy, matching a group starting with characters and ending with whitespace, and the next group starts when there is a character after the whitespace etc.
has comment: http://stackoverflow.com/comment/89985860
has comment: http://stackoverflow.com/comment/114304280
type: Answer
has comment: http://stackoverflow.com/comment/114318443
downvote count: 0
upvote count: 137

http://stackoverflow.com/a/26452961
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26452933
answers question: http://stackoverflow.com/q/26452933
has comment: http://stackoverflow.com/comment/41546996
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: You are just checking if the browser supports it, but not assigning any function to the handler, which would act as the callback if("onhashchange" in window) { window.onhashchange = function(){ alert("Hash changed!"); } }

http://stackoverflow.com/comment/41423624
comment on: http://stackoverflow.com/q/26384750
has text: `value` isn't a valid attribute on `li` elements. You should use `data-value` instead.
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/a/26494597
upvote count: 1
score: 1
has body: martypdx's answer probably explains why your current code doesn't work, but you can also take advantage of the fact that the isAfter function will default to the current time if you pass no arguments. In other words, the code you gave is equivalent to: {{#if EndDateTime.isAfter() }} This is in the documentation here.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26488341

http://stackoverflow.com/comment/41592706
type: QuestionComment
has text: more than the memory, you should be concerned about bandwidth and network latency.
score: 0
comment on: http://stackoverflow.com/q/26477909
type: Comment

http://stackoverflow.com/comment/41544915
type: AnswerComment
has text: I forgot all about `substr`; it should be more efficient than using a `for` loop, I'll accept this when the timer expires, thanks.
type: Comment
comment on: http://stackoverflow.com/a/26451830
score: 0

http://stackoverflow.com/comment/41454978
type: AnswerComment
score: 0
type: Comment
has text: 'range' variable in the code mentioned in the question does give the content until click.. No?
comment on: http://stackoverflow.com/a/26380504

http://stackoverflow.com/a/26361655
has comment: http://stackoverflow.com/comment/41386850
downvote count: 1
upvote count: 0
has body: You can try to use ServerVariables string Hostname=Request.ServerVariables["REMOTE_HOST"]; string Username=Request.ServerVariables["REMOTE_USER"];
score: -1
answers question: http://stackoverflow.com/q/26360544
type: Answer

http://stackoverflow.com/q/26456453
upvote count: 5
tagged with: javascript
possible better answer: http://stackoverflow.com/a/40317718
has title: How to add a button to play YouTube video full screen using JavaScript?
answer count: 2
score: 5
linked to: http://stackoverflow.com/q/7615380
downvote count: 0
has answer: http://stackoverflow.com/a/26468795
has comment: http://stackoverflow.com/comment/41553450
has body: I'm coding a Google Chrome extension where I embed a YouTube video: I then added a button below that should allow a user to click to play this video in full screen: Play full screen The work is done via JavaScript (and jQuery) using the code I found here: $("#lnkFullScreen").click(function(e) { e.stopPropagation(); e.preventDefault(); var playerElement = document.getElementById("ytplayer"); playerElement.playVideo(); //`playVideo` is undefined var requestFullScreen = playerElement.requestFullScreen || playerElement.mozRequestFullScreen || playerElement.webkitRequestFullScreen; if (requestFullScreen) { requestFullScreen.bind(playerElement)(); } }); But when I run this code the playVideo function is undefined for playerElement. Any idea what am I doing wrong? PS. I want my player to remain in HTML5.
favorite count: 0
has comment: http://stackoverflow.com/comment/41553961
tagged with: google-chrome-extension
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41553461
accepted answer: http://stackoverflow.com/a/26468795
tagged with: youtube-api
tagged with: google-chrome
tagged with: youtube
type: Question
has answer: http://stackoverflow.com/a/40317718

http://stackoverflow.com/a/26486841
score: 0
has body: I doubt that you would be using the value of i after the success function. But since the request is asynchronous and you read the value of i synchronously, you might not be able to get the final value, as the JavaScript executes the command before the AJAX Call. May be you can do this. Instead of alert(), you can use console.log() and check if the function is getting executed. This is the right way. My suggestion would be to put the code that uses the value of i after the AJAX call inside a function and call the function in the success function of the AJAX call.
has comment: http://stackoverflow.com/comment/41607866
answers question: http://stackoverflow.com/q/26486781
type: Answer
has comment: http://stackoverflow.com/comment/41607904

http://stackoverflow.com/comment/41468375
score: 0
type: Comment
type: QuestionComment
has text: You should look in to custom directives.
comment on: http://stackoverflow.com/q/26409596

http://stackoverflow.com/comment/44070783
comment on: http://stackoverflow.com/q/26415778
type: Comment
type: QuestionComment
has text: @Kaiido, Yes I thought this was the case. However, I was thinking it would be possible to distort the image to match that of Chrome. Any ideas on how to do this? (I'd stopped working on this for couple months and only just now getting back to it...)
score: 0

http://stackoverflow.com/a/26512451
downvote count: 0
answers question: http://stackoverflow.com/q/26497903
has body: Instead of using OculusRiftEffect I would recomend using VREffect and VRContols and a Firefox VR build or Chrome VR build.
type: Answer
has comment: http://stackoverflow.com/comment/41686983
score: 1
upvote count: 1

http://stackoverflow.com/q/26454316
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I want to change images inside a div when a link is clicked. I did that, but I can't retrieve the TITLE of the image from the TITLE of the link. JavaScript function changeImage(element) { document.getElementById('imageReplace').src = element; } HTML 1 my link HTML 2 When I click the link shown in HTML1, the image changes where the HTML2 code is, but the "title" attribute is not retrieved and nothing pops up when the mouse is over the new pic. I want to retrieve this title attribute. Can anyone help?
tagged with: css
answer count: 4
has title: Javascript to get and change element Title
has answer: http://stackoverflow.com/a/26454341
accepted answer: http://stackoverflow.com/a/26454422
has answer: http://stackoverflow.com/a/26454396
has comment: http://stackoverflow.com/comment/41549639
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26454397
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26454397
upvote count: 5
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/26454422

http://stackoverflow.com/q/26392453
type: AnsweredQuestion
score: 2
tagged with: imagemap
has comment: http://stackoverflow.com/comment/41525342
upvote count: 3
has comment: http://stackoverflow.com/comment/41441257
has comment: http://stackoverflow.com/comment/41439929
downvote count: 1
type: Question
tagged with: javascript
has title: How can I avoid CSS flickering when hovering over areas?
has comment: http://stackoverflow.com/comment/41438258
has answer: http://stackoverflow.com/a/26392505
has body: I updated my html+css and now I get flickering when moving the cursor over the map areas. I created a fiddle with the problem. http://jsfiddle.net/niklasro/e0a4sb5g/ I read that I can either change the css and html or put in a z-value. I tried that but it's still flickering when moving the cursor over the map areas. If I move the cursor over the region text to the left it is not flickering. Can you please tell me what I can do about it? I didn't have this problem before I changed a lot of CSS. &lt;div class="column_left"&gt; &lt;div class="box"&gt; &lt;ul&gt; &lt;li&gt;free.&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="regions"&gt; &lt;div class="region_links_one"&gt; &lt;ul class="regions_one"&gt; &lt;li&gt;&lt;a id="region_8" class="region" href="http://www.koolbusiness.com/andhra_pradesh/"&gt;Andhra Pradesh&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="region_9" class="region" href="http://www.koolbusiness.com/arunachal_pradesh/"&gt;Arunachal Pradesh&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="region_10" class="region" href="http://www.koolbusiness.com/assam/"&gt;Assam&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a id="region_11" class="region" href="http://www.koolbusiness.com/bihar/"&gt;Bihar&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a id="region_12" class="region" href="http://www.koolbusiness.com/chhattisgarh/"&gt;Chhattisgarh&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="region_13" class="region" href="http://www.koolbusiness.com/goa/"&gt;Goa&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="region_14" class="region" href="http://www.koolbusiness.com/gujarat/"&gt;Gujarat&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a id="region_15" class="region" href="http://www.koolbusiness.com/haryana/"&gt;Haryana&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a id="region_16" class="region" href="http://www.koolbusiness.com/himachal_pradesh/"&gt;Himachal Pradesh&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a id="region_17" class="region" href="http://www.koolbusiness.com/jammu_kashmir/"&gt;Jammu &amp;amp; Kashmir&lt;/a&gt;&lt;/li&gt;…
answer count: 1
has comment: http://stackoverflow.com/comment/41439372
tagged with: jquery
has comment: http://stackoverflow.com/comment/41438163
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41437998
has comment: http://stackoverflow.com/comment/41437853
tagged with: css
has comment: http://stackoverflow.com/comment/41438103
accepted answer: http://stackoverflow.com/a/26392505

http://stackoverflow.com/a/26441061
type: Answer
has comment: http://stackoverflow.com/comment/41525583
has comment: http://stackoverflow.com/comment/41525423
downvote count: 1
has comment: http://stackoverflow.com/comment/41525498
answers question: http://stackoverflow.com/q/26441001
upvote count: 0
score: -1
has body: You can just do by filtering and using the length property. var arr = jsontext.switches.filter(function(x){return x.hasOwnProperty('dpid'); }); console.log(arr.length); // number of objects DEMO
has comment: http://stackoverflow.com/comment/41525560

http://stackoverflow.com/comment/41514341
comment on: http://stackoverflow.com/q/26422639
score: 0
type: Comment
type: QuestionComment
has text: I still don't think there's enough information in this question to answer it. You do need to bind to the store instance, `.bind(this).then(store.insert)` or `.then(store.insert.bind(store))`

http://stackoverflow.com/q/26468695
has title: Print canvas.js chart using js
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/66310637
has body: I would like to print canvas.js chart using javascript. The printing code. when I click print button, the printing popup from browser will show up with printing preview nothing. How can i resolve this problem?? var html = " "; html += document.getElementById("chartContainerInPT").innerHTML; html += " "; var printWin = window.open('','','left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status =0'); printWin.document.write(html); printWin.document.close(); printWin.focus(); printWin.print(); printWin.close(); html code Print js var chart = new CanvasJS.Chart( "chartContainerInPT", { theme : "theme1", title : { text : "" }, data : [ { type : "column", dataPoints : [ { label : "Attempted", y : chapterWiseResult['noOfAttempt'] }, { label : "Correct", y : chapterWiseResult['noOfCorrect'] }, { label : "Wrong", y : wrong }, { label : "Unattempted", y : unattempted }, ] } ] }); How can I print chart in browser?
upvote count: 2
has comment: http://stackoverflow.com/comment/41575185
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41575290
has answer: http://stackoverflow.com/a/26468844
has comment: http://stackoverflow.com/comment/41575308
has comment: http://stackoverflow.com/comment/41575397
score: 2
type: Question
tagged with: canvas
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/56134528
comment on: http://stackoverflow.com/a/26450442
has text: @DickyMahardika Sorry I didn't understand your question... could you rephrase it..?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41652277
score: 0
has text: Show your Code please.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26511064

http://stackoverflow.com/comment/41575295
score: 0
type: AnswerComment
type: Comment
has text: Addind the $(".cat_" + cat).eq(0).attr("selected", "selected"); line worked perfectly, I didn't even know this existed. Thanks.
comment on: http://stackoverflow.com/a/26468458

http://stackoverflow.com/q/26392561
tagged with: ajax
type: UnansweredQuestion
tagged with: safari
type: Question
tagged with: javascript
has title: Safari fails XMLHttpRequest (POST) with ' Request header field Content-Type is not allowed by Access-Control-Allow-Headers'
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26392678
has body: I'm just trying to use httpbin to test out XMLHttpRequests. What works: The same POST request in Firefox and Chrome GET requests in Firefox, Chrome, and Safari to the url http://httpbin.org/get and https://httpbin.org/get The error I'm getting: [Error] Failed to load resource: Request header field Content-Type is not allowed by Access-Control-Allow-Headers. (post, line 0) [Error] XMLHttpRequest cannot load http://httpbin.org/post. Request header field Content-Type is not allowed by Access-Control-Allow-Headers. (index.html, line 0) Any help on why this issue is happening would be appreciated! EDIT: Sorry, I guess my primary question is 1) How do I fix this issue so that POST requests on safari don't throw an error

http://stackoverflow.com/comment/41557061
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26457538
has text: Just checked ajax recaptcha over https - no problems at all. Show why do you think that you are getting negative response and how do you send response and challenge from your page to your php script.
score: 0

http://stackoverflow.com/q/26458108
tagged with: javascript
tagged with: fullcalendar
has answer: http://stackoverflow.com/a/55336896
has answer: http://stackoverflow.com/a/35028811
has answer: http://stackoverflow.com/a/32267592
has answer: http://stackoverflow.com/a/37362775
has answer: http://stackoverflow.com/a/35029491
downvote count: 0
tagged with: jquery
has title: Fullcalendar v2: How to maintain the same scroll time when navigating weeks?
favorite count: 0
upvote count: 8
type: UnansweredQuestion
has body: On Fullcalendar 2, when I navigate between weeks, I'd like to maintain the same time ranges in the vertical scroll. For example, in the below images, I am initially looking at times from 12am-3pm. But when I press the next arrow to go to the next week, it resets at 8am. I know that I can change the default starting time with scrollTime: "08:00:00", but how do I make it so that the vertical time range is "fixed" to what I am on?
has answer: http://stackoverflow.com/a/36212639
has comment: http://stackoverflow.com/comment/41567273
has comment: http://stackoverflow.com/comment/41558679
tagged with: calendar
tagged with: ruby-on-rails
type: Question
answer count: 8
has comment: http://stackoverflow.com/comment/41591714
score: 8
has answer: http://stackoverflow.com/a/58474134
has answer: http://stackoverflow.com/a/42536002

http://stackoverflow.com/a/26388585
has body: Add a closing button or span to station_info_ class like x Add a listener to it to close the box like: $('.close').click(function(){ $(this).parent().toggle(); }); See Fiddle I also added some css to the closing X CSS: .close{ position: absolute; top: 10px; right: 10px; } .close:hover{ cursor: pointer; } Finally change the z-index of the station_info_ class like: .station_info_ { position: relative; display: none; width:150px; height:150px; margin-left:20px; border:4px solid black; background-color:white; position:relative; z-index: 100; }
downvote count: 0
has comment: http://stackoverflow.com/comment/41432297
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26388340

http://stackoverflow.com/a/26376661
has body: You'll definetly need more JS knowledge if you want to use PhantomJS on its own and it would be a pain even if you would be an expert. I suggest you to use CasperJS. The docs are good, so that you can copy and paste most of the stuff and change some little detail. This little detail will be most of the time a CSS selector or an XPath selector. Since you have experience with CSS, you won't have a problem with the former. You will have to understand how CasperJS works. There are mainly two things: all wait* and then* functions are asynchronous, so don't mix synchronous code with asynchronous code inside of a function. evaluate is sandboxed, but I don't think you will need it for the things you want to do. It is still good to learn JavaScript.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41431534
answers question: http://stackoverflow.com/q/26374064

http://stackoverflow.com/comment/41456953
has text: your mode switching function must be in sync with ajax response. Otherwise it will fail.
comment on: http://stackoverflow.com/q/26403860
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26434252
has comment: http://stackoverflow.com/comment/45289987
answer count: 0
has comment: http://stackoverflow.com/comment/45488459
type: UnansweredQuestion
tagged with: scroll
has comment: http://stackoverflow.com/comment/41513335
has body: I'm doing a form to edit articles stored in a database. The body of the text of the article is edited in a textarea tag. The all form doesn't fit in the window, so there is scroll bar created by the browser. But the textarea also got a limit, and when the text is too large, a second scroll bar is created by the browser. In order to improve usability, I did a simple code that resizes the textarea as text is edited, so the text is always visible and there is no second scroll bar (yes, I don't like writing in stack overflow with two scroll bars either!). // This line is between some tasks of textEditUpdate function: elemTextArea.style.height = Math.max(elemTextArea.scrollHeight, 200)+'px'; // This automatizes the process: elemTextArea.addEventListener("input", textEditUpdate, false); The problem is when the textarea is resized, the window is scrolled automatically until the cursor to be at the bottom of the page. The user lost the point where he was working (the movement is abrupt) and also don't see the text below the cursor - it's very annoying! I'm in doubt about the best approach of the problem, don't know if there is a way of prevent this event or I'll have to keep track of the scroll position and correct it all the time… what do you think? EDIT: A Playable Test Please make the window small to improve the effect, and note that it doesn't happens all the time - suddenly it scrolls!
tagged with: usability
has comment: http://stackoverflow.com/comment/41513324
type: Question
has comment: http://stackoverflow.com/comment/41513372
has comment: http://stackoverflow.com/comment/41513300
has title: How to prevent window from auto scroll after resize a textarea?
tagged with: javascript
score: 0
tagged with: events

http://stackoverflow.com/a/26445711
has comment: http://stackoverflow.com/comment/41534148
has comment: http://stackoverflow.com/comment/41534127
score: 0
has body: (never mind, I just realized makeArray is library code, still leaving this answer for the error explanation) The problem lies there: if ( typeof obj.length === 'number' ) if obj is null, obj.length will raise this exception. The fix would be: if ( obj &amp;&amp; typeof obj.length === 'number' )
type: Answer
has comment: http://stackoverflow.com/comment/41534082
has comment: http://stackoverflow.com/comment/41534102
answers question: http://stackoverflow.com/q/26445692

http://stackoverflow.com/a/26500190
has comment: http://stackoverflow.com/comment/41633037
has comment: http://stackoverflow.com/comment/41633063
has comment: http://stackoverflow.com/comment/41632893
answers question: http://stackoverflow.com/q/26500133
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41632589
accepted answer of: http://stackoverflow.com/q/26500133
has comment: http://stackoverflow.com/comment/41632936
has body: Note that ID attribute values are supposed to be unique. But the important thing is it gets cut since you do not close the attribute properly. echo "".$value['menuname'].""; // ^ quotation ^ Sidenote: This will also mess up the closing attribute quotations when you have strings like: Hello world's of fun! And why it is that you're making this value an ID anyway. echo "".$value['menuname']."";
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41632857
type: Answer

http://stackoverflow.com/comment/41634417
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26501113
type: AnswerComment
has text: I think your answer is more better than mine because you have a toggle option but can you provide a fiddle because the one i tried doesn't seem to be working

http://stackoverflow.com/a/26491462
answers question: http://stackoverflow.com/q/26491118
score: 0
type: Answer
has body: It's a matter of taste style--kindof like writing an essay. Ultimately, what's important is that anyone (or you, six months from now) can read through your code and understand what's going on. Just focus on functionality and you will naturally start making decisions about what's logical where. (Eloquent Javascript)[http://eloquentjavascript.net//] is also a great book on the subject.

http://stackoverflow.com/comment/41472130
has text: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26411352
type: Comment

http://stackoverflow.com/q/26506225
type: UnansweredQuestion
tagged with: css
tagged with: twitter-bootstrap-3
type: Question
has comment: http://stackoverflow.com/comment/41643614
has comment: http://stackoverflow.com/comment/41643559
tagged with: jquery-ui
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41643434
has title: Jquery-UI Draggable causing image shrinking?
answer count: 1
has answer: http://stackoverflow.com/a/26506568
has comment: http://stackoverflow.com/comment/41643487
has body: I'm using Bootstrap 3 Modal and putting an image inside the class="modal-body". I'm making the image draggable by using Jquery-UI. Now on dragging the image it's size shrinks. But shrinking only happens when I select the "black" option in the select box with id ="frame_type" and drag. $(document).ready(function(){ $('#frame_type').on("change", function(){ if($(this).val() == "black"){ $('#image').removeAttr('style'); $("#image").css("border", "20px solid black"); } else{ $('#image').removeAttr('style'); } }); $("#image").draggable(); }); img{ position:fixed; top:22%; left:22%; width:55%; } Select Frame: No Frame Black How can I stop the shrinking?

http://stackoverflow.com/comment/41458504
comment on: http://stackoverflow.com/q/26402510
has text: is it possible that `im` is null? Or that the src is an invalid path?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41368476
type: Comment
has text: yes, i can pass clicked image id to url as index.php?x=13
comment on: http://stackoverflow.com/a/26354375
type: AnswerComment
score: 0

http://stackoverflow.com/a/26410697
has comment: http://stackoverflow.com/comment/41469510
score: 1
answers question: http://stackoverflow.com/q/26410570
has comment: http://stackoverflow.com/comment/41469446
has body: The zepto package is not a proper Node package. It installs a minified version of the Zepto lib, but it looks like it's meant for browser usage (why would it be in the NPM repository? I have no idea). Instead, try the zepto-node package.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26410570
upvote count: 1

http://stackoverflow.com/comment/41420551
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26382677
type: AnswerComment
has text: @neography that shouldn't be all that surprising. As I stated, it was a guess. There isn't near enough information, nor is the question clear enough, to understand what you need. Consider the **NOTE:** I left at the end.

http://stackoverflow.com/comment/41379500
score: 0
has text: That's an assumption. As such, it's not a valid reason to downvote a answer.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26360790

http://stackoverflow.com/comment/41465422
has text: If you need to get a Count of records, try: summaryRenderer: function(value) { return this.store.getCount(); },
comment on: http://stackoverflow.com/a/26407655
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26411627
type: Answer
answers question: http://stackoverflow.com/q/26410900
score: 0
has body: something like: given some stub data. If I had an example of your data, that would be best: var $42 = {}; $42.words = [{isOn:true, deleted:true},{isOn:true, deleted:true},{isOn:true, deleted:true}]; $42['words'].forEach(function(obj,i){ obj.deleted = false; });

http://stackoverflow.com/comment/41545482
has text: @Brad: No I'm not building it myself, I include like a module
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26451849
score: 0

http://stackoverflow.com/a/26419871
has comment: http://stackoverflow.com/comment/41499955
has comment: http://stackoverflow.com/comment/41486429
answers question: http://stackoverflow.com/q/26419691
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26419691
has comment: http://stackoverflow.com/comment/41486799
has comment: http://stackoverflow.com/comment/41486331
upvote count: 2
has comment: http://stackoverflow.com/comment/41486995
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41487176
has body: On a quick glance there seems to be two issues with the code you've posted so far: The AJAX request Even though $.ajax() defaults to a request type of GET by default, it's good to specify it. There is also a syntax error in your request — you have closed the success callback with a }); where it should be a } only: $.ajax({ url: "recall.php", data: { recall: recall }, type: "GET", // Declare type of request (we use GET, the default) dataType: "json", success: function(data) { var id = data[0]; var vname = data[1]; $('div#box1').load('DFBristol.html'); } // The problematic closure }); Even better: instead of using the deprecated jqXHR.success() function, use the .done() promise object instead, i.e.: $.ajax({ url: "recall.php", data: { recall: recall }, type: "GET", // Declare type of request (we use GET, the default) dataType: "json" }).done(function() { // Success var id = data[0], vname = data[1]; $('div#box1').load('DFBristol.html'); }); Fixing the file recall.php When you make an AJAX GET request to recall.php, the file needs to know what variables you intend to pass, which you have not defined. You can do that using $_GET[] (see doc), i.e.: &lt;?php // Assign the variable $recall with the value of the recall query string from AJAX get request // I recommend doing a check to see if $_GET['recall'] is defined, e.g. // if($_GET['recall']) { $recall = $_GET['recall']; } $recall = $_GET['recall']; // The rest of your script, unmodified $user = 'root'; $pass = ''; $DBH = new PDO('mysql:host=localhost;dbname=nightlineDB;', $user, $pass); $DBH-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $DBH-&gt;setAttribute(PDO::ATTR_EMULATE_PREPARES, false); $recall = $DBH-&gt;prepare("SELECT * FROM bookings WHERE ID = '%$recall%'"); $recall-&gt;execute(); $recallFormResult = $recall-&gt;fetchALL(PDO::FETCH_ASSOC); echo json_encode($recallFormResult); ?&gt; Note: However, if you choose to make a POST request, then you should use $_POST[] (see doc) instead :)
has comment: http://stackoverflow.com/comment/41488202

http://stackoverflow.com/a/26370006
answers question: http://stackoverflow.com/q/26369171
score: 0
has body: jQuery does not keep the handlers in memory when you turn them off. For your situation, I believe you could just enable/disable the jQuery tooltips. Edit: Updated to exclude current input. i.e. function infoTips(){ var $inputsWithTooltips = $("input:text"); $inputsWithTooltips.tooltip({ content : function(){ return $(this).attr("title"); }, position : { my : "left top", at : "right top", of : ".tip" } }).on("focusin", function () { $inputsWithTooltips.not(this).tooltip("disable"); }).on("focusout", function () { $inputsWithTooltips.not(this).tooltip("enable"); }); } edit: jsfiddle: http://jsfiddle.net/WmRuN/485/
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26369171
type: Answer

http://stackoverflow.com/q/26362440
tagged with: webforms
score: 0
has body: I build a server set sits between a client and a server - a relay server: client &lt;--> "my Server" &lt;--> actual server "My Server" is forwarding any request from the client to the "actual Server". Afterwards "my Server" is manipulating the response I get from the "actual Server" (I am translating text from german to english) and sending it back to the client. So far so good. Everything is working fine. At least when I am not manipulating the HTML that I am getting from the "actual Server". When I am manipulating it I get the error in the client: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. edit: to make sure that I don't mess up some encodings I only replaced some real "text". In my HTML there is a word called "KUNDE". I did simple string replace: content = content.Replace("KUNDE", "CUSTOMER") This way a made sure that I don't manipulate some real HTML markup because the word "KUNDE" is not part of the HTML markup Any pointers why the error is occuring and how to fix it?
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41383338
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has comment: http://stackoverflow.com/comment/41382808
has comment: http://stackoverflow.com/comment/41383143
type: Question
tagged with: c#
has title: HTML manipulation Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed
has comment: http://stackoverflow.com/comment/41407853
tagged with: javascript

http://stackoverflow.com/comment/41416873
has text: If someone wants to expand on this including the underlying cause, I'll be happy to mark that answer as correct, otherwise I'll mark this one as correct when SO allows me to.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26381096

http://stackoverflow.com/q/26414770
answer count: 5
has answer: http://stackoverflow.com/a/26500040
has comment: http://stackoverflow.com/comment/41477415
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 6
has answer: http://stackoverflow.com/a/69057776
has comment: http://stackoverflow.com/comment/41477868
possible better answer: http://stackoverflow.com/a/26500040
has answer: http://stackoverflow.com/a/52044517
has answer: http://stackoverflow.com/a/26414883
has comment: http://stackoverflow.com/comment/41504623
type: AnsweredQuestion
has body: I've built a name-[rgb] Javascript object. Your basic: namedColors = { AliceBlue: [240, 248, 255], AntiqueWhite: [250, 235, 215], ... object. But it occurred to me that I should be able to take a name string, "AliceBlue", say .. and have JavaScript find some sort of RGB representation of it (hex is fine). I know there are at least 140 named colors tucked away in the browser, but I can't seem to find them. Is there a CSS or "style=..." stunt that lets me look up an RGB representation of a color name?
tagged with: javascript
has answer: http://stackoverflow.com/a/72808544
accepted answer: http://stackoverflow.com/a/69057776
linked to: http://stackoverflow.com/q/1573053
score: 6
type: Question
has title: Getting the RGB values for a CSS/HTML named color in JavaScript
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41504382
has comment: http://stackoverflow.com/comment/41477432
tagged with: colors

http://stackoverflow.com/comment/41471972
has text: What i'm trying to say, is do you really need to do all of that 'for development'. Maybe you can alleviate some pain and cut out some of the tasks (leave this build process only for testing/deployment).
comment on: http://stackoverflow.com/q/26411902
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41423577
has text: how do i import it whats the package name. I tried using pace didnt work
comment on: http://stackoverflow.com/q/26384696
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41633746
type: AnswerComment
type: Comment
has text: @tomysshadow i have said the same thing in my comments above on OP's question. This is just one of the ways to slow down somebody from copying the content... I have mentioned that in my comments. So yeah technically it is not correct but for OP's question there is no perfect answer. You put up a public page , it s content can be copied.
score: 0
comment on: http://stackoverflow.com/a/26500671

http://stackoverflow.com/q/26395111
score: 0
has body: var imgOut = function(){ var outImg = Math.floor(Math.random()*slideRandom.length); document.getElementById("random").src = imgRandom[outImg]; var outSlide = slideRandom[outImg]; outSlide(); var wr = Math.floor(Math.random()*imgRandom.length); var btl = Math.floor(Math.random()*bottle.length); document.getElementById("bottle2").src = bottle[outImg]; document.getElementById("bottle1").src = bottle[btl]; document.getElementById("bottle3").src = bottle[wr]; /* try below but doesn't work or syntax error occured*/ var position= ['bottle[outImg]','bottle[btl]','bottle[wr]']; var pos = Math.floor(Math.random()*position.length); var pos1 = position[pos]; pos1(); } what I'm try to do is with different arrays to get different each images in different random position. I've done different images to get but with three different arrays to put in random position doesn't work. what have I done wrong? or how to change above code?
has answer: http://stackoverflow.com/a/26395235
has title: How to change the position randomly?
has answer: http://stackoverflow.com/a/26395288
type: UnansweredQuestion
type: Question
answer count: 2
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41442333
tagged with: arraylist
has comment: http://stackoverflow.com/comment/41442238

http://stackoverflow.com/comment/41513508
type: QuestionComment
comment on: http://stackoverflow.com/q/26434141
has text: I imagine that `$scope.startTimer()` is called each time this directive is run?
score: 0
type: Comment

http://stackoverflow.com/q/26439790
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41523620
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41523591
has comment: http://stackoverflow.com/comment/41523578
accepted answer: http://stackoverflow.com/a/26440881
upvote count: 0
answer count: 1
has title: Convert javascript code into coffescript
favorite count: 0
has comment: http://stackoverflow.com/comment/41523594
has comment: http://stackoverflow.com/comment/41523486
tagged with: rickshaw
has comment: http://stackoverflow.com/comment/41523612
has body: Im currently working with Dashing and I need to convert javascript code into coffescript in order to make use of rickshaw graph library. (According to the source code on this website http://code.shutterstock.com/rickshaw/examples/x_axis.html) I'm trying to have a customized x axis on the graph. Default Coffescript code= x_axis = new Rickshaw.Graph.Axis.X(graph: @graph) JS code to be converted var format = function(n) { var map = { 0: 'zero', 1: 'first', 2: 'second', 3: 'third', 4: 'fourth' }; return map[n]; } var x_ticks = new Rickshaw.Graph.Axis.X( { graph: graph, tickFormat: format } ); Into coffescript var format = function(n) { var map = { 0: 'zero', 1: 'first', 2: 'second', 3: 'third', 4: 'fourth' }; return map[n]; } x_axis = new Rickshaw.Graph.Axis.X(graph: @graph,tickFormat: format)//Make use of format
downvote count: 2
has answer: http://stackoverflow.com/a/26440881
tagged with: coffeescript
type: Question

http://stackoverflow.com/a/26372872
has body: Objects in javascript are assigned by reference so if you put the same object into two separate arrays, each array element points at exactly the same object. If you want separate objects in each array, then you have to explicitly make a new object for the second array (copying properties from the first object if that's what you want). In jQuery, you can use $.extend() to make a copy of an object. See this answer for two different ways to use it. Or, in plain Javascript, here's a function that makes a shallow copy of a plain JS object. function copyObj(src) { var copy = {}; for (var prop in src) { if (src.hasOwnProperty(prop)) { copy[prop] = src[prop]; } } return copy; }
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26372842
downvote count: 0

http://stackoverflow.com/a/26469567
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26469145
has comment: http://stackoverflow.com/comment/41577379
has body: Are you sure that other code can't interfere? I have tried this one on a blank Page: &lt;html&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function disableF5(e) { debugger; alert("F5 Hit"); if (e.which === 116 || e.keyCode === 116) { e.preventDefault(); alert("F5 Identified"); } } $(function() { alert("Page loaded"); $(document).on("keydown", disableF5); }); &lt;/script&gt; &lt;/html&gt; And it does what it should do I open the Page => Alert "Page loaded" I hit F5 => Alert "F5 Hit" => Alert "F5 Identified" Since I do not get another "Page loaded" alert, I say, the page is not reloaded then I hit F5 May be you somewhere in your other Javascript override the keydown Handler for the document? Do you get your alerts? Edit: e.keyCode === 82 identifies the "r" key ... only makes sense when you use the "ctrl" key, too (ctrl + r = reload) if(e.keyCode === 82 &amp;&amp; e.ctrlKey)
downvote count: 0
has comment: http://stackoverflow.com/comment/41577906
score: 1

http://stackoverflow.com/q/26474502
has body: I am using grunt to compile some jade files into html ones. My files look like this: index.jade |--partials/ view1.jade view2.jade I use grunt-contrib-jade to compile them with the following code: jade: { compile: { options: { data: { debug: true } }, files: [{ expand: true, cwd: 'src/', src: ['*.jade', '*/*.jade'], dest: 'dist/views', ext: '.html', }] } }, It works fine, all the file are compiled however it breaks the files structure putting all the files in dist/views Is there a way to keep the structure, i.e. get something like this? dist/views |--------- index.html |---------/partials/ / all other files Many thanks
has answer: http://stackoverflow.com/a/26474881
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: gruntjs
score: 0
tagged with: pug
has title: Keep folders structure while compiling with grunt
answer count: 1
accepted answer: http://stackoverflow.com/a/26474881

http://stackoverflow.com/comment/41590103
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26454512
type: Comment
has text: Ehh, on Mac works great (safari, chrome,FF) on Windows 7 and ie9 (only ie I have in virtual machine) it fails. the cursor hides (thanks of css) but nothink else shows :/

http://stackoverflow.com/q/26505189
tagged with: http://stackoverflow.com/tag/html
tagged with: developer-tools
has answer: http://stackoverflow.com/a/26506457
score: 0
has title: Discovery JavaScript execution path and files in Browser Developer Tools
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26506457
type: Question
tagged with: debugging
answer count: 2
possible better answer: http://stackoverflow.com/a/26505678
has answer: http://stackoverflow.com/a/26505678
has body: I'm sure this must be a burden to other people too... Say I am debugging a website, and there is an element on the site that when clicked calls a particular function; for example: &lt;img src="foo.png" onclick="javascript:Bar();" /&gt; But I have no idea where Bar is declared in terms of the file structure. It could be coming from an external source or could be in the website solution. Are there any tools that can be added into the browser (i.e. a FireFox extension) that can assist with this? I'd sort of like something that when I click something that fires some javascript, breaks the execution and shows me where the execution was going to occur
tagged with: javascript

http://stackoverflow.com/q/26499115
score: 1
possible better answer: http://stackoverflow.com/a/26499207
upvote count: 1
has answer: http://stackoverflow.com/a/26499207
type: Question
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26499200
downvote count: 0
has title: Data binding not working in my AngularJS app
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has body: I have the following html: Basic {{ emailBody }} I am referencing the emailBody data from the textArea but it doesn't bind the data associated. it just types {{ emailBody }} literally. What am I doing wrong?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26499200
has comment: http://stackoverflow.com/comment/41630792

http://stackoverflow.com/comment/41426142
type: AnswerComment
type: Comment
has text: Hey, could we please chat? I've a couple of questions regarding chrome extension.
comment on: http://stackoverflow.com/a/26385953
score: 0

http://stackoverflow.com/comment/41528466
has text: one piece of advice: use dev tools of your browser to see the cookies being set: right-click > inspect element > Resources > Cookies (in most cases, Chrome for sure)
comment on: http://stackoverflow.com/q/26442698
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26447827
has answer: http://stackoverflow.com/a/26448224
accepted answer: http://stackoverflow.com/a/26448224
type: Question
has title: Passing dynamic variable into jquery statement
tagged with: javascript
score: 0
answer count: 1
has body: so I am trying to post and link to a dynamic URL and am using a jquery redirect to do so. I know this is probably not the best way, and I personally hate being redirected, but it works. Regardless, I am having trouble passing the dynamic url, which is generated based on database values for whichever marker is clicked on, into the jquery post form. Right now, it brings in the last value in the name and id of the last marker in my database, which makes sense to me, but is certainly not what I want to happen. Here is my javascript code: downloadUrl("phpsqlajax_genxml1.php", function (data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var id = markers[i].getAttribute("id"); var name = markers[i].getAttribute("name"); var description1 = markers[i].getAttribute("description"); var type = markers[i].getAttribute("type"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var url = "markerpages.php?name=" + name + "&id=" + id; var html = "" + name + " " + description1; var contentString = ' ' + ' ' + ' ' + ' ' + name + ' ' + ' ' + ' ' + description1 + ' ' + ' link to dynamic PHP page' + ' ' + ' ' + ' '; Here is my jquery code: $(document).on("click", "a", "markerpages-link", function () { var form = $(' ' + ' ' + ' ' + ' '); $('body').append(form); // This line is not necessary, maybe for IE $(form).submit(); }); Thank you for any and all help. It is greatly appreciated.
tagged with: jquery
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/q/26383642
has comment: http://stackoverflow.com/comment/41422016
score: 0
has comment: http://stackoverflow.com/comment/41421741
has body: I want to show a html page which is saved in a string with jquery-ui dialog. Unfortunately no dialog opens. This is my code: $(failedRequest.responseText).dialog(); The error message in the js console says: Uncaught TypeError: Cannot read property 'display' of undefined I also tried $('&lt;html&gt;&lt;body&gt;&lt;h1&gt;A title&lt;/h1&gt;And some text.&lt;/body&gt;&lt;/html&gt;').dialog(); which works fine. I assume there's something in the HTML code which causes .dialog() to fail. This is the compelente HTML code: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;EAI Configuration Web :: Status page&lt;/title&gt; &lt;link href="/EAIConfig/styles/design.css" rel="stylesheet" type="text/css" media="all" /&gt; &lt;link href="/EAIConfig/styles/print.css" rel="stylesheet" type="text/css" media="print" /&gt; &lt;link rel="shortcut icon" type="image/x-icon" href="/EAIConfig/img/favicon.ico" /&gt; &lt;link rel="icon" type="image/x-icon" href="/EAIConfig/img/favicon.ico" /&gt; &lt;script type="text/javascript"&gt; function onChangeAutoSessionClose() { var checked = document.getElementById('autoSessionClose').checked; $.post("autoSessionClose.action", {autoSessionClose: checked}); }; &lt;/script&gt; &lt;/head&gt; &lt;body id="page-home"&gt; &lt;div id="maincontainer"&gt; &lt;div id="header"&gt; &lt;div class="headerTop"&gt; &lt;div class="logo"&gt; &lt;img src="/EAIConfig/img/galenicaLogo.gif" title="" /&gt; &lt;/div&gt; &lt;div id="blockMainPopup" style="float:right"&gt; &lt;form id="logout" name="logout" action="logout" method="post"&gt; &lt;a class="item" href="javascript:print()"&gt;&lt;img src="/EAIConfig/img/iconPrint.gif" alt="Print Page" /&gt;&amp;nbsp;title.print&lt;/a&gt;&amp;nbsp; &amp;nbsp; login.as : ugxnbpluse&amp;nbsp; &amp;nbsp; &lt;input type="submit" id="logout_logout" name="action:logout" value=""/&gt; &lt;/form&gt; &lt;/div&gt; &lt;div class="row"&gt;&lt;/div&gt; &…
has comment: http://stackoverflow.com/comment/41422071
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41421533
has comment: http://stackoverflow.com/comment/41422215
has comment: http://stackoverflow.com/comment/41421888
linked to: http://stackoverflow.com/q/12137033
answer count: 0
has title: jquery-ui dialog does not show HTML server error message
has comment: http://stackoverflow.com/comment/41421783
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26385452
score: 2
upvote count: 2
type: UnansweredQuestion
has body: I am referencing JavaScript as follows on an HTML page: &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"&gt;&lt;/script&gt; &lt;/script&gt; &lt;script type="text/javascript" src="js/application.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $('document').ready(function() { // call some function specific to this page alert("this alert will only show for this particuar page"); }); &lt;/script&gt; My question is I have lot of functions especially bootstrap/jquery plugin functions to go inside document.ready(). As a result, there is lot of javascript code in all my html pages. How can I port all my functions that need to be executed inside document.ready to shared file application.js? I know that I can write a giant document.ready inside application.js to has all dom ready functions for all html files inside it. Is there any better option? Thank you for your help. Edit: Sorry if I was not clear. I was meaning to say: if there are two html pages: html1, html2 how do I tell my shared JavaScript file to execute document.ready functions for html1 and not for html2. If I understand it correctly, all functions inside document.ready will get executed every time a page loads. Similar to my situation here
has answer: http://stackoverflow.com/a/26385559
type: Question
has title: document.ready for multiple forms with single JavaScript file
has answer: http://stackoverflow.com/a/26385788
has comment: http://stackoverflow.com/comment/41425798
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41425936
tagged with: jquery
linked to: http://stackoverflow.com/q/7962456
favorite count: 0
has comment: http://stackoverflow.com/comment/41425139
has comment: http://stackoverflow.com/comment/41424871
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41425012
has comment: http://stackoverflow.com/comment/41425229

http://stackoverflow.com/q/26446688
has comment: http://stackoverflow.com/comment/41707029
has answer: http://stackoverflow.com/a/26446702
tagged with: cleartimeout
downvote count: 1
has comment: http://stackoverflow.com/comment/41536300
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26446702
has body: I have a long function in JavaScript and I am going to pause it at some points. I know that I can do that using setTimeout(myFunction, 100) and clearTimeout(). But, as I know, after using setTimeout(myFunction, 100) my function would be executed from its first line after 100 milliseconds and thereafter every 100 milliseconds. I am wondering if I can pause my function on its line 50 and then resume it right after this line which is 51. Is that possible?
tagged with: settimeout
linked to: http://stackoverflow.com/q/7854820
has title: How to pause a function in JavaScript?
upvote count: 5
accepted answer: http://stackoverflow.com/a/26446716
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41536167
tagged with: javascript
score: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/41536113
has comment: http://stackoverflow.com/comment/41536121
linked to: http://stackoverflow.com/q/951021
duplicate of: http://stackoverflow.com/q/951021
has answer: http://stackoverflow.com/a/26446716

http://stackoverflow.com/a/55983161
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/120094216
score: 4
has body: Normally this is done by the RegExp.exec method but you know it's convoluted. Everytime I need to use it i have to look up to remember this stateful operation. It's like you need a state monad or something :) Anyways. In recent JS engines there is this String.matchAll() which does the same thing in a much sane fashion by returning an iterator object. var curly = new RegExp("{([a-z0-9]+)}", "gi"); var stringTest = "This is a {test} of my {pattern}"; var matches = [...stringTest.matchAll(curly)]; console.log(matches); If you need only the capture groups then just map the above result. Let's use Array.from() this time. var curly = new RegExp("{([a-z0-9]+)}", "gi"); var stringTest = "This is a {test} of my {pattern}"; var matches = Array.from(stringTest.matchAll(curly), m =&gt; m[1]); console.log(matches);
answers question: http://stackoverflow.com/q/26392411
type: Answer

http://stackoverflow.com/comment/41441864
type: Comment
comment on: http://stackoverflow.com/a/26394833
score: 0
type: AnswerComment
has text: @PSL : Agreed, #1 and #2 are hacks to me.

http://stackoverflow.com/q/26493304
has answer: http://stackoverflow.com/a/26505470
linked to: http://stackoverflow.com/q/23970700
tagged with: leaflet
has comment: http://stackoverflow.com/comment/41620262
has body: I use leaflet with angular and would like to make a button clickable in a message popup. I know I have to compile the HTML, but I can't get it to work in my case since I didn't find an example with a json-request. Any hint is very welcome! $http.get(searchterm).then(function(articlesResponse) { $scope.geonamesorte = articlesResponse.data; var meineMarker = {}; for ( var i = 0; i < $scope.geonamesorte.length; i++) { var ortObjektausListe = $scope.geonamesorte[i]; var myobjectname = ortObjektausListe.name.replace(/[^a-zA-Z0-9]/g,'_'); ortlat = parseFloat(ortObjektausListe.lat); ortlng = parseFloat(ortObjektausListe.lng); meineMarker[myobjectname+i] = { lat: ortlat, lng: ortlng, message: "info", focus: false, draggable: false }; } // Marker on map angular.extend($scope, { markers: meineMarker, defaults:{ tileLayer:"http://tile.stamen.com/toner-lite/{z}/{x}/{y}.png" } }); });
has answer: http://stackoverflow.com/a/26493802
type: Question
answer count: 2
has title: Angular leaflet marker click
tagged with: javascript
tagged with: marker
score: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/41439241
comment on: http://stackoverflow.com/a/26393208
has text: Probably another stupid question, I'm completely new to this (should be fairly obvious), my instructor never told us which text editor to use and I have just been using notepad to get by. Which would you recommend I get or look into?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41600695
score: 0
type: Comment
has text: have you tried using insertBefore(); http://www.w3schools.com/jsref/met_node_insertbefore.asp
type: QuestionComment
comment on: http://stackoverflow.com/q/26481750

http://stackoverflow.com/q/26505250
has title: How to target Opera only with CSS?
type: Question
has comment: http://stackoverflow.com/comment/41641386
has comment: http://stackoverflow.com/comment/41641479
tagged with: javascript
has comment: http://stackoverflow.com/comment/41641389
score: 0
has comment: http://stackoverflow.com/comment/42096550
has comment: http://stackoverflow.com/comment/41642683
has body: I tried a few hacks but I wasn't able to effect Opera only. Is there a universal hack for all Opera versions? The one below doesn't work. @media not all and (-webkit-min-device-pixel-ratio:0) { p { font-size:12px; } }
linked to: http://stackoverflow.com/q/1120335
type: UnansweredQuestion
tagged with: opera
tagged with: css
has comment: http://stackoverflow.com/comment/41641614
has comment: http://stackoverflow.com/comment/41641708
answer count: 0

http://stackoverflow.com/q/26373752
has title: how can i change selected text color using javascript
accepted answer: http://stackoverflow.com/a/26396216
type: Question
score: 0
has answer: http://stackoverflow.com/a/26374297
has body: I am in chrome browser. I have blue background and the color of text is white. Problem: When i select and copy the text and paste in word, the text cannot be seen because of being. Is there any javascript to change the text color when selected so that the copied text is not white. Similar Question found: Javascript: How to detect if a word is highlighted
linked to: http://stackoverflow.com/q/4712310
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/26373826
has answer: http://stackoverflow.com/a/26396216
has answer: http://stackoverflow.com/a/26373826
type: AnsweredQuestion

http://stackoverflow.com/q/26376990
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: How to display a form in popover toggle?
has comment: http://stackoverflow.com/comment/41416172
has comment: http://stackoverflow.com/comment/41417058
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26378768
upvote count: 1
downvote count: 1
type: Question
has body: I'm trying to display a sign in form using a popover toggle. &lt;li&gt; &lt;a href="#" rel="popup" tabindex="0" data-toggle="popover" title="SIGN IN" data-placement="bottom" data-content='&lt;form&gt; &lt;input type="text"&gt; &lt;/form&gt; '&gt;Sign in&lt;/a&gt; &lt;/li&gt; But couldn't get it work properly. How can I achieve this?
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26377160
tagged with: javascript

http://stackoverflow.com/a/26371998
downvote count: 0
has comment: http://stackoverflow.com/comment/41400934
score: 1
has comment: http://stackoverflow.com/comment/41401055
answers question: http://stackoverflow.com/q/26371689
upvote count: 1
has comment: http://stackoverflow.com/comment/41401811
type: Answer
has body: What you've asserted is not quite right. The attributes hash is copied to attrs which is later modified in-place; however, the initial argument attributes is passed unadulterated to initialize.apply. You could also write this.initialize.call(this, attributes, options) to make this more explicit. attrs is a mutable* copy of attributes. options is only ever read, not written, so a copy is not needed. * everything is mutable in JavaScript, but this code behaves as though the arguments are immutable.

http://stackoverflow.com/comment/41408724
comment on: http://stackoverflow.com/q/26376527
type: Comment
type: QuestionComment
has text: You have to URL-encode each parameter value if you build GET query manually.
score: 0

http://stackoverflow.com/comment/41528545
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26442726
has text: The bitwise operator `|` acts like Math.floor except that it never returns a NaN. Where Math.floor would return NaN, bitwise or will return 0

http://stackoverflow.com/a/26500878
has comment: http://stackoverflow.com/comment/41655271
has body: if ($_SERVER[PHP_SELF] == "page1.php") { }
has comment: http://stackoverflow.com/comment/41649286
has comment: http://stackoverflow.com/comment/41649650
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41660174
answers question: http://stackoverflow.com/q/26500717

http://stackoverflow.com/q/26488952
score: 0
has comment: http://stackoverflow.com/comment/41617654
tagged with: http://stackoverflow.com/tag/html
has body: I use this http://www.jacklmoore.com/colorbox/ colorbox. Ive uploaded the .css and jQuery .js and inserted the code with Source. //LOAD JOOMLA SCRIPTS FIRST &lt;jdoc:include type="head" /&gt; //LINK TO JS AND CSS AND JQUERY &lt;link rel="stylesheet" href="http://fonag.org.ec/colorbox/colorbox.css"&gt; &lt;script src="http://fonag.org.ec/colorbox/jquery.colorbox-min.js"&gt;&lt;/script&gt; This is how I try to invoce my colorbox. //COLORBOX jQuery(document).ready(function(){ jQuery(function(){ jQuery("#dato_lb").colorbox({width:"100%", innerHeight:"100%", inline:true}); })(jQuery); jQuery(function(){ jQuery("#fuentes").colorbox({width:"50%", innerHeight:"50%", inline:true}); })(jQuery); })(jQuery); It works offline, on my computer, just perfect. But not in Joomla. Any ideas what I am doing wrong? Working with Joomla 2.5.19
has comment: http://stackoverflow.com/comment/41615029
has comment: http://stackoverflow.com/comment/41616966
has comment: http://stackoverflow.com/comment/41616801
has comment: http://stackoverflow.com/comment/41615531
linked to: http://stackoverflow.com/q/12471067
tagged with: joomla
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41617425
has comment: http://stackoverflow.com/comment/41615381
has comment: http://stackoverflow.com/comment/41614048
has comment: http://stackoverflow.com/comment/41615212
has comment: http://stackoverflow.com/comment/41612762
tagged with: dom
has comment: http://stackoverflow.com/comment/41613421
type: Question
has comment: http://stackoverflow.com/comment/41614225
has comment: http://stackoverflow.com/comment/41612893
has comment: http://stackoverflow.com/comment/41613888
has title: Colorbox does not work in Joomla
has comment: http://stackoverflow.com/comment/41617890
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41614819
has comment: http://stackoverflow.com/comment/41615988
has comment: http://stackoverflow.com/comment/41616442
has comment: http://stackoverflow.com/comment/41611878
has comment: http://stackoverflow.com/comment/41613372
has comment: http://stackoverflow.com/comment/41611971
has comment: http://stackoverflow.com/comment/41612059
has comment: http://stackoverflow.com/comment/41615929

http://stackoverflow.com/comment/41653845
score: 0
comment on: http://stackoverflow.com/a/26511428
type: AnswerComment
type: Comment
has text: Can't move it there cause if sameActivityCnt = 0, it won't run the moved code.

http://stackoverflow.com/q/26393970
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41440850
downvote count: 3
tagged with: forms
has answer: http://stackoverflow.com/a/26409614
has comment: http://stackoverflow.com/comment/41440471
type: Question
has title: Form elements overwrite default properties of a form object
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41440426
accepted answer: http://stackoverflow.com/a/26409614
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41440518
score: -1
favorite count: 0
has body: Let's say we have a form with the following inputs: (and yes, what if we really want to have those names) Now, if we try to access form properties, all we get is input objects: var form = document.getElementById('form-id'); form.elements; // will be instead of a list of elements same problem with: form.submit; form.id; form.addEventListener; and all other default properties of a form object. I do understand that we could find some other way to access those properties... but what should we do with those that we can't? Your suggestions.
upvote count: 2
has comment: http://stackoverflow.com/comment/41440593

http://stackoverflow.com/a/26360417
answers question: http://stackoverflow.com/q/26358561
score: 0
has body: You can write the JQuery Function $('input[name=sky-tabs]).click(function{ #Write the code specfic to the tab here });
type: Answer

http://stackoverflow.com/comment/41551851
type: QuestionComment
comment on: http://stackoverflow.com/q/26453916
score: 0
has text: Are you using Django 1.7? I've already a custom solution to you, just to verify that we are using the same version.
type: Comment

http://stackoverflow.com/comment/41556975
score: 0
type: QuestionComment
has text: You can update a text area value using jQuery.
type: Comment
comment on: http://stackoverflow.com/q/26458501

http://stackoverflow.com/a/26471260
type: Answer
answers question: http://stackoverflow.com/q/26471215
score: 2
downvote count: 0
has body: Use document.getElementById to get the cover element var src = document.getElemtnById('cover').src; Modify the src variable src = src.replace('large', 'crop'); Update the src attribute document.getElemtnById('cover').src = src;
upvote count: 2

http://stackoverflow.com/q/26462842
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: kendo-asp.net-mvc
tagged with: css
has body: Okay, so what I need to do here is display the grid rows with different colors based on the value of a column of the row. Here is my current code for the grid: @(Html.Kendo().Grid<iPlan.Syspro.Beekman.Portal.Agents.Models.SalesOrderViewModel>() .Name("Inbox") .HtmlAttributes(new { style = "height:80vh; width:80vw;" }) .Columns(columns => { columns.Bound(c => c.SalesOrder).Width(60); columns.Bound(c => c.Status).Width(60); columns.Bound(c => c.Date).Width(60); columns.Bound(c => c.DaysOutstanding).Width(80); //columns.Bound(c => c.Available).Width(60); columns.Template(@ ).Width(60).ClientTemplate("View").Title("Detail"); columns.Template(@ ).Width(60).ClientTemplate("View").Title("Delivery Note"); columns.Template(@ ).Width(60).ClientTemplate("View").Title("Dealer order"); columns.Template(@ ).Width(60).ClientTemplate("View").Title("Fitment invoice"); }) .Selectable() .Scrollable() .Sortable() .Groupable() .Filterable() .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("SalesOrders_Read", "Inbox")) ) ) Have anyone done this already? I'm relatively new to kendo and I have no clue on how to do this. If anyone can tell me how to do this or share a link to something similar that would be great. Thanks
upvote count: 1
has title: Kendo Grid Row Colors based on value of column
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26481603
accepted answer: http://stackoverflow.com/a/26481603
type: Question
tagged with: kendo-grid
answer count: 1

http://stackoverflow.com/comment/41663162
score: 0
type: AnswerComment
has text: got'cha! I never noticed the code snippet icon over there. thanks!
type: Comment
comment on: http://stackoverflow.com/a/26512844

http://stackoverflow.com/comment/41653622
comment on: http://stackoverflow.com/q/26511704
score: 1
has text: I couldn't get what is needed, do you want the whole grey container to scroll?
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26484515
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41603785
favorite count: 0
accepted answer: http://stackoverflow.com/a/26484579
has body: I've tried using replaceAll and replaceWith and they don't seem to work for example, string "~/Foo.aspx?fn=/image.jpg&amp;p=True" I want to do is replace p=True with p=False var previewSource = "~/Foo.aspx?fn/image.jpg&amp;p=True" var loadedSource = $(previewSource).replaceAll("p=True").replaceWith("p=False");// This is one of the things I have tried.
has title: Replace a word in a string using JQuery
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26484585
has comment: http://stackoverflow.com/comment/41603720
has answer: http://stackoverflow.com/a/26484585
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41603863
score: -1
has answer: http://stackoverflow.com/a/26484579
answer count: 2

http://stackoverflow.com/q/26395026
type: Question
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/41442286
answer count: 1
has body: Was wondering what is the best way to refresh controller scope on route change? Any help would be appreciated!
has comment: http://stackoverflow.com/comment/41442081
favorite count: 0
has comment: http://stackoverflow.com/comment/41442094
tagged with: angularjs
has answer: http://stackoverflow.com/a/26395085
accepted answer: http://stackoverflow.com/a/26395085
type: AnsweredQuestion
downvote count: 0
has title: Angularjs - refresh controller scope on route change
score: 1

http://stackoverflow.com/q/26423555
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26423872
has body: My code is HTML with JavaScript, I can write to a text file using JavaScript (client side) but this is based on 1 item. I want to have multiple forms and don't know the best way to do this? My code is below. What I am effectively trying to do is give the user the ability to write a comment for their policy ref but my coding knowledge isn't very good. function WriteToFile() { try { var t = document.data.comments.value; var p = document.getElementById('policynum').innerHTML; var msg = p + " | " + t; var fso, s; fso = new ActiveXObject("Scripting.FileSystemObject"); s = fso.OpenTextFile("C:\\Test\\Logfile.txt", 8, true); s.writeline(msg); s.Close(); alert("Comment Saved!"); } catch (err) { var strErr = 'Error:'; strErr += '\nNumber:' + err.number; strErr += '\nDescription:' + err.description; document.write(strErr); } } MY HTML form is below but in reality I will have a list of policy references where the user can enter their comments and the comment will be saved to the text file with the relating policy ref. A12345678A01 Testing this is my comment A12345678A02 Testing this is my comment I think I will need to add something so that when OnClick function it relates to the correct form also I think I will need to make sure each form name is different?
has answer: http://stackoverflow.com/a/26423872
type: AnsweredQuestion
has title: Writing to a text file using Javascript with multiple forms
type: Question

http://stackoverflow.com/comment/41629686
has text: @user4167978 This always live, no matter what, I always use it, at least you remove manually the handler, should not go away, actually if you have dynamically elements appearing in you app, this is how you should declare the events for the "future" events.
comment on: http://stackoverflow.com/a/26498296
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26424247
has answer: http://stackoverflow.com/a/26424794
accepted answer: http://stackoverflow.com/a/26424794
score: -1
has answer: http://stackoverflow.com/a/26424409
answer count: 3
tagged with: google-maps
has body: I'm trying to make a nice google map with some markers on it. I've found some really convinient solution in the web, which covers almost my every need :D I'd like to colorize pin/markers on the map. Well, tried to make a working jsfiddle, but unfortunately, something went wrong :( so you wouldn't see the map, but there are all codes :) http://jsfiddle.net/hf37ftra/9/ // Multiple Markers var markers = [ ['Marker_name', 51.113882,17.070474], ]; this part is responsible for showing multiple markers, can I somehow define here the color of the marker (I know it is possible, because I've found tutorials to change ALL the markers colors, but I'd like to make let's say 4-5 different coloured markers)? Later in the code is part for custom info box for every marker, so maybe it could be done that way :) thanks!
downvote count: 1
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
has title: GoogleMaps - multiple markers with multiple colors
has answer: http://stackoverflow.com/a/26424803
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/26424803
type: Question

http://stackoverflow.com/comment/41384450
score: 0
comment on: http://stackoverflow.com/q/26363302
type: Comment
type: QuestionComment
has text: I really don't understand why you want to do that. What is the end goal?

button
tags question: http://stackoverflow.com/q/26442565
tags question: http://stackoverflow.com/q/26510186
tags question: http://stackoverflow.com/q/26367331
tags question: http://stackoverflow.com/q/26440277
tags question: http://stackoverflow.com/q/26453612
tags question: http://stackoverflow.com/q/26408829
type: Tag
tags question: http://stackoverflow.com/q/26402033
tags question: http://stackoverflow.com/q/26494948
tags question: http://stackoverflow.com/q/26464673
tag name: button

http://stackoverflow.com/comment/41403866
type: QuestionComment
has text: Not related to your problem, but use `setTimeout(startTime, 1000)` instead of `setTimeout('startTime()', 1000)`.
score: 0
comment on: http://stackoverflow.com/q/26373584
type: Comment

http://stackoverflow.com/comment/41413318
type: Comment
has text: It's not possible to change the value attribute, they are always 0, 1, 2, etc. Why do you need to set the value?
comment on: http://stackoverflow.com/a/26378574
score: 0
type: AnswerComment

http://stackoverflow.com/a/26427387
has comment: http://stackoverflow.com/comment/41526724
type: Answer
has comment: http://stackoverflow.com/comment/41543097
has comment: http://stackoverflow.com/comment/41528174
has comment: http://stackoverflow.com/comment/41511263
accepted answer of: http://stackoverflow.com/q/26425268
has comment: http://stackoverflow.com/comment/41531421
answers question: http://stackoverflow.com/q/26425268
has comment: http://stackoverflow.com/comment/41511518
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41534293
score: 0
has comment: http://stackoverflow.com/comment/41532224
has body: EDIT: Pop this in a file and add a reference to it in every page that has a link: function loadXMLDoc(name) { var xmlhttp = new XMLHttpRequest(); xmlhttp.addEventListener("load", transferComplete, false); xmlhttp.open("GET", name, true); document.getElementById("Loading").style.display = "block"; xmlhttp.send(); function transferComplete() { document.write(xmlhttp.responseText); history.replaceState(null, null, name); } } function AJAXcallback(e) { var e = window.e || e; var href = e.target.getAttribute("href"); if (e.target.tagName !== 'A' || href[0] == "#" || href.substring(0, 11).toUpperCase() == "JAVASCRIPT:" || e.target.class == "noloadpage") return; e.preventDefault(); loadXMLDoc(href); } if (document.addEventListener) document.addEventListener('click', AJAXcallback, false); else document.attachEvent('onclick', AJAXcallback); And something to show when the next page is loading (be sure to add the id "Loading") like this: Loading This makes every link that isn't an anchor(#id) or function(javascript:whatever) and doesn't have the "noloadpage" class load with AJAX and show the Loading div while loading.

http://stackoverflow.com/comment/41592590
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26477351
has text: `bootstrappedUser` is a variable passed by server-side code to Jade compiler which injects it into the HTML while compiling. If you plan on writing the HTML yourself you can not inject variables from server-side code, obviously because HTML is just a static markup. You'll probably have to get that variable at the client-side from the server yourself via ajax or something.
score: 1

http://stackoverflow.com/comment/41489510
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26421808
has text: that .not is in my test - i actually didn't copy and paste the code above - just typed it out so thats why it isn't there.
type: AnswerComment

http://stackoverflow.com/a/35400846
has comment: http://stackoverflow.com/comment/58503935
has body: The subcategory example did not work for my case and it took my code into an infinte loop for some reason. may be because i was using an accordion. I achieved this function call inside ng-repeat by using ng-init &lt;td class="lectureClass" ng-repeat="s in sessions" ng-init='presenters=getPresenters(s.id)'&gt; {{s.name}} &lt;div class="presenterClass" ng-repeat="p in presenters"&gt; {{p.name}} &lt;/div&gt; &lt;/td&gt; The code on the controller side should look like below $scope.getPresenters = function(id) { return SessionPresenters.get({id: id}); }; While the API factory is as follows: angular.module('tryme3App').factory('SessionPresenters', function ($resource, DateUtils) { return $resource('api/session.Presenters/:id', {}, { 'query': { method: 'GET', isArray: true}, 'get': { method: 'GET', isArray: true }, 'update': { method:'PUT' } }); });
has comment: http://stackoverflow.com/comment/76778353
downvote count: 0
answers question: http://stackoverflow.com/q/26399783
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/77158703

http://stackoverflow.com/q/26478456
has body: I've been following this guide and I keep getting the error "unknown authentication strategy 'google'". I've no idea what's going on and I already tried searching the other answers with little success. Any help would be appreciated, thanks! Error: Unknown authentication strategy "google" Error: Unknown authentication strategy "google" at attempt (D:\Programming\weebly-site\node_modules\passport\lib\middleware\authenticate.js:166:37) at authenticate (D:\Programming\weebly-site\node_modules\passport\lib\middleware\authenticate.js:342:7) at Layer.handle [as handle_request] (D:\Programming\weebly-site\node_modules\express\lib\router\layer.js:76:5) at next (D:\Programming\weebly-site\node_modules\express\lib\router\route.js:100:13) at Route.dispatch (D:\Programming\weebly-site\node_modules\express\lib\router\route.js:81:3) at Layer.handle [as handle_request] (D:\Programming\weebly-site\node_modules\express\lib\router\layer.js:76:5) at D:\Programming\weebly-site\node_modules\express\lib\router\index.js:234:24 at Function.proto.process_params (D:\Programming\weebly-site\node_modules\express\lib\router\index.js:312:12) at D:\Programming\weebly-site\node_modules\express\lib\router\index.js:228:12 at Function.match_layer (D:\Programming\weebly-site\node_modules\express\lib\router\index.js:295:3) at next (D:\Programming\weebly-site\node_modules\express\lib\router\index.js:189:10) at D:\Programming\weebly-site\node_modules\express\lib\router\index.js:191:16 at Function.match_layer (D:\Programming\weebly-site\node_modules\express\lib\router\index.js:295:3) at next (D:\Programming\weebly-site\node_modules\express\lib\router\index.js:189:10) at D:\Programming\weebly-site\node_modules\express\lib\router\index.js:191:16 at Function.match_layer (D:\Programming\weebly-site\node_modules\express\lib\router\index.js:295:3) at next (D:\Programming\weebly-site\node_modules\express\lib\router\index.js:189:10) at Function.proto.handle (D:\Programming\weebly-site\node_modules\express\lib\rout…
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26479795
accepted answer: http://stackoverflow.com/a/26479795
possible better answer: http://stackoverflow.com/a/64161636
downvote count: 0
has answer: http://stackoverflow.com/a/64161636
has answer: http://stackoverflow.com/a/78433203
has title: passport.js throws Unknown authentication strategy "Google"
type: Question
score: 9
tagged with: javascript
tagged with: google-oauth
answer count: 3
tagged with: passport.js
favorite count: 0
upvote count: 9

http://stackoverflow.com/q/26479404
type: AnsweredQuestion
has title: Simple JavaScript image slide without preload array
upvote count: 1
has answer: http://stackoverflow.com/a/26479476
type: Question
score: 1
has body: i'm fairly new to the JS . i have created a html page and want to include a image slider. it has to be automatic. i did some coding, and when i check the console, its running but the image is changing. and when i get this element with "getElementById()" it says "sld" is null,(line7), ie " sld.src = eval("img"+step+".src") " is null, they are saying. Where am i doing it wrong. JS - HTML &lt;script type="text/javascript"&gt; var img1 = new Image(); img1.src="slide_show/1.jpg"; var img2 = new Image(); img1.src="slide_show/2.jpg"; var img3 = new Image(); img1.src="slide_show/3.jpg"; var img4 = new Image(); img1.src="slide_show/4.jpg"; &lt;/script&gt; JS var step = 2; function slideit() { console.log("i'm called"); console.log(step); var sld = document.getElementsByName("sli"); sld.src = eval("img" + step + ".src"); if (step &lt; 3) { console.log("for loop"); step++; } else{ step = 1; } console.log("timeout"); setTimeout("slideit()", 250); } HTML &lt;div id="main_section"&gt; &lt;img name="sli" src="slideShow/1.1.jpg" id="slide_show"/&gt; &lt;/div&gt;
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26479476
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css

unit-testing
tags question: http://stackoverflow.com/q/26490025
tags question: http://stackoverflow.com/q/26370705
tags question: http://stackoverflow.com/q/26496385
tags question: http://stackoverflow.com/q/26436179
tags question: http://stackoverflow.com/q/26487051
tags question: http://stackoverflow.com/q/26512291
tags question: http://stackoverflow.com/q/26485286
tags question: http://stackoverflow.com/q/26456252
tags question: http://stackoverflow.com/q/26383590
tags question: http://stackoverflow.com/q/26423512
tags question: http://stackoverflow.com/q/26405061
tags question: http://stackoverflow.com/q/26373734
tags question: http://stackoverflow.com/q/26396947
tags question: http://stackoverflow.com/q/26418547
type: Tag
tags question: http://stackoverflow.com/q/26439824
tags question: http://stackoverflow.com/q/26510850
tag name: unit-testing
tags question: http://stackoverflow.com/q/26490143
tags question: http://stackoverflow.com/q/26387349
tags question: http://stackoverflow.com/q/26396919
tags question: http://stackoverflow.com/q/26401387

http://stackoverflow.com/q/26494699
has comment: http://stackoverflow.com/comment/41625856
type: Question
tagged with: jquery-plugins
answer count: 2
has title: jQuery - Slick carousel - How to use appendTo() in this situation?
has answer: http://stackoverflow.com/a/26496661
tagged with: javascript
has comment: http://stackoverflow.com/comment/41626932
has body: I’m using Slick carousel jQuery plugin. In the docs it has an option appendArrows. As I understand it can be used to make the arrows stick to a different element. I use a carousel that is nested so that each slide has a title, link, description and than a couple sub-slides that are pictures. With the default settings the nav arrows are centred to the whole slide. I’d like them to be appended only to the pictures but I can’t figure out how to do it. appendArrows: $('img’) does not work. Here’s the markup: Title example.com Description. Title example.com Description. Title example.com Description. And JS: $('.slider-for').slick({ slidesToShow: 1, slidesToScroll: 1, fade: true, swipe: false, accessibility: false, arrows: false, }); $('.single-item').slick({ slide: 'img', dots: true, speed: 500, arrows: true, appendArrows: $('img'), });` EDIT: I think the question was not clear, my bad. The .slider-for is toggled by a .slider-nav that I omitted from the example. It all works, my problem is more one of aesthetics. When the arrows are appended to the whole .single-itemthey are centred vertically to the height of the whole and that looks odd since only the s inside it are actually sliding. I'd like to append the arrows to the 's so that they will be centred vertically to the height of the image. I hope that makes more sense. I guess what I'm asking really is: how do I target the 's inside with appendArrows()? The docs state: Option: appendArrows; Type: string; Default: $(element); Desc.: Change where the navigation arrows are attached (Selector, htmlString, Array, Element, jQuery object) How do I use that? Please bear in mind that I'm a total beginner, I don't know much JS, so I'm probably missing something obvious.
tagged with: jquery
has comment: http://stackoverflow.com/comment/41626676
has answer: http://stackoverflow.com/a/26507762
possible better answer: http://stackoverflow.com/a/26496661
score: 0
tagged with: carousel
tagged with: slick.js
accepted answer: http://stackoverflow.com/a/26507762
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41626558

http://stackoverflow.com/comment/41834328
comment on: http://stackoverflow.com/q/26410454
has text: The wording of the question remains ambiguous. **Quote OP**: _"What I'm trying to is to evaluate if form has been validated or not"_ ~ Does this mean you simply want to test the form to see if it's valid? Or does it mean you want to see if it's ever been tested before?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41643601
comment on: http://stackoverflow.com/a/26506142
has text: @Cerbrus it doesn't matter , the function must check if the entry value is a number and it always return correct value
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/41372800
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26356969
has text: What's the output of the following: `var arr = [undefined];console.log(arr[0]);`? Can you see how this might relate to your issue?
score: 0

http://stackoverflow.com/comment/41545173
has text: fixed for the second time, sorry about that, it went in formatted wrong
type: Comment
comment on: http://stackoverflow.com/q/26450780
type: QuestionComment
score: 0

http://stackoverflow.com/q/26399702
type: Question
has answer: http://stackoverflow.com/a/26419240
answer count: 2
has comment: http://stackoverflow.com/comment/41459908
has body: I have a custom panel bar with a div for the panel header section. Clicking on this panel should expand/collapse the panel content, which works fine using jQuery toggle. In the panel header I've placed a bootstrap checkbox with the intention being that checking the box activates that panel, but has no affect on whether or not the panel content expands or collapses. The Problem: Clicking the checkbox checks and unchecks the bootstrap checkbox but also expands/collapses the panel content. What I've been trying: I've been trying to stop propagation on the checkbox thinking that where ever bootstrap is attaching the event I might be able to stop the click event from happening on the panel header. //try get rid of event bubbling for checkboxes $(".btn-group.checkbox").on("change", function (e) { /*I've tried each of these variations*/ //e.stopPropagation(); //e.preventDefault(); //return false; }); I've also tried the click event instead of change and I've tried this on the .btn element within the btn-group: //try get rid of event bubbling for checkboxes $(".btn-group.checkbox .btn").on("change", function (e) { /*I've tried each of these variations*/ //e.stopPropagation(); //e.preventDefault(); //return false; }); None of these options worked as the checkbox is still causing the panel content to show and hide.
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: stoppropagation
has comment: http://stackoverflow.com/comment/41449848
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/26419240
favorite count: 0
has title: bootstrap checkbox button event propagation issue
tagged with: twitter-bootstrap-3
possible better answer: http://stackoverflow.com/a/26400076
upvote count: 2
has answer: http://stackoverflow.com/a/26400076
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/41485006

http://stackoverflow.com/a/26361290
has comment: http://stackoverflow.com/comment/41380710
has body: Change the order of how you include the flot plugins. orderBars changes the x values of the points so it must jitter the values before they get stacked. Updated and fixed fiddle.
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26359864
accepted answer of: http://stackoverflow.com/q/26359864
type: Answer

http://stackoverflow.com/a/26414921
answers question: http://stackoverflow.com/q/26407129
has comment: http://stackoverflow.com/comment/41992770
has comment: http://stackoverflow.com/comment/41523734
has comment: http://stackoverflow.com/comment/41522047
score: 0
accepted answer of: http://stackoverflow.com/q/26407129
type: AcceptedAnswer
has body: You cannot reference external js file in ebay listing. Please remove the following code, &lt;script type="text/javascript" src="http://duoform.stefanphilippschulte.de/slider/jssor.slider.min.js"&gt;&lt;/script&gt; The way to make ebay friendly slider is as follows, Develop your slider and make it work Compress your slider Extract code snippet from the compressed file For example, Open 'examples-no-jquery' folder. Run 'simple-slider.compress.bat' to compress 'simple-slider.source.html' to 'simple-slider.html'. Open 'simple-slider.html' and copy code snippet. Reference: http://www.jssor.com/development/embed-jssor-slider-into-ebay-listing.html
type: Answer

http://stackoverflow.com/q/26446925
answer count: 1
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26446939
has body: so im trying to delete data from a table via ajax. i found this tutorial online but when i click the delete button it just takes me to the top of the page instead of deleting my data. and it also throws a element not defined error in the console. Any help is gratefully accepted <?php $sql = "SELECT id,title,location,date,fb_page FROM gigs order by id desc "; $result = mysql_query($sql) or trigger_error(mysql_error() . $sql); while ($row = mysql_fetch_array($result)) { echo ' '; echo ' '.$row['id'].' '; echo ' '.$row['title'].' '; echo ' '.$row['location'].' '; echo ' '.$row['date'].' '; echo ' '.$row['fb_page'].' '; echo ' '; ?> <a href="#" id="<?php echo $row['id']; ?>" class="delbutton"> <a href="update_event.php?id=<?php echo $row['id'] ?>" class="iframe" > <?php echo ' '; } ?> my Javascript
tagged with: php
has title: Ajax code not getting executed
has comment: http://stackoverflow.com/comment/41536226
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26446939
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41536234

http://stackoverflow.com/comment/41589199
score: 0
comment on: http://stackoverflow.com/q/26474475
type: QuestionComment
type: Comment
has text: Web page for your map: http://www.transparentworld.ru/ru/environment/oopt/oopt-map/

http://stackoverflow.com/comment/41456260
has text: Why are calling `document ready` 3 times?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26403365
score: 1

webkit
tags question: http://stackoverflow.com/q/26396443
tags question: http://stackoverflow.com/q/26414666
tag name: webkit
type: Tag

http://stackoverflow.com/a/26468180
answers question: http://stackoverflow.com/q/26468093
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: You may be binding this after the ajax call already happens. Have you tried just adding the ajax spinner as well in the ready function and see if it goes away when the script completes? Something like this: &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#spinner").show(); $("#spinner").bind("ajaxSend", function() { $(this).show(); }).bind("ajaxStop", function() { $(this).hide(); }).bind("ajaxError", function() { $(this).hide(); }); }); &lt;/script&gt;

http://stackoverflow.com/comment/41650268
comment on: http://stackoverflow.com/a/26509641
score: 0
type: AnswerComment
type: Comment
has text: In all honesty, not right at this second. But I'm staring at the code right now, trying to pick it apart and understand each bit. As I mentioned, it's a little alien to me right now but I'm studying basic javascript, so I'm sure as I progress, it will start making more sense. Thanks again :)

http://stackoverflow.com/comment/41495082
comment on: http://stackoverflow.com/q/26410701
type: Comment
type: QuestionComment
has text: @chazsolo In that case, you can even run your existing code in node.js _once_, save the json output to a file, and serve that. Or rewrite the conversion in a language of your choice.
score: 0

http://stackoverflow.com/q/26508379
score: 0
answer count: 1
tagged with: backbone.js
tagged with: ajax
type: UnansweredQuestion
has title: Simulating Ajax call
has body: I have the following code that renders a button and has three states. The initial state, the loading state and the success/failure state. In the following code I have the following view which renders a button and simulates an ajax call. When the "ajax" call is made I want the button to display the message loading, which it does. But once it times-out after 3 seconds I want the button to display a "tick" symbol and the message sent. How do I get that done? I'm having trouble inserting the functionality once setTimeout return after 3 seconds. HTML: Backbone view: $(document).ready(function(){ var ButtonView = Backbone.View.extend({ el: $("#test-buttons"), template: _.template($("#button-test").html()), events: { "click #test-container": "sendAjax" }, _parent: null, initialize: function(options){ console.log("Started!"); console.log(this.$el); this._parent = options.parent; this.render(); }, render: function() { // sets whatever markup as the HTML content of the el DOM element using the $el property this.$el.html(this.template()); console.log("rendered"); return this; // A good convention is to return this at the end of render to enable chained calls. }, removeMsg: function (event) { $(this.el).find("p").hide(); console.log("Hiden"); }, addMsg: function (event) { $(this.el).find(".fnshMsg").show(); console.log("Shown"); }, addBlur: function (event) { this.$el.blur(); }, addSpinner : function () { console.log("Spinner"); $(this.el).find(".spinner-container").show(); }, sendAjax: function (event) { console.log("addMsgSuc"); this.removeMsg(); this._parent.onClick(); this.addSpinner(); }, onSuccess: function() { if (this._parent.onSuccess() === true) { this.addMsg(); $(this.el).find("#tick").show(); console.log("tick added"); this.addBlur(); } } }); // Ajax simulation class var AjaxPretend = Backbone.View.extend({ _button: null, initialize: function(){ this._button = new ButtonView({parent: this}); }, onClick: function() { setTimeout(_.bind(this.onSuccess, this), 3000); co…
type: Question
has answer: http://stackoverflow.com/a/26508954
tagged with: javascript

http://stackoverflow.com/comment/41600383
comment on: http://stackoverflow.com/q/26482250
has text: Alnitak yes indeed, I need to re-run them.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26397741
type: UnansweredQuestion
answer count: 0
tagged with: java
tagged with: swt
has title: Exception in thread "main" org.eclipse.swt.SWTException: Could not complete the operation due to error 800a025e
type: Question
tagged with: javascript
has body: I am developing an SWT application with an embedded browser and have used the following function to implement search function in the browser.This works perfectly if I search for words with more than two letters in it. If I search for 1 letter or 2 letters, it throws the error Exception in thread "main" org.eclipse.swt.SWTException: Could not complete the operation due to error 800a025e. public void searchNextOccuranceOfWord(String str) { System.out.println("Search next button is pressed"); str=str.trim(); String script_finddown= " var supported = false;"+ "var found = false;"+ "if (window.find) {"+ // Firefox, Google Chrome, Safari "supported = true;"+ // if some content is selected, the start position of the search // will be the end position of the selection "found = window.find (\""+ str+ "\",false,false,false,false,true,false);return \" found \"; "+ "}"+ "else {"+ "if (document.selection &amp;&amp; document.selection.createRange) {"+ // Internet Explorer, Opera before version 10.5 "var textRange = document.selection.createRange ();"+ "if (textRange.findText) {"+ // Internet Explorer "supported = true;"+ // if some content is selected, the start position of the search // will be the position after the start position of the selection "if (textRange.text.length &gt; 0) {"+ "textRange.collapse (true);"+ "textRange.move (\"character\", 1);"+ "}"+ "found = textRange.findText (\""+str+ "\",1);"+ "if (found) {"+ "textRange.select ();return \"found \" ; "+ "}"+ "}"+ "}"+ "if (supported) {"+ "if (!found) {"+ "return \" not found\"; "+ "}"+ "}"+ "else {"+ "return \" not suppoerted\"; " + "}"+ "} " ; //boolean ex = browser.execute("window.find(\"" + str + "\" ,false,false,true,false,true,false )"); String ex = (String)browser.evaluate(script_finddown); System.out.println(ex); // TODO Auto-generated method stub } I debugged it and saw that there is problem at the statement "textRange.select ()"
tagged with: eclipse
has comment: http://stackoverflow.com/comment/41446713
score: 0
has comment: http://stackoverflow.com/comment/41446604

http://stackoverflow.com/q/26436285
has title: Why does AngularJS put HTTP PUT data in URL instead of body?
score: 2
type: AnsweredQuestion
type: Question
has body: I have two services: var PlanResource = $resource('/api/v1/plan/:planId', {}, { 'update': { method:'PUT', params:{ planId : '@_id.$oid' }, isArray : false }, }); and var UserResource = $resource('/api/v1/user', {}, { 'update': {method:'PUT', params:{ }, isArray : false}, }); When I call update on the first it puts the data I pass in the body where as the second puts the data in the URL for example: PUT /api/v1/user?profiles=%7B%22skeleton%22:false,%data%22:234 Why does this happen, and how can I get the second to put the data in the body? EDIT: Usage is: ctrl.user.$update({'profiles' : appCtrl.user.profiles}).then(function() { and ctrl.plan.$update({name: planName});
tagged with: javascript
has comment: http://stackoverflow.com/comment/41517148
upvote count: 2
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41517126
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41517103
has answer: http://stackoverflow.com/a/26436319
accepted answer: http://stackoverflow.com/a/26436319

http://stackoverflow.com/comment/47815167
score: 0
type: AnswerComment
has text: I awarded the bounty to this answer in the end as it was more complete, and allowed me to trigger a rebuild from outside the context of the plugin, which I needed to do
type: Comment
comment on: http://stackoverflow.com/a/29722429

http://stackoverflow.com/a/26503656
type: AcceptedAnswer
downvote count: 0
has body: Just a little thing: put this part at the end of your function show_hide_f(): if (obj.style.display != "block") { obj.style.display = "block"; } else { obj.style.display = "none"; document.getElementById("webLI").style.background = "white"; document.getElementById("personalLI").style.background = "white"; document.getElementById("postLI").style.background = "white"; } YOUR FULL JS UPDATED: function show_hide_f(id) { var obj = document.getElementById(id); var objPortal = document.getElementById("web"); var objPersonal = document.getElementById("personal"); var objPost = document.getElementById("post"); if (obj == objPortal) { document.getElementById("webLI").style.background = "red"; document.getElementById("personalLI").style.background = "white"; document.getElementById("postLI").style.background = "white"; objPersonal.style.display = "none"; objPost.style.display = "none"; } else if (obj == objPersonal) { document.getElementById("webLI").style.background = "white"; document.getElementById("personalLI").style.background = "red"; document.getElementById("postLI").style.background = "white"; objPortal.style.display = "none"; objPost.style.display = "none"; } else if (obj == objPost) { document.getElementById("postLI").style.background = "red"; document.getElementById("personalLI").style.background = "white"; document.getElementById("webLI").style.background = "white"; objPersonal.style.display = "none"; objPortal.style.display = "none"; } if (obj.style.display != "block") { obj.style.display = "block"; } else { obj.style.display = "none"; document.getElementById("webLI").style.background = "white"; document.getElementById("personalLI").style.background = "white"; document.getElementById("postLI").style.background = "white"; } } See changes here too : http://jsfiddle.net/zh6hje9w/2/
type: Answer
answers question: http://stackoverflow.com/q/26503518
accepted answer of: http://stackoverflow.com/q/26503518
upvote count: 2
score: 2

http://stackoverflow.com/q/26468624
has answer: http://stackoverflow.com/a/26468723
score: -1
has comment: http://stackoverflow.com/comment/41575015
downvote count: 1
has answer: http://stackoverflow.com/a/26468684
linked to: http://stackoverflow.com/q/2510115
has comment: http://stackoverflow.com/comment/41575926
type: UnansweredQuestion
has body: I would like to add a custom class on mouseover. So that when the mouse is hovered over .leftbar, a class is added and it should be popped up(I set css for his). How do I add slow or time delay for the popup? &lt;script&gt; $(document).ready(function(){ $( ".leftbar" ).mouseenter(function() { $( "body" ).addClass( "myclass" ); }); }); $(document).ready(function(){ $( ".leftbar" ).mouseleave(function() { $( "body" ).removeClass( "myclass1" ); }); }); &lt;/script&gt; I tried this- $( "body" ).addClass( "myclass" , '300'); with no luck Thank you!
answer count: 4
has answer: http://stackoverflow.com/a/26470090
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26468689
tagged with: jquery
favorite count: 0
type: Question
tagged with: css
has title: How do I add time delay

http://stackoverflow.com/q/26493128
has comment: http://stackoverflow.com/comment/41620088
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26493164
tagged with: javascript
score: 0
answer count: 1
has body: This is my code that auto adds a certain amount "points" or gold every second depending a varable but when that variable variable changes which is done by a button that runs this command to stop the set Interval isn't functioning. Please help me figure this out. function addMiner() { clearInterval(autoClick) if (localStorage.getItem('minercount') &gt; 0) { var autoClick = setInterval(function() { miner() }, 1000); document.getElementById("goldNumber").innerHTML = localStorage.getItem('clickcount'); } }
tagged with: setinterval
has title: clearInterval isn't functioning properly
has answer: http://stackoverflow.com/a/26493164

http://stackoverflow.com/comment/41450213
comment on: http://stackoverflow.com/a/26398122
type: AnswerComment
score: 0
type: Comment
has text: can u provide me more info

http://stackoverflow.com/a/41889332
type: Answer
has comment: http://stackoverflow.com/comment/97782242
upvote count: 53
downvote count: 3
has comment: http://stackoverflow.com/comment/126779993
has body: You have to add the pointer-events property to the span element. button span { pointer-events: none; }
answers question: http://stackoverflow.com/q/26402033
score: 50

http://stackoverflow.com/comment/41409197
score: 0
has text: Have you verified that the code that adds those css styles is being executed?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26376800

http://stackoverflow.com/a/26410165
score: 0
type: Answer
has body: You have to add main_events to your scope. MainEventRepository.getMainEvents().then(function(main_events) { //$scope.main_events = main_events; return main_events; }); Why is the first line in that promise commented out?
answers question: http://stackoverflow.com/q/26410064

http://stackoverflow.com/comment/41540086
has text: you can't completely do it, but you can use a XSRF or CSRF token.
score: 2
comment on: http://stackoverflow.com/q/26449227
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26356468
has comment: http://stackoverflow.com/comment/41405353
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26355705
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26355705
has body: You need to calculate the time that has already elapsed so you can figure out how much to set a new timer for. Here's an example for .speedup(): this.speedup = function() { window.clearTimeout(timerId); var elapsed = new Date() - start; remaining-= elapsed + 100; if (remaining &gt; 0) { this.resume(); } else { callback(); } } You would do something similar for .slowdown(). It occurs to me this could be done a little simpler: this.speedup = function() { this.pause(); remaining-= 100; this.resume(); } this.slowdown = function() { this.pause(); remaining+= 100; this.resume(); } and, then you change this.resume() to this to make sure remaining doesn't go negative: this.resume = function() { start = new Date(); id = currentIndex; if (remaining &gt; 0) { timerId = window.setTimeout(callback, remaining); } else { callback(); } };

http://stackoverflow.com/comment/41737207
type: Comment
comment on: http://stackoverflow.com/a/26510425
score: 0
type: AnswerComment
has text: It can be vanilla Javascript or jQuery. The if statements are the same.

http://stackoverflow.com/comment/61232540
has text: Shouldn't the script for the menu be in index.htm?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26441482
type: AnswerComment

http://stackoverflow.com/q/26397810
downvote count: 0
tagged with: javascript
favorite count: 0
has title: How to add method to existing object in Coffeescript?
has answer: http://stackoverflow.com/a/26398201
has body: Lets say an object is created by some function: myObject = someFunction(); So now, myObject is an object. How do I add a new method to this object? The following does not work in Coffeescript: myObject.newMethod: (something) -&gt; # do stuff here I am not able to edit the object definition in someFunction(), so I have to add the method to the object after the fact. What is the proper syntax here?
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: coffeescript
type: Question
accepted answer: http://stackoverflow.com/a/26398201
answer count: 1

http://stackoverflow.com/q/26423947
has answer: http://stackoverflow.com/a/26424046
accepted answer: http://stackoverflow.com/a/26424046
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: i am creating a webpage for study purpose that has google map that i have implemented using javascript. The problem is i only get a zoom level of 15(that show city level zoom). How to get a zoom level of 23 on google map(street level zoom) like in most website you can zoom in to show street name.
tagged with: javascript
has title: How to get Google Map zoom level to 23
tagged with: google-maps
downvote count: 0
answer count: 1
favorite count: 0
tagged with: zooming

http://stackoverflow.com/q/26501183
downvote count: 2
possible better answer: http://stackoverflow.com/a/26501260
has answer: http://stackoverflow.com/a/26501309
has answer: http://stackoverflow.com/a/26501260
has comment: http://stackoverflow.com/comment/41634556
has answer: http://stackoverflow.com/a/26501310
tagged with: javascript
has answer: http://stackoverflow.com/a/26501338
has comment: http://stackoverflow.com/comment/41634618
answer count: 4
type: AnsweredQuestion
upvote count: 0
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41634683
has title: Why is a more convoluted jQuery pattern necessary here?
accepted answer: http://stackoverflow.com/a/26501338
has body: To me, the following code seems reasonable enough: $("#oneButton").click( alert("hello"); ); It seems to say that when OneButton is clicked, please pop up an alert saying "hello". However, in reality, the alert pops up regardless of whether the button is clicked or not. One has to wrap alert("hello"); in an anonymous function, and THEN (and only then), the alert popping up will depend on clicking the button. To me this seems unnecessarily convoluted. There must be a good reason why the designers of jQuery thought it acceptable for the alert in the code above to pop up even when the button hasn't been clicked. What is this reason?
score: -2
has comment: http://stackoverflow.com/comment/41634813
linked to: http://stackoverflow.com/q/2159044
has comment: http://stackoverflow.com/comment/41634526

http://stackoverflow.com/comment/54905949
score: 0
type: Comment
comment on: http://stackoverflow.com/a/32247092
type: AnswerComment
has text: @Rajush Upon the Edit you may need to store the row entity info in a closure. and once your $http request returns the value same closure can access your last edited row entity info. and then you may just have to publish the event to notify the changes to the framework using 'gridApi.core.notifyDataChange' API. Note: $http call should be inside the same closure where you store the entity info.

http://stackoverflow.com/a/26432857
score: 1
upvote count: 1
downvote count: 0
has body: https://cloud.google.com/translate/ You would need to use the google translate API, and they do charge.
type: Answer
answers question: http://stackoverflow.com/q/26432698

http://stackoverflow.com/comment/41534735
type: QuestionComment
comment on: http://stackoverflow.com/q/26446007
has text: @PSL I got it I also make in plunker http://plnkr.co/edit/CwtfuDQm2xaBBnWkr5Rb?p=preview
score: 1
type: Comment

http://stackoverflow.com/a/26429547
has comment: http://stackoverflow.com/comment/41504921
type: Answer
has comment: http://stackoverflow.com/comment/41504889
has comment: http://stackoverflow.com/comment/41504823
has comment: http://stackoverflow.com/comment/41504128
has comment: http://stackoverflow.com/comment/41504078
answers question: http://stackoverflow.com/q/26429416
score: 0
has body: &lt;img&gt; without src has no reason... $('.thumb').click( function() { var img = $('#slideshowpic'); var src = $(this).attr('id'); img.css('opacity','0').on('load', function() { $(this).fadeIn(); }).attr('src',"/uploads/" + src + ".jpg"); }); from Detect image load
has comment: http://stackoverflow.com/comment/41504249

http://stackoverflow.com/comment/41376432
type: AnswerComment
has text: `$(this).index()` is not necessary.
type: Comment
comment on: http://stackoverflow.com/a/26359016
score: 0

http://stackoverflow.com/a/26499030
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/26498318
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26498318
type: Answer
has body: Set your .loader to display:none; this fixed it for me. (Chrome 38 on Win) For whatever reason, Chrome must be confused by the zindex and opacity combination when deciding what to repaint. It should be pretty easy to hide/show your loader instead of just changing the opacity.

http://stackoverflow.com/comment/41760653
has text: @Rembunator: just going with what OP asked.
type: AnswerComment
comment on: http://stackoverflow.com/a/26556204
score: 0
type: Comment

http://stackoverflow.com/a/26460637
has body: Try this - http://jsfiddle.net/7Lbgjvz7/ Html Minimize all descriptions {{item.Headline}} Hide / Show {{item.Description}} Angular function myController($scope) { $scope.MinAllDescriptions = false; $scope.ItemList = [ {Headline: "Item one", Description: "This is item one"}, {Headline: "Item two", Description: "This is item two"}, {Headline: "Item three", Description: "This is item three"}, {Headline: "Item four", Description: "This is item four"}, {Headline: "Item five", Description: "This is item five"} ]; $scope.minimizeAll = function(){ angular.forEach($scope.ItemList, function(item, i){ item.MinThisDescription = !$scope.MinAllDescriptions; }); } }
accepted answer of: http://stackoverflow.com/q/26460163
upvote count: 2
answers question: http://stackoverflow.com/q/26460163
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/26374107
has comment: http://stackoverflow.com/comment/41406227
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41405170
score: 1
has body: Seems like the hidden input element is not part of a form element. In HTML if you want to use input elements, you need to include them in a form, and specify where to submit the data and use which method (POST or GET) in the attributes of your form. &lt;form action="server_side_code.php" method="post"&gt; &lt;input type="text" name="value1" /&gt; &lt;input type="hidden" name="value2" /&gt; &lt;!-- OK --&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;input type="hidden" name="value3" /&gt; &lt;!-- Will not be sent to anywhere --&gt; Using proper tools you can check what data the browser would actually send to your server side code (for example your PHP file where you are searching for values in $_POST). for example: In Firefox open Tools > Web developer > Network (or press Ctr + Shift + Q) In Chrome open More tools > Developer tools (Or press Ctrl + Shift + I) and select Network tab. (Other browsers might provide such tools, but I don't have them installed now to introduce how to open their developer tools). Then after submitting the form, a new line in the list of network calls would appear. Click on it and see the parameters sent to server side code. Check if your hidden field value is there. If you could see the hidden field value in there, then the problem is that your JavaScript is not actually updating the value of this hidden input. Maybe it is not being triggered.
has comment: http://stackoverflow.com/comment/41406314
answers question: http://stackoverflow.com/q/26373982

http://stackoverflow.com/q/26358275
tagged with: css
accepted answer: http://stackoverflow.com/a/26358347
tagged with: cordova
downvote count: 0
has answer: http://stackoverflow.com/a/26358365
has answer: http://stackoverflow.com/a/26358347
type: AnsweredQuestion
has body: I am using a script for a currency converter within phonegap.Code below: I am new to all of this, so it may be a silly question, but is there any way to alter the html in it? Basically I need to reduce the width of a text field and button
score: 1
type: Question
upvote count: 1
has title: alter html of given script
tagged with: javascript
favorite count: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26358479
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26358479

http://stackoverflow.com/comment/41632300
type: Comment
comment on: http://stackoverflow.com/q/26499999
type: QuestionComment
score: 0
has text: What is slideshowGroup? You cannot assign a variable with a ':' this type of assignment is used inside object literal e.g., {key: valye}

http://stackoverflow.com/comment/41541236
type: AnswerComment
has text: This has fixed the issue. Thanks very much for your help!
type: Comment
comment on: http://stackoverflow.com/a/26437623
score: 0

http://stackoverflow.com/comment/41486881
has text: Well, i just tried my code without JSON.parse and the browser didn`t see it as an object
type: Comment
comment on: http://stackoverflow.com/a/26419785
score: 0
type: AnswerComment

http://stackoverflow.com/q/26382821
favorite count: 0
accepted answer: http://stackoverflow.com/a/26382909
upvote count: 2
tagged with: handlebars.js
tagged with: ember.js
type: AnsweredQuestion
has title: Handlebars helper returns [object HTMLSpanElement]
type: Question
has body: I am trying to return html tag instead of string using below handlebars helper code. Handlebars.registerHelper('getFeatureValue', function(v1,v2, options) { var features = v2[v1]; if(features == true){ return $.parseHTML('&lt;span class="tick"&gt;&lt;/span&gt;'); } but i am getting [object HTMLSpanElement] as output.
has answer: http://stackoverflow.com/a/26382909
tagged with: javascript
score: 2
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/41474416
type: QuestionComment
score: 2
has text: Don't! If you're using a browser default input, let the browser default UI stay! It increases usability by being slightly less terrible than whatever you're going to do.
type: Comment
comment on: http://stackoverflow.com/q/26413209

http://stackoverflow.com/comment/41639052
type: QuestionComment
has text: Yes, bxslider.js can be linked in the page. In my case when users make a search for images in a range, php gets the array of images within a range. Then the output should come with a slideshow based on the user request.
type: Comment
comment on: http://stackoverflow.com/q/26503605
score: 0

http://stackoverflow.com/comment/41380410
comment on: http://stackoverflow.com/a/26356497
type: AnswerComment
has text: That's much better after the edit. And yes, it's correct to note that undisciplined adding/removal of classes will put the checkboxes out of sync. You could also mention that a disciplined approach would be to set a checkbox's state and trigger its onchange handler.
score: 0
type: Comment

http://stackoverflow.com/a/26457919
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26457706
has body: This should do it: var select = $('select[name=adddate]'); $.each( data.dates, function(i, date) { select.append( $(' ',{text:date}) ); }); var data = { "status": "Succes", "type": "GPS", "serial": "40332", "crat": "C3", "ata": "34", "time": "0", "dates": ["30/09/14","01/10/14"] }, select = $('select[name=adddate]'); $.each( data.dates, function(i, date) { select.append( $(' ',{text:date}) ); });
accepted answer of: http://stackoverflow.com/q/26457706
has comment: http://stackoverflow.com/comment/41556235
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41635228
comment on: http://stackoverflow.com/a/26501740
type: Comment
has text: Why should the OP do that? They seem to be a beginner, so I think they'd appreciate some explanation.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26490571
linked to: http://stackoverflow.com/q/21795761
has comment: http://stackoverflow.com/comment/41615163
type: Question
has comment: http://stackoverflow.com/comment/41615107
tagged with: javascript
score: 0
has title: Refresh Iframe within Iframe using Javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/24074694
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has body: I have the following 2 Iframes in 1 page MainWindow.php page1.php is my content page and below code is for page2.php When the page on iframeB change to the above javascript code on a page lets say reload.php, it doesn't reload iframeA, nothing happen, inspect element and no javascript error.
has comment: http://stackoverflow.com/comment/41615652
answer count: 0
has comment: http://stackoverflow.com/comment/41615207
tagged with: iframe

http://stackoverflow.com/comment/41617126
comment on: http://stackoverflow.com/a/26433610
has text: here is my blade template [pastebin](http://pastebin.com/8NGZPT7x) I want to click has work under the available and it moves to has work. I cant seem to get this after all the input everyone has said. Sorry
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41486081
comment on: http://stackoverflow.com/q/26419822
type: Comment
type: QuestionComment
has text: Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the [How to Ask](http://stackoverflow.com/help/how-to-ask) page for help clarifying this question.
score: 0

http://stackoverflow.com/comment/41582173
has text: replacing with what? post the expected output.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26471706
type: QuestionComment

http://stackoverflow.com/comment/41605274
score: 1
comment on: http://stackoverflow.com/q/26455801
has text: Ah I see. I looked into the docs on $resource a bit more but I can't find a way to do what you're thinking unfortunately. Sorry :(
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41522835
comment on: http://stackoverflow.com/a/26439178
type: AnswerComment
has text: You sir are a scholar and a gentleman!bit worked thank you so much. I learned something new today!!!
score: 0
type: Comment

http://stackoverflow.com/q/26437261
tagged with: sharepoint-api
favorite count: 0
type: UnansweredQuestion
has title: Sharepoint authentication using javascript Rest api or jquery
has comment: http://stackoverflow.com/comment/75617781
has answer: http://stackoverflow.com/a/26437833
tagged with: web-services
type: Question
tagged with: javascript
tagged with: sharepoint
has comment: http://stackoverflow.com/comment/89289759
score: 0
has body: I am just developing an sharepoint application in mobile by using javascript, But dont know how to start. Is there any api in javascript(jquery) to authenticate in sharepoint and get user details. Thanks in advance.
upvote count: 1
answer count: 1
downvote count: 1
tagged with: jquery

http://stackoverflow.com/comment/41638597
comment on: http://stackoverflow.com/q/26502786
type: Comment
has text: how can I do it? I'm not really familiar with javascript.
type: QuestionComment
score: 0

http://stackoverflow.com/q/26380094
answer count: 1
has comment: http://stackoverflow.com/comment/41432040
has comment: http://stackoverflow.com/comment/41416144
accepted answer: http://stackoverflow.com/a/37152464
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
tagged with: wordpress
has title: Bootstrap 3 Nav Tabs bookmark url not working
type: Question
has answer: http://stackoverflow.com/a/37152464
tagged with: javascript
has body: Using Wordpress & Bootstrap 3 - my links for the nav tabs bookmarks aren't working. I've found many (different) examples of JavaScript & jQuery, but none that work so far. My HTML: Home Profile Messages Settings ... ... ... ... I want to be able to type in/access a URL - like www.mysite.com/example#messages - and land on the www.mysite.com/example page (that contains the tabs), with the #messages tab open. I just can't get a different tab to open, that doesn't have the .active class in it. There's a bunch of prior examples on StackOverFlow, but none of them (so far) are working for me. I have followed the instructions & markup as per Bootstrap's website: http://getbootstrap.com/javascript/#tabs ...with no luck as yet. Any ideas? Appreciate the tips!
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26501111
type: Question
has answer: http://stackoverflow.com/a/26592534
tagged with: javascript
has comment: http://stackoverflow.com/comment/41634818
tagged with: fullcalendar
has title: jQuery fullCalendar set background color for cell
linked to: http://stackoverflow.com/q/26361913
has comment: http://stackoverflow.com/comment/41634532
score: 0
has answer: http://stackoverflow.com/a/26501662
has comment: http://stackoverflow.com/comment/41634208
tagged with: jquery
has comment: http://stackoverflow.com/comment/41635136
has body: I want to set background-color for cell with date 2014-10-22. I find a solution: date = new Date(y,m,d); date = $.fullCalendar.formatDate(date, 'yyyy-MM-dd'); $('.fc-day[data-date="'+ date +'"]').css('background-color', 'black'); but it does not work. Have some ideas?
type: UnansweredQuestion
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/38095672
has answer: http://stackoverflow.com/a/26615891

http://stackoverflow.com/comment/41642337
comment on: http://stackoverflow.com/a/26505731
score: 0
type: AnswerComment
has text: You don't really need to change HTML for this approach. Just `ChangeRefreshSeconds` function.
type: Comment

http://stackoverflow.com/comment/41589037
type: QuestionComment
has text: Javascript does not declare data types, they are interpreted from context and converted as required. It's the opposite of "strong typing". So `===` and `!==` are used to ensure that data from extraneous sources do fit your data model strictly. But usually, it's not necessary when you are providing the data, in this case 10.
score: 0
comment on: http://stackoverflow.com/q/26472853
type: Comment

http://stackoverflow.com/comment/41615929
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26488952
has text: @Lodder Sorry, but where can I enable the `noConflict mode`? Is that in the PlugIn or do I need to add a peace of code. Sorry, never worked witj `.js`, `jQuery` `Joomla` before. Got thrown into the cold water here...

http://stackoverflow.com/comment/41629574
comment on: http://stackoverflow.com/a/26498006
score: 0
type: AnswerComment
has text: Great. Do you need still need an example for handling the asynchronous fetch?
type: Comment

http://stackoverflow.com/a/26399981
score: 0
answers question: http://stackoverflow.com/q/26399613
type: Answer
has body: Try this and tell me if you have any problem... Page1

http://stackoverflow.com/comment/41539930
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26448817
type: AnswerComment
has text: What if you change the date from cmd using `time` or `date`?

http://stackoverflow.com/comment/41611355
comment on: http://stackoverflow.com/q/26488630
type: Comment
score: 0
has text: Concatenating also string inside that JavaScript (assuming you don't need to escape res.rows.item(i).name).
type: QuestionComment

http://stackoverflow.com/a/26393821
has comment: http://stackoverflow.com/comment/41462425
type: Answer
has body: You can know error in which line .look here you can see file name and number of line error and when you click in name of file you will get error line.
answers question: http://stackoverflow.com/q/26393741
score: 0

http://stackoverflow.com/q/26366147
score: 0
linked to: http://stackoverflow.com/q/22819954
answer count: 1
has title: Marker over Infobubble in google maps v3
has body: I'm trying to put a google.maps.Marker object over (z-index positioning) an Infobubble object but i am having no success. Basically what i'm doing is assigning zIndex: n to the markerOptions object which I pass to the Marker constructor as follow: var markerOptions = { position: store.getLocation(), title: store.getDetails().title, icon: DEFAULT_MARKER, anchorPoint: new google.maps.Point(20,5), zIndex: 2 }; var marker = new google.maps.Marker(markerOptions); I have already read this answer Google Maps v3 marker over infowindow but actually it has not got any votes. Can somebody tell me more about? Thanks a lot
has comment: http://stackoverflow.com/comment/41392754
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26372631
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/41560462
tagged with: javascript
tagged with: google-maps-api-3

http://stackoverflow.com/q/26460163
tagged with: javascript
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26460637
has comment: http://stackoverflow.com/comment/41560281
has body: I have a repeater with a headline and a description for each item. I want to be able to hide all descriptions at once with the help of a checkbox. This was easily done. Then i want to be able to hide or show each of the descriptions separately too. And i have almost got it working, except for one problem: if i hide all descriptions with the checkbox, and then click on one description to show it nothing happens until i click it a second time. Is there any way around it? Here is my code: Minimize all descriptions {{item.Headline}} Hide / Show {{item.Description}} Check out jsfiddle here: http://jsfiddle.net/195k2e9n/1/
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26460637
type: Question
has title: Angular JS hide / show both per item and for all items
has comment: http://stackoverflow.com/comment/41560769
possible better answer: http://stackoverflow.com/a/26460638
has answer: http://stackoverflow.com/a/26460638
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41560282

http://stackoverflow.com/comment/41461974
type: QuestionComment
comment on: http://stackoverflow.com/q/26402366
score: 0
type: Comment
has text: You need to post your code. If your "I am just using a basic getElementbyID...", then post what you are "just using"!

http://stackoverflow.com/comment/41587208
type: QuestionComment
comment on: http://stackoverflow.com/q/26474648
has text: Thanks Sunil. I was told that it is better to mock the services for unit testing of the controller and that services should be tested in a different unit test. The idea was that one will have few dependency issues and better separation of concerns. What do you think about that?
score: 0
type: Comment

http://stackoverflow.com/q/26368874
tagged with: google-chrome-extension
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26368947
tagged with: google-chrome
type: Question
possible better answer: http://stackoverflow.com/a/26368942
has title: How to determine if a script has already been injected into the document from Chrome Extension
tagged with: dom
has answer: http://stackoverflow.com/a/26368942
accepted answer: http://stackoverflow.com/a/26368947
answer count: 2
has body: I'm writing a Chrome Extension and using the following code to inject the script from my content js. function appendScript() { var script = document.createElement('script'); script.setAttribute("type", "application/javascript"); script.textContent = "window.alert = function(msg) { stopOperation = true; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent('StopOperation', true, true, ''); document.dispatchEvent(evt); return true; }; "; document.documentElement.appendChild(script); } How do I make sure that the above script is injected only once?
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/26467719
downvote count: 0
tagged with: javascript
favorite count: 0
score: 16
has comment: http://stackoverflow.com/comment/41573194
type: Question
linked to: http://stackoverflow.com/q/692123
has body: I'm using asciidoctor-maven-plugin to convert .adoc files to html file... Would want to include a link to javascript in the generated html file... Basically would like to see something like below in the html file that is generated from the .adoc file &lt;script src="custom.js"&gt;&lt;/script&gt; Tried setting attributes like linkcss scriptsdir etc..but of no luck... Any help? One way is like in http://mrhaki.blogspot.ie/2014/06/awesome-asciidoc-include-raw-html.html But then have to add it in every .adoc file...is there a way to get it automatically added just like the CSS (using stylesheet)
has title: How to include a javascript in Asciidoc?
answer count: 2
has comment: http://stackoverflow.com/comment/41573158
tagged with: asciidoc
has answer: http://stackoverflow.com/a/26478439
upvote count: 16
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29456923
has comment: http://stackoverflow.com/comment/41573086

http://stackoverflow.com/a/26417412
downvote count: 0
has body: The text is just a string, so you can perform string concatenation with +: for(var i=0; i<count;i++){ html += ' Screenshot ' + i + ' '; }
upvote count: 2
answers question: http://stackoverflow.com/q/26417395
type: Answer
score: 2

http://stackoverflow.com/comment/41527914
type: Comment
type: QuestionComment
has text: Here is the code. HTML: ` ` ` ` ` ` ` ` ` `` ` `Download` ` ` JS: the content of musicfunctions.js is the one on the main post.
score: 0
comment on: http://stackoverflow.com/q/26435400

http://stackoverflow.com/comment/41635028
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26501521
has text: Probably be helpful to see the PHP file that's processing your upload, as well.
score: 0

jquery-knob
tags question: http://stackoverflow.com/q/26473811
tags question: http://stackoverflow.com/q/26381924
type: Tag
tag name: jquery-knob

http://stackoverflow.com/comment/41405567
has text: @ValentinWaeselynck , I would like to get a variable to page two the getquery variable.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26373987
type: QuestionComment

http://stackoverflow.com/comment/41676297
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26480223
has text: Does this imply that both modules are Maven-based? I'd like to avoid that.
score: 0

http://stackoverflow.com/comment/41626480
comment on: http://stackoverflow.com/q/26496343
has text: Should include the HTML in the question too - that's where the template is.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26484834
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26484749
has body: You can date in jquery var date = new Date(); date.getDate() //output:- 21

http://stackoverflow.com/q/26425321
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/41495921
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41495782
has comment: http://stackoverflow.com/comment/41496010
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41496085
has comment: http://stackoverflow.com/comment/41495799
tagged with: jquery
has body: I'm trying to implement a custom button panel which is to be displayed in each create view of an mvc4 application. When save is clicked, it should go to a general javascript function which validates the view/form and return the error in an alert as well on the view next to the field. All I've been able to get so far is: EDIT @ViewBag.Title - COMIS @Styles.Render("~/Content/css") @Styles.Render("~/Content/themes/base/css") @Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/Scripts/buttons.js") @Scripts.Render("~/Scripts/navigation.js") function global() { function () { $('a.button.positive').click(function (e) { e.preventDefault(); if (!form.validate()) { alert('validation error'); return false; } else { form.submit(); alert('submitted'); return true; } }); } } This is a sample view: @model .... @{ ViewBag.Title = "Create"; } @using(Html.BeginForm()) { @Html.ValidationSummary(true) Add a New Rate Period Start* @Html.TextBoxFor(model => model.Period_Start, "{0:yyyy MMM dd}", new { @id= "from" }) @Html.ValidationMessageFor(model => model.Period_Start) Period End* @Html.TextBoxFor(model => model.Period_End, "{0:yyyy MMM dd}", new { @id = "to" }) @Html.ValidationMessageFor(model => model.Period_End) Rate* @Html.EditorFor(model => model.Tug_Rate) @Html.ValidationMessageFor(model => model.Tug_Rate) Save Cancel } @section Scripts { @Scripts.Render("~/bundles/jqueryval") } $(function () { $("#from").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 3, dateFormat: "yy-mm-dd", onClose: function (selectedDate) { $("#to").datepicker("option", "minDate", selectedDate); } }); $("#to").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 3, dateFormat: "yy-mm-dd", onClose: function (selectedDate) { $("#from").datepicker("option", "maxDate", selectedDate); } }); }); I put a break point on the save in the respective controller, but i…
has comment: http://stackoverflow.com/comment/41496385
type: Question
has comment: http://stackoverflow.com/comment/41495894
has title: general javascript validation for all views in mvc4
has answer: http://stackoverflow.com/a/26425540

http://stackoverflow.com/q/26393713
accepted answer: http://stackoverflow.com/a/26436983
has title: Lock web object among users in asp.net mvc
answer count: 2
has comment: http://stackoverflow.com/comment/41440283
linked to: http://stackoverflow.com/q/617934
has comment: http://stackoverflow.com/comment/41440171
tagged with: asp.net
favorite count: 0
possible better answer: http://stackoverflow.com/a/26535279
has comment: http://stackoverflow.com/comment/41440308
has answer: http://stackoverflow.com/a/26535279
has comment: http://stackoverflow.com/comment/41518520
type: AnsweredQuestion
upvote count: 2
score: 1
has answer: http://stackoverflow.com/a/26436983
has comment: http://stackoverflow.com/comment/41440089
has body: I have an asp.net mvc site where users can select a number of objects, they are identified by a unique id. What I would like to do is: User A opens an object When user B tries to open the same object, a message will appear saying this is already open by user A, therefore is inaccessible. I guess the server would have a sort of 'shared' session that can be queried in every Ajax request, to check if the object is already open by a different user. When the object is closed then that id should be removed from the shared list of opened objects. What would be the best approach for this?
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41518269
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/41440439

http://stackoverflow.com/a/74280233
has body: In my case it works: const exportVar = (name, value) => { process.env[name] = value; }; exportVar("NODE_ENV", "test"); But also in some cases it can be useful to play with exec (or spawn): const { execSync } = require('child_process'); execSync("NODE_ENV=test && echo $NODE_ENV", { stdio: 'inherit', });
answers question: http://stackoverflow.com/q/26464103
score: -1
downvote count: 2
type: Answer
upvote count: 1

http://stackoverflow.com/q/26469031
tagged with: css
possible better answer: http://stackoverflow.com/a/26469547
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26469547
has comment: http://stackoverflow.com/comment/41575794
upvote count: 2
tagged with: css-transitions
has answer: http://stackoverflow.com/a/26469225
has comment: http://stackoverflow.com/comment/41576087
type: Question
has comment: http://stackoverflow.com/comment/41576043
tagged with: javascript
tagged with: css-animations
answer count: 2
score: 2
accepted answer: http://stackoverflow.com/a/26469225
has body: I wanna display a growing column when loading my website like this: function init() { document.getElementsByClassName('col')[0].style.height = '50px'; } .col { width: 20px; min-height: 1px; transition: height 0.5s ease-out 0s; background-color: red; } &lt;body onload="init()" &gt; &lt;div class="col" &gt;&lt;/div&gt; &lt;/body&gt; But as you can see it doesn't work. Would it theoretically help to have the onload-attribute placed in the attributes of the div? But that doesn't work, right? I also could use keyframe animations, I guess. However, I actually have more column than one and all of them should grow to a different height. Therefore I would have to create a keyframe animation for each of my columns, which is kind of messy, I believe. Does anyone know a clean solution to my problem? Thanks in advance...
downvote count: 0
favorite count: 0
has title: Growing DIVs on page load?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41575835

http://stackoverflow.com/comment/49819932
score: 0
has text: Does it handle && and || by \& and \|
type: Comment
comment on: http://stackoverflow.com/a/26466646
type: AnswerComment

http://stackoverflow.com/a/26388544
accepted answer of: http://stackoverflow.com/q/26388349
score: 1
answers question: http://stackoverflow.com/q/26388349
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: As for the first function, you are referencing the class instead of the items of the list(which you do well in your second), so it should be: this.onList = function(someItem) { for(i = 0; i &lt; currentList.items.length; i++) { if(currentList.items[i].food === someItem) { return currentList.items[i] } else { return "not on list" } } }; As for your second, only mistake is missing the reference to the index of items list: mySum += currentList.items[i].price; // should it be * currentList.items[i].quantity? You also need to change: console.log(myList.whatWillItCost()) // without the () you are displaying the reference to the function instead of executing it Js Fiddle: http://jsfiddle.net/3a4ebdpz/ You could also make your onList function a bit shorter this way using Array.filter: this.onList = function(someItem) { var results= currentList.items.filter(function(item){ return item.food===someItem; }) return results.length == 0 ? 'not on list' : results[0] };
type: Answer

http://stackoverflow.com/a/26410325
score: 0
type: AcceptedAnswer
type: Answer
has body: You are attempting to use square bracket notation to access items in .nodes, but you have a dot between "nodes" and the open square bracket. On all lines you should have something like: $Device1.u_data.create.nodes[$('#device-1-ip-1').val()] = {"enabled": true}; Notice I do not have a dot after "nodes"
accepted answer of: http://stackoverflow.com/q/26410258
answers question: http://stackoverflow.com/q/26410258

http://stackoverflow.com/comment/41491724
comment on: http://stackoverflow.com/a/26420014
type: AnswerComment
has text: I think chrome browser have only that issue
score: 0
type: Comment

http://stackoverflow.com/q/26403233
score: 0
has answer: http://stackoverflow.com/a/26403532
tagged with: angularjs
has title: $state.go Failed to instantiate module
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26403532
has body: I cannot get $state.go('dashboard') to work. I get the error: Failed to instantiate module app.controllers.login due to: Error: [$injector:nomod] http://errors.angularjs.org/1.2.19/$injector/nomod?p0=app... When defined routes I get no errors. What I'm I doing wrong? I have also tried $stateProvider and get the same error. This is my controller... App.js var app = angular.module('dashboardApp', [ "ngRoute", "ngAnimate", "ngTouch", "mobile-angular-ui", "ui.router", "app.factories.storage", "app.controllers.main", "app.controllers.login", "angular-loading-bar" ]); app.config(function ($stateProvider, $urlRouterProvider) { // For any unmatched url, send to /route1 $urlRouterProvider.otherwise("/"); $stateProvider .state('login', { url: "/", templateUrl: STATIC_URL + "html/company/login.html", controller: "loginController" }) .state('dashboard', { url: "/dashboard", templateUrl: STATIC_URL + "html/company/dashboard.html" }) }); Controller: angular.module('app.controllers.login', [ "app.factories.http", "ui.router", ]) .controller("loginController", ['$scope', "$location", "httpTokens", "httpFactory", "toaster", "$state", function ($scope, $location, httpTokens, httpFactory, toaster, $state ) { $scope.actionLoginCompanyUser = function () { var post_data = {username: $scope.user.email, password: $scope.user.password}; httpTokens.createAccessTokens(post_data) .then(function (responce) { if (responce.status == 200) { $state.go('dashboard') } else { toaster.pop('error', "Incorrect Credentials", "Incorrect Email/Password"); } }) } }]);
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26429222
duplicate of: http://stackoverflow.com/q/4244896
answer count: 0
type: UnansweredQuestion
score: 0
has title: Javascript argument into function to find spot in array
has body: This javascript function works well for reading values from an object when it is hardcoded. function showNote(){ document.write(notes.B[1]); } But I can't get it to work with a variable. I would like to do something like this, but I get an undefined variable message. &lt;script&gt; showNote(B) &lt;/script&gt; function showNote(y){ console.log(y); document.write(notes.y[1]); }
type: Question
has comment: http://stackoverflow.com/comment/41503481
tagged with: javascript
has comment: http://stackoverflow.com/comment/41503451
linked to: http://stackoverflow.com/q/4244896

http://stackoverflow.com/q/26410701
has title: Format CSV to JSON with JavaScript
has comment: http://stackoverflow.com/comment/41495082
score: 2
answer count: 0
tagged with: d3.js
upvote count: 3
type: UnansweredQuestion
has body: My task: given a set of data in CSV format, display a sankey chart using D3. Given data format: (I'm unable to change this) Uses,Types,Feedback Use1,Type1,Feedback1 Use2,Type1,Feedback1 Use2,Type2,Feedback1 ... Required format for D3 Sankey plugin: { "nodes": [ {"name": "Use1"}, {"name": "Use2"}, {"name": "Type1"}, ... ], "links": [ {"source":"Use1", "target":"Type1", "value":1}, ... } My problem: Convert CSV data into JSON needed for the Sankey chart. I can not change the initial data given to me, so I must build the JSON dynamically. My research led me here, but the only example of massaging the CSV data (that does not already included values, only sources and targets) was through MySQL. As I do not have access to a database on my project, I have resorted to using Underscore.js to help me in the conversion (within a Backbone.js application) Here is what I have so far, which works as intended. // buildJSON is a method of a Backbone View that oversees the creation of the diagram buildJSON: function( csv ) { var json = { nodes: [], // unique nodes found in data links: [] // links between nodes }; // get unique nodes! var uniqueNodes = _.chain(csv).map(_.values).flatten().unique().value().sort(); uniqueNodes.forEach(function( node ) { json.nodes.push({ name: node }); }); // map colors to nodes this.color.domain(uniqueNodes); // map links var links = []; var rMap = {}; var keys = _.keys(csv[0]); for ( var i = 0; i &lt; csv.length; i++ ) { for ( var j = 0; j &lt; keys.length - 1; j++ ) { var relationship = csv[i][keys[j]] + '-' + csv[i][keys[j + 1]]; rMap[relationship] = ++rMap[relationship] || 1; } } // create links from the linkmap for ( var r in rMap ) { if ( rMap.hasOwnProperty(r) ) { var rel = r.split('-'); links.push({ source: rel[0], target: rel[1], value: rMap[r] }); } } var nodeMap = {}; json.nodes.forEach(function( node ) { nodeMap[node.name] = node; }); json.links = links.map(function( link ) { return { source: nodeMap[link.source], target: nodeMap[link.targe…
downvote count: 1
type: Question
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/41480689
has comment: http://stackoverflow.com/comment/41469870
has comment: http://stackoverflow.com/comment/41494673
has comment: http://stackoverflow.com/comment/41495447
tagged with: javascript
has comment: http://stackoverflow.com/comment/41469692
favorite count: 0
tagged with: sankey-diagram

http://stackoverflow.com/comment/41428416
type: Comment
comment on: http://stackoverflow.com/a/26387151
score: 0
has text: Will this repeat, or just run the function once, after a 5-sec delay?
type: AnswerComment

http://stackoverflow.com/comment/41429683
comment on: http://stackoverflow.com/q/26387676
has text: Can you just do this: http://jsfiddle.net/rmt0r563/4/ It looks like it's firing off requests (judging form the console) as you click each radio button.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41490051
has text: Please show more of your PHP. Off-topic note: they are called **parameters**.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26422243

http://stackoverflow.com/comment/41431302
score: 0
type: Comment
has text: explained in my previous comment, i hope you understand me now, if not tell me, i will try to explain it another way. by the way thanks for your help man!
type: AnswerComment
comment on: http://stackoverflow.com/a/26388154

http://stackoverflow.com/comment/41429947
has text: Yes i have one active class in each li
comment on: http://stackoverflow.com/a/26388057
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26392255
has answer: http://stackoverflow.com/a/26398053
score: 0
tagged with: api
answer count: 1
has title: Using Pusher to push messages to friends only
tagged with: ruby
type: UnansweredQuestion
has body: I have set up basic Pusher functionality on my Rails app based on a model Post, however the Pusher updates are sent to all users whereas I want the updates to only be seen by users who are 'connected / friends' with the sender. Is this best resolved in the view using javascript or ruby? From the controller I am sending to the view via Pusher the @post.user_id, however I can't seem to get it to work when implementing the below: Post Controller def index # Get the current user's friends @friends = current_user.friends.all end end def create @post = current_user.posts.new(post_params) @puserid = @post.user_id @postuser = User.find_by_id(@puserid) @userslug = @postuser.slug @ids = current_user.friends.pluck(:id) << current_user.id if @post.save #flash[:success] = "You have created a new post" redirect_to posts_path Pusher['worklink'].trigger('update', { postcontent: @post.content, userid: @post.user_id, userslug: @userslug, userfirstname: @postuser.firstname, userlastname: @postuser.lastname, postid: @post.id }) else render "new" end end Post index view
tagged with: ruby-on-rails
type: Question
tagged with: pusher
tagged with: javascript

http://stackoverflow.com/a/26454115
type: Answer
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: For now all I'm trying to do is move a servomotor in a direction if a js variable is under a certain value and moving it the other way if it's above that value. Here's how you can accomplish this with Johnny-Five: Make sure you have node and npm installed With the Arduino IDE, upload StandardFirmata (File -> Examples -> Firmata -> StandardFirmata) to the Arduino, close the IDE npm install johnny-five create a new JS file, save the following in it: var five = require("johnny-five"); var board = new five.Board(); board.on("ready", function() { var servo = new five.Servo(11); this.repl.inject({ move: function(value) { var angle = 0; if (value &gt; 0) { angle = 180; } servo.to(angle); } }); }); With the USB cable plugged in to the board and computer, run the above program in your terminal. Once it's running, call move(n) where n is any number. Numbers greater than 0 will move the servo to 180°; numbers less than or equal to 0 will move the servo to 0°.
accepted answer of: http://stackoverflow.com/q/26448152
answers question: http://stackoverflow.com/q/26448152

javascript-objects
tags question: http://stackoverflow.com/q/26495679
tags question: http://stackoverflow.com/q/26463297
tags question: http://stackoverflow.com/q/26470087
tags question: http://stackoverflow.com/q/26435656
tags question: http://stackoverflow.com/q/26374056
tags question: http://stackoverflow.com/q/26373832
type: Tag
tag name: javascript-objects
tags question: http://stackoverflow.com/q/26460629
tags question: http://stackoverflow.com/q/26492308

http://stackoverflow.com/a/27430246
has comment: http://stackoverflow.com/comment/51602336
type: Answer
has comment: http://stackoverflow.com/comment/69205333
downvote count: 2
has comment: http://stackoverflow.com/comment/75040477
has comment: http://stackoverflow.com/comment/43415112
upvote count: 150
score: 148
has comment: http://stackoverflow.com/comment/56263830
answers question: http://stackoverflow.com/q/26444418
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26444418
has body: If you want it to always scroll to 0 cross-browser, do nothing with autoscroll. Just place this your run block: $rootScope.$on('$stateChangeSuccess', function() { document.body.scrollTop = document.documentElement.scrollTop = 0; });
has comment: http://stackoverflow.com/comment/50861744

http://stackoverflow.com/q/26503182
tagged with: http://stackoverflow.com/tag/html
tagged with: input
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41638108
has comment: http://stackoverflow.com/comment/41681849
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/5874652
has comment: http://stackoverflow.com/comment/41638322
has body: I have a problem with a range input. I use it as a time tracker for an audio tag, and it doesn't reacts as I want. The value is correctly updated with the onTimeUpdate listener, but the slider thumb doesn't moves. function onTimeUpdate() { var seeker = document.querySelector('#duration'); var currentTime = Math.floor(player.currentTime); seeker.setAttribute("value", currentTime); } Is it a normal behaviour ? I can't find anything about it. Thank you in advance. EDIT : "setAttribute" just sets the value of the range input. element.value sets the value AND the position of the cursor to a new value. Thanks to Passerby for the answer !
has title: input[type=range] error when value's updated
has comment: http://stackoverflow.com/comment/41683458
type: UnansweredQuestion

http://stackoverflow.com/a/26354356
type: Answer
has comment: http://stackoverflow.com/comment/41372865
upvote count: 1
has comment: http://stackoverflow.com/comment/41372765
score: 1
has body: I checked the fiddle you have created and you seem to embed the video in an iframe. Assuming you have the complete url of the video file resource available with you, you might want to try encapsulating them in a video tag supported by HTML5. It has an autoplay option associated with it and is supported in all major browsers today (upto IE8). From W3Schools, you could try something like this in context of your code: 4 Your browser does not support the video tag. Ofcourse, using the video tag limits browser compatibility to some extent which is the whole purpose of using an iframein the first place. That's something you can decide. Also, if you are embedding videos from Youtube or Vimeo in an iframe, they almost certainly have an autoplay option in their videos. You should probably read up the relevant docs to get started on that. Hope this helps you out.
downvote count: 0
answers question: http://stackoverflow.com/q/26353842

java
tags question: http://stackoverflow.com/q/26412287
tags question: http://stackoverflow.com/q/26482714
tags question: http://stackoverflow.com/q/26432369
tags question: http://stackoverflow.com/q/26381356
tags question: http://stackoverflow.com/q/26419373
tags question: http://stackoverflow.com/q/26481471
tags question: http://stackoverflow.com/q/26445771
tags question: http://stackoverflow.com/q/26461130
tags question: http://stackoverflow.com/q/26401516
tags question: http://stackoverflow.com/q/26504604
tags question: http://stackoverflow.com/q/26430694
tags question: http://stackoverflow.com/q/26397741
tags question: http://stackoverflow.com/q/26388742
tags question: http://stackoverflow.com/q/26509118
tags question: http://stackoverflow.com/q/26381696
tags question: http://stackoverflow.com/q/26477228
tags question: http://stackoverflow.com/q/26408291
tags question: http://stackoverflow.com/q/26506560
tags question: http://stackoverflow.com/q/26418164
tags question: http://stackoverflow.com/q/26454916
tags question: http://stackoverflow.com/q/26359475
tags question: http://stackoverflow.com/q/26434783
tags question: http://stackoverflow.com/q/26462429
tags question: http://stackoverflow.com/q/26461209
tags question: http://stackoverflow.com/q/26477625
tags question: http://stackoverflow.com/q/26392602
tags question: http://stackoverflow.com/q/26435557
tags question: http://stackoverflow.com/q/26443944
tags question: http://stackoverflow.com/q/26407874
tags question: http://stackoverflow.com/q/26416936
tags question: http://stackoverflow.com/q/26404277
tag name: java
tags question: http://stackoverflow.com/q/26424043
tags question: http://stackoverflow.com/q/26438459
tags question: http://stackoverflow.com/q/26366273
tags question: http://stackoverflow.com/q/26379916
tags question: http://stackoverflow.com/q/26454585
tags question: http://stackoverflow.com/q/26360378
tags question: http://stackoverflow.com/q/26510519
tags question: http://stackoverflow.com/q/26358394
tags question: http://stackoverflow.com/q/26480223
tags question: http://stackoverflow.com/q/26377241
tags question: http://stackoverflow.com/q/26410465
tags question: http://stackoverflow.com/q/26419540
tags question: http://stackoverflow.com/q/26353839
tags question: http://stackoverflow.com/q/26461426
tags question: http://stackoverflow.com/q/26399771
tags question: http://stackoverflow.com/q/26435426
tags question: http://stackoverflow.com/q/26377108
tags question: http://stackoverflow.com/q/26419654
tags question: http://stackoverflow.com/q/26387743
type: Tag
tags question: http://stackoverflow.com/q/26425881
tags question: http://stackoverflow.com/q/26465645
tags question: http://stackoverflow.com/q/26389986
tags question: http://stackoverflow.com/q/26459059
tags question: http://stackoverflow.com/q/26388933
tags question: http://stackoverflow.com/q/26414295
tags question: http://stackoverflow.com/q/26464333
tags question: http://stackoverflow.com/q/26501263
tags question: http://stackoverflow.com/q/26460679
tags question: http://stackoverflow.com/q/26385618

http://stackoverflow.com/a/26506981
has comment: http://stackoverflow.com/comment/41644735
type: Answer
has comment: http://stackoverflow.com/comment/41644897
accepted answer of: http://stackoverflow.com/q/26506854
score: 0
has comment: http://stackoverflow.com/comment/41644779
answers question: http://stackoverflow.com/q/26506854
has comment: http://stackoverflow.com/comment/41672452
type: AcceptedAnswer
has body: that's because ng-include create a separate scope, so in your id="tab_2" has eventCatCtrl, so the scope of eventCatCtrl controller is the parent scope for the scope which create by ng-include, So if u try to assign null it will check for the scope of eventCatCtrl it cannot see the scope of ng-include, thats why its not going to assign null for ng-include models. Do achieve this in your case u can define the models in ng-include template in eventCatCtrl like below, eventApp.controller("eventCatCtrl", function($scope){ $scope.includeData = {}; $scope.catValues = function(catTitle, catDes, $event){ $scope.includeData.catTitle = null; // modify this $scope.includeData.catDes = null; } }); and change your includes like this &lt;input type="text" class="form-control" id="catTitle" ng-model="includeData.catTitle" placeholder="Please enter your Category Title"&gt; &lt;textarea name="" class="form-control" id="catDes" placeholder="Enter a description here" ng-model="includeData.catDes" id="" cols="10" rows="6"&gt;&lt;/textarea&gt;

http://stackoverflow.com/comment/55474041
has text: Thanks. There were also old version in typeahead documentation.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26446019

http://stackoverflow.com/q/26483565
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26489956
answer count: 1
tagged with: asp.net
type: UnansweredQuestion
tagged with: dynatree
tagged with: asp.net-mvc-4
has title: when rendering another view from an view containing an Iframe the view should load in the src attribute without the layout
type: Question
tagged with: javascript
has body: I have a Dynatree on my layout.cshtml which means the dynatre would be present on every view. Dynatree is just a tree like structure which loads data from somewhere (like a database) and the data is clickable. So when we click on an item on the tree it goes to another view. Now I have an view which contains an Iframe . What I want is whenever I click on the data Item the view should load inside the "src" attribute of the Iframe without the layout. Any Ideas or suggestions?

http://stackoverflow.com/comment/41387182
has text: Can you give me a hint on how to make this work? Actually i can make this work if i directly use the id of the hovered div. But that would take a lot of time.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26364704

http://stackoverflow.com/comment/41409887
comment on: http://stackoverflow.com/q/26377178
type: Comment
type: QuestionComment
has text: @nomwery geqoilu does your data variable content "track" and "total"?
score: 0

http://stackoverflow.com/a/26355307
type: Answer
answers question: http://stackoverflow.com/q/26355003
score: 0
has body: Instead of using window.open u can use this Link

http://stackoverflow.com/q/26357411
upvote count: 1
has comment: http://stackoverflow.com/comment/41373586
has title: Mobile Friendly CSS
has answer: http://stackoverflow.com/a/26359348
favorite count: 0
has comment: http://stackoverflow.com/comment/41373816
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41373607
has answer: http://stackoverflow.com/a/26358663
accepted answer: http://stackoverflow.com/a/26358663
tagged with: css
has comment: http://stackoverflow.com/comment/41373568
type: AnsweredQuestion
has body: I have created three different CSS file for a website. When i view the website on a mobile device, it is not displayed correctly. The images and text overlap and the website is not resized. The css code is: GET PAID GUARANTEED Oswald:300,400,700:latin,latin-ext Roboto:300,500,700:latin,latin-ext <section data-section="section" style="height: 1366px; background-image: url(https://multimedia.getresponse.com/301/5361301/photos/34770001.jpg); background-attachment: initial; background-color: rgba(0, 0, 0, 0); background-size: cover; background-position: 50% 50%; background-repeat: no-repeat;" id="section-m51mj" data-uid="section-m51mj" data-bggradient="linear- gradient(to bottom, rgba(0, 0, 0, 0), rgba(251, 233, 172, 1))" class=""> Then you are PRE-APPROVED! Are you at least 18 years old? Do you have access to a reliable internet connection? <div data-editable="box" style="top: 635px; left: 145px; width: 731px; height: 661px; min- height: 390px; background-image: linear-gradient(rgb(244, 200, 49), rgb(251, 233, 172)); background-attachment: scroll; background-color: rgb(255, 255, 255); background-origin: padding-box; background-clip: border-box; background-position: 0% 0%; background-repeat: repeat;" data-reverse="true" id="edi-544a5" data-uid="edi-544a5" data-bggradient="linear-gradient(rgb(244, 200, 49), rgb(251, 233, 172))" class=""> Completely fill in the form below, You will receive an e-mail containing a link to the next step... Make at least $1,000 within 30 days of completing our step by step training or get paid $500 for trying! Your Name Your Email Phone Number # of hours you can work weekly: 1-5 11-20 21-30 6-10 Date You Are Available To Start Send Me More Info! <div data-editable="box" style="top: 69px; left: 127px; width: 672px; height: 168px; min-height: 277px; background: url(https://app.getresponse.com/images/common/templates/landing/108/1/img/02.png) 50% 0% / 635px no-repeat scroll padding-box border-box rgba(0, 0, 0, 0);" data-reverse="true" id="edi-4k…
has comment: http://stackoverflow.com/comment/41373708
downvote count: 1
possible better answer: http://stackoverflow.com/a/26359348
type: Question
tagged with: mobile-website
has comment: http://stackoverflow.com/comment/41697693
tagged with: javascript
has comment: http://stackoverflow.com/comment/41373574
has comment: http://stackoverflow.com/comment/41373518
has comment: http://stackoverflow.com/comment/41373747
score: 0
answer count: 2

http://stackoverflow.com/comment/41548673
type: QuestionComment
comment on: http://stackoverflow.com/q/26453905
type: Comment
has text: Readabiity is completely irrelevant. If you don't encode your input/output correctly, a threat definitely exists. If you're careful, no * injection is possible (but still 1500 other ways to be hacked of course).
score: 0

http://stackoverflow.com/a/26397161
type: Answer
answers question: http://stackoverflow.com/q/26397065
has body: you can use FiddlerCore. It allows you to integrate HTTP/HTTPS traffic viewing and modification capabilities into your .NET application.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26397065
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26465525
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41569652
has comment: http://stackoverflow.com/comment/41568895
upvote count: 1
has comment: http://stackoverflow.com/comment/41569228
answers question: http://stackoverflow.com/q/26465335
has body: Ajax data: dataString = 'id=' + id; calling it in php: $last_page_id = $_REQUEST['d_i_d']; You can get the id with $_REQUEST['id'] Please note that mysql_ is deprecated: Why shouldn&#39;t I use mysql_* functions in PHP? And that your code is open to SQL injection: http://en.wikipedia.org/wiki/SQL_injection
type: Answer
has comment: http://stackoverflow.com/comment/41569460

http://stackoverflow.com/q/26467603
has comment: http://stackoverflow.com/comment/41574579
has comment: http://stackoverflow.com/comment/41574681
type: Question
has comment: http://stackoverflow.com/comment/41573370
has comment: http://stackoverflow.com/comment/41573088
accepted answer: http://stackoverflow.com/a/27848264
tagged with: master-pages
tagged with: javascript
has comment: http://stackoverflow.com/comment/41585527
has comment: http://stackoverflow.com/comment/41573878
answer count: 2
has comment: http://stackoverflow.com/comment/41585848
tagged with: .net
has comment: http://stackoverflow.com/comment/41573216
has comment: http://stackoverflow.com/comment/41573965
has comment: http://stackoverflow.com/comment/41574786
tagged with: asp.net
possible better answer: http://stackoverflow.com/a/26468230
tagged with: web-deployment
has answer: http://stackoverflow.com/a/26468230
has answer: http://stackoverflow.com/a/27848264
type: AnsweredQuestion
has title: Javascript not working in master page
score: 0
has body: I have a login page using master page and I applied validation via javascript but its not working. if I give some value in username it shows me in that alert but if I don't give any values then the if condition should work but it isn't working, alert just shows "testing". here is my html code. <asp:Label ID="lblUserId" runat="server" ForeColor="Red" Visible="false" Text="* Username is Required!"></asp:Label> <asp:Label ID="lblPwd" runat="server" ForeColor="Red" Visible="false" Text="* Passowrd is Required!"></asp:Label> <asp:Label ID="lblBoth" runat="server" ForeColor="Red" Visible="false" Text="* Username and Password are Required!"></asp:Label> <asp:Label ID="lblHead" runat="server" Font-Bold="true" Text="Mobile Customer Order Tracking"></asp:Label> <asp:Label ID="lblLoginId" runat="server" Text="Login ID"></asp:Label> <asp:TextBox ID="txtLoginId" ClientIDMode="Static" runat="server" /> <asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label> <asp:TextBox ID="txtPassword" TextMode="Password" ClientIDMode="Static" runat="server"></asp:TextBox> <asp:Label ID ="lblRemember" runat="server" Text="Remember My ID"></asp:Label> <asp:CheckBox ID ="chkRemember" runat="server" /> <asp:Button ID="btnLogin" runat="server" text="Login" OnClientClick="return checkField(this);"/>

angularjs
tags question: http://stackoverflow.com/q/26459083
tags question: http://stackoverflow.com/q/26357125
tags question: http://stackoverflow.com/q/26361820
tags question: http://stackoverflow.com/q/26391088
tags question: http://stackoverflow.com/q/26497009
tags question: http://stackoverflow.com/q/26400761
tags question: http://stackoverflow.com/q/26387789
tags question: http://stackoverflow.com/q/26392358
tags question: http://stackoverflow.com/q/26498090
tags question: http://stackoverflow.com/q/26495591
tags question: http://stackoverflow.com/q/26466388
tags question: http://stackoverflow.com/q/26513302
tags question: http://stackoverflow.com/q/26410394
tags question: http://stackoverflow.com/q/26413019
tags question: http://stackoverflow.com/q/26408211
tags question: http://stackoverflow.com/q/26355451
tags question: http://stackoverflow.com/q/26466477
tags question: http://stackoverflow.com/q/26482219
tags question: http://stackoverflow.com/q/26505635
tags question: http://stackoverflow.com/q/26401556
tags question: http://stackoverflow.com/q/26466275
tags question: http://stackoverflow.com/q/26497231
tags question: http://stackoverflow.com/q/26489305
tags question: http://stackoverflow.com/q/26385703
tags question: http://stackoverflow.com/q/26449824
tags question: http://stackoverflow.com/q/26482937
tags question: http://stackoverflow.com/q/26493304
tags question: http://stackoverflow.com/q/26362695
tags question: http://stackoverflow.com/q/26500674
tags question: http://stackoverflow.com/q/26409735
tags question: http://stackoverflow.com/q/26416655
tags question: http://stackoverflow.com/q/26447923
tags question: http://stackoverflow.com/q/26426505
tags question: http://stackoverflow.com/q/26402357
tags question: http://stackoverflow.com/q/26452901
tags question: http://stackoverflow.com/q/26489302
tags question: http://stackoverflow.com/q/26510561
tags question: http://stackoverflow.com/q/26383507
tags question: http://stackoverflow.com/q/26361124
tags question: http://stackoverflow.com/q/26437518
tags question: http://stackoverflow.com/q/26400019
tags question: http://stackoverflow.com/q/26417984
tags question: http://stackoverflow.com/q/26457799
tags question: http://stackoverflow.com/q/26462454
tags question: http://stackoverflow.com/q/26417056
tags question: http://stackoverflow.com/q/26391373
tags question: http://stackoverflow.com/q/26489982
tags question: http://stackoverflow.com/q/26479762
tags question: http://stackoverflow.com/q/26467304
tags question: http://stackoverflow.com/q/26501025
tags question: http://stackoverflow.com/q/26449429
tags question: http://stackoverflow.com/q/26512584
tags question: http://stackoverflow.com/q/26356975
tags question: http://stackoverflow.com/q/26488043
tags question: http://stackoverflow.com/q/26398537
tags question: http://stackoverflow.com/q/26360807
tags question: http://stackoverflow.com/q/26479123
tags question: http://stackoverflow.com/q/26358832
tags question: http://stackoverflow.com/q/26367421
tags question: http://stackoverflow.com/q/26403233
tags question: http://stackoverflow.com/q/26482494
tags question: http://stackoverflow.com/q/26509265
tags question: http://stackoverflow.com/q/26356763
tags question: http://stackoverflow.com/q/26395488
tags question: http://stackoverflow.com/q/26454578
tags question: http://stackoverflow.com/q/26485286
tags question: http://stackoverflow.com/q/26419801
tags question: http://stackoverflow.com/q/26469487
tags question: http://stackoverflow.com/q/26448886
tags question: http://stackoverflow.com/q/26506854
tags question: http://stackoverflow.com/q/26505449
type: Tag
tags question: http://stackoverflow.com/q/26353984
tags question: http://stackoverflow.com/q/26399367
tags question: http://stackoverflow.com/q/26365339
tags question: http://stackoverflow.com/q/26502679
tags question: http://stackoverflow.com/q/26391265
tags question: http://stackoverflow.com/q/26424111
tags question: http://stackoverflow.com/q/26379150
tags question: http://stackoverflow.com/q/26460163

http://stackoverflow.com/q/26407874
linked to: http://stackoverflow.com/q/12338763
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/26408014
has comment: http://stackoverflow.com/comment/41467739
has comment: http://stackoverflow.com/comment/41464439
linked to: http://stackoverflow.com/q/330331
tagged with: jsp
tagged with: jquery
has comment: http://stackoverflow.com/comment/41468175
has comment: http://stackoverflow.com/comment/41464444
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26409910
possible better answer: http://stackoverflow.com/a/26408266
has answer: http://stackoverflow.com/a/26408266
type: Question
has comment: http://stackoverflow.com/comment/41464566
tagged with: java
has answer: http://stackoverflow.com/a/26408014
tagged with: javascript
has body: My servlet is giving me a CSV file with chars like 'é', 'á' or 'õ'. When I open the servlet via browser, it works fine. But when the information get to my page, it's all �. I tried changing the coding in the actual database, but it didn't work. console.log(csv), where csv is the information from the servlet, and it's also full of '�'s. I'm not even sure where the problem is, because the actual page has several latin characters which are presented properly. I'm using Microsoft SQL '08, tried both nvarchar and varchar fields.
tagged with: servlets
has title: How can I fix the '�' symbols on my page? It seems to be something happening between the servlet and the Javascript.

http://stackoverflow.com/q/26407048
has body: The custom CSS class .btn-loading disables the button and sets its text to loading state: $(document).on('click', '.btn-loading', function() { var btn = $(this); btn.button('loading'); // Fail-safe for buttons that get stuck in the loading state sometimes. setTimeout(function() { Rollbar.error("Button stuck"); btn.button('reset'); }, 10000); }); // Be sure to remove any loading state on page refresh $(document).on('ready page:load', function() { $('.btn-loading').button('reset'); }); Example button button type="submit" class="btn btn-primary btn-loading" data-loading-text="Processing..." Continue When the button is pressed, text is changed to 'Processing...' and the button is disabled preventing multiple submits. However, sometimes in development and production, the button gets stuck in the loading state and for some reason does not cause the submit and/or rendering of the new page. The setTimeout is firing multiple times a day on the production server. We are having hard times producing the problem on the development consistently.. it happens randomly now and then. Rollbar's statistics shows that it's not browser specific nor a single button+action that's causing it. So the cause is not a slow server response either. Any idea what might be causing this and how to fix it?
has comment: http://stackoverflow.com/comment/41575673
type: Question
score: 0
tagged with: ruby-on-rails-4
tagged with: turbolinks
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/26521508
has title: Bootstrap's button.js and Turbolinks issue
has answer: http://stackoverflow.com/a/26590908
has comment: http://stackoverflow.com/comment/41728036
has answer: http://stackoverflow.com/a/26521444
tagged with: twitter-bootstrap-3
type: UnansweredQuestion

python-collections
type: Tag
tag name: python-collections
tags question: http://stackoverflow.com/q/26377427

http://stackoverflow.com/a/28601176
has body: @Spanky answer is correct. but inorder for it to work, You need to add param max: { param: 6.2 // Max value depends: function (element) { return if(10&gt;2); //Condition } } Fiddle
answers question: http://stackoverflow.com/q/26495306
downvote count: 0
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/comment/41446830
type: QuestionComment
type: Comment
has text: Try to get the index of the tr and use it to mulitply with tr height and generate the tooltip position.
comment on: http://stackoverflow.com/q/26397830
score: 0

http://stackoverflow.com/a/26475041
has comment: http://stackoverflow.com/comment/41588021
score: 0
has comment: http://stackoverflow.com/comment/41587793
answers question: http://stackoverflow.com/q/26474648
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26474648
has body: This is part of the problem: Your mock does not declare the findAll method. Note that your Users resource declares findAll as an additional method - your much should too.
type: Answer

http://stackoverflow.com/q/26464142
score: 0
answer count: 1
has title: How to hide the space between cells in DHTMLX 3.0?
tagged with: javascript
has answer: http://stackoverflow.com/a/26466962
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41566712
has body: I've created a '3T' layout in dhtmlx. And if I create the cells, there is a splitter, or some space between them. How is it possible, to remove the spacing from between cell "a" and "b"? I know DHTMLX is not a well known library, that's why I can't find the answer on the internet.
type: Question
tagged with: dhtmlx
accepted answer: http://stackoverflow.com/a/26466962
has comment: http://stackoverflow.com/comment/41566830

http://stackoverflow.com/comment/51447390
type: Comment
has text: What method did you use to compress it down?
type: AnswerComment
comment on: http://stackoverflow.com/a/26452572
score: 0

http://stackoverflow.com/q/26382956
score: 0
has body: I've come across a problem that I've never seen before as I'm fairly new to javascript. Currently trying to get a HUD working on an endless runner game I've downloaded (link: http://www.html5quintus.com/quintus/examples/runner/). Have copied all the images, JSON, javascript and index files and have managed to get it working with some gui labels along the top of the screen to indicate the number of lives and health remaining. Upon a collision of the player with a crate, I'm deducting 25 (stored in a variable called hitAmount) from the overall health of the player (starts at 100), however - upon the first impact between the player and a crate, I see 'NAN' rather than a result of a simple subtraction calculation. Does anyone know why this is the case? window.addEventListener("load",function() { var Q = window.Q = Quintus() .include("Sprites, Scenes, Input, 2D, Anim, Touch, UI") .setup({ maximize: true }) .controls().touch() var SPRITE_BOX = 1; Q.gravityY = 2000; var lives = 3; var damageAmount = 25; Q.Sprite.extend("Player",{ init: function(p) { this._super(p,{ sheet: "player", sprite: "player", collisionMask: SPRITE_BOX, x: 40, y: 555, standingPoints: [ [ -16, 44], [ -23, 35 ], [-23,-48], [23,-48], [23, 35 ], [ 16, 44 ]], duckingPoints : [ [ -16, 44], [ -23, 35 ], [-23,-10], [23,-10], [23, 35 ], [ 16, 44 ]], speed: 500, health: 100, jump: -700 }); this.p.points = this.p.standingPoints; this.add("2d, animation"); }, step: function(dt) { this.p.vx += (this.p.speed - this.p.vx)/4; if(this.p.y &gt; 555) { this.p.y = 555; this.p.landed = 1; this.p.vy = 0; } else { this.p.landed = 0; } if(Q.inputs['up'] &amp;&amp; this.p.landed &gt; 0) { this.p.vy = this.p.jump; } this.p.points = this.p.standingPoints; if(this.p.landed) { if(Q.inputs['down']) { this.play("duck_right"); this.p.points = this.p.duckingPoints; } else { this.play("walk_right"); } } else { this.play("jump_right"); } this.stage.viewport.centerOn(this.p.x + 300, 400 ); } }); Q.Sprite.extend("Box",{ init: function()…
has answer: http://stackoverflow.com/a/26383866
answer count: 1
tagged with: javascript
has title: Javascript Quintus Endless Runner NAN error
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41421010
type: Question

http://stackoverflow.com/q/26493234
has answer: http://stackoverflow.com/a/26501120
score: 0
has comment: http://stackoverflow.com/comment/41634078
answer count: 1
tagged with: jquery
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: navbar with mouse hover and mouse click both
has comment: http://stackoverflow.com/comment/41639974
has comment: http://stackoverflow.com/comment/41620111
has comment: http://stackoverflow.com/comment/41620186
has body: I am using bootstrap responsive navbar. I want to make navbar drop down when mouse hover . When I resize my screen and small the size of browser then the same functionality of dropdown work when I click on navbar Instead of hover. In short when full size of browser then dropdown work on mouse hover and When small size of browser it should work onclick. Here is my Html Toggle navigation Project name Link Link Link Dropdown Action Another action Something else here Nav header Separated link One more separated link I have attempted two ways, first one is:
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41632246

http://stackoverflow.com/comment/41623450
comment on: http://stackoverflow.com/a/26494242
type: AnswerComment
type: Comment
score: 0
has text: I tried this first but it hides the whole navigation menu instead of blocking sticky function only.

http://stackoverflow.com/q/26508586
has body: I have a hashtable I am trying to use in an vector layer so this is what I made: var make = [], remove = []; for (var key in data) { var val = data[key]; if (featureCache[key]) { if (val._ts &gt; featureCache[key]._ts) { var geom = featureCache[key].getGeometry(); The problem starts here. From what I have found out so far I have two options: geom.setCoordinates(latlng([val.Latitude, val.Longitude])); geom.flatCoordinates = latlng([val.Latitude, val.Longitude]); However the first one bubbles up and makes the map render, this is a problem because I have over 1500 features and I plan on using more. The second line gives me assertion failed, and I dont know how to debug it. featureCache[key]._ts = val._ts; } } else { make.push(featureCache[key] = new ol.Feature({ geometry: new ol.geom.Point(latlng([val.Latitude,val.Longitude])) }) ); featureCache[key]._ts = val._ts; } } source.addFeatures(make); This needs to be run every other second or so because I want the data to be as realtime as possible. And if this is a really stupid way do do it, I would like to know that too.
tagged with: batch-processing
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26525132
has title: Realtime data and Openlayers 3: Batch moving features
tagged with: openlayers-3
type: Question
score: 2

http://stackoverflow.com/q/26431333
score: 5
downvote count: 0
tagged with: webrtc
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26479138
has title: Send MediaStream object with Web Audio effects over PeerConnection
tagged with: http://stackoverflow.com/tag/html
tagged with: web-audio-api
has body: I'm trying to send audio, obtained by getUserMedia() and altered with the Web Audio API, over a PeerConnection from WebRTC. The Web Audio API and WebRTC seem to have the ability to do this but I'm having trouble understanding how this can be done. Within the Web Audio API, the AudioContext object contains a method createMediaStreamSource(), which provides a way to connect the MediaStream obtained by getUserMedia(). Also, there is a createMediaStreamDestination() method, which seems to return an object with a stream attribute. I'm getting both audio and video from the getUserMedia() method. What I'm having trouble with is how would I pass this stream object (with both audio and video) into those methods (ex: createMediaStreamSource())? Do I first need to extract, somehow, the audio from the stream (getAudioTracks) and find a way to combine it back with the video? Or do I pass it as is and it leaves the video unaffected? Can the audio only be altered once (before added to the PeerConnection)?
has answer: http://stackoverflow.com/a/26442308
type: AnsweredQuestion
upvote count: 5
has comment: http://stackoverflow.com/comment/41515395
type: Question
has answer: http://stackoverflow.com/a/26479138
answer count: 2
accepted answer: http://stackoverflow.com/a/26442308

http://stackoverflow.com/q/26468030
has title: Performing calculations on an html form
score: 0
tagged with: forms
has answer: http://stackoverflow.com/a/26469711
accepted answer: http://stackoverflow.com/a/26469711
tagged with: javascript
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am fairly new to HTML & Javascript and I have been assigned a task to create a HTML form for a restaurant which allows the user to input their information for a booking. So far I have created the form for the website and validated each input field in order to ensure the correct information is entered into the necessary fields. However, I also need to enable the form to calculate a total price for the booking based on 2 details (number of people in the party & if the customer wishes to dine in the VIP area). Here is the related html code thus far: ... Select Party Size: Please Select 1 Person (£5) 2 People (£10) 3 People (£15) 4 People (£20) 5 People (£25) 6 People (£30) 7 People (£35) 8 People (£40) 9 People (£45) 10+ People (£50) ... VIP Area? Yes (+£5) No Please specify whether you would like a table in the VIP area. ... Total booking cost based on party size & VIP selection: For example, if the customer selects that there are 6 people in their party and they also wish to be seated in the VIP area, the total price displayed at the bottom of the page would be £35. I understand this can be performed in javascript so I would be very grateful if someone could show me how this can be done. Thank you!
answer count: 1

http://stackoverflow.com/comment/41680645
score: 0
has text: A clarification: things are not as straightforward as checking the WinRT property above, although that's probably the best method available. For instance, if I have Finnish as the display language but haven't downloaded the language pack (= I see the OS in en-US), this API returns "fi". OS also roams the user settings between machines, so if I use one machine in Finnish (have downloaded the lang pack etc), and one machine in English, the selection and the value API returns might be "fi" on both machines even though I see (and want to see) one machine in en-US (because my selection was sync'd).
type: Comment
comment on: http://stackoverflow.com/a/26483926
type: AnswerComment

http://stackoverflow.com/a/33302878
upvote count: 2
has body: I have got the same error and managed to make it work adding resources-codemirror dependency to my pom.xml org.primefaces.extensions primefaces-extensions 3.2.0 org.primefaces.extensions resources-codemirror 1.2.1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26422935
type: Answer
accepted answer of: http://stackoverflow.com/q/26422935
score: 2

http://stackoverflow.com/q/26468283
has answer: http://stackoverflow.com/a/26468312
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26468639
has comment: http://stackoverflow.com/comment/41574203
has comment: http://stackoverflow.com/comment/41574166
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26468312
has title: Parsing a JSON string to an array
accepted answer: http://stackoverflow.com/a/26468304
type: Question
score: 0
has answer: http://stackoverflow.com/a/26468365
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to parse this JSON string: var string = '{"DataSerialized":{"DocumentElement":{"NAME_LIST":"FIELD_1":"VALUE_1","FIELD_2":"VALUE2","FIELD_3":"VALUE_3"}}}}'; how a JSON object how this: { "DataSerialized":{ "DocumentElement":{ "NAME_LIST":{ "FIELD_1":"VALUE_1", "FIELD_2":"VALUE2", "FIELD_3":"VALUE_3" } } } } For that, I tried with jQuery.parseJSON(string) but the result is wrong: SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 60 of the JSON data I think that it's a problem with quotes, but I don't know what's wrong exactly Thanks in advance SOLUTION: { after NAME_LIST var string = '{"DataSerialized":{"DocumentElement":{"NAME_LIST":{"FIELD_1":"VALUE_1","FIELD_2":"VALUE2","FIELD_3":"VALUE_3"}}}}';
has answer: http://stackoverflow.com/a/26468304
answer count: 4

http://stackoverflow.com/a/26452165
upvote count: 11
has body: Because the compiler only expects an identifier or a string and therefore will not evaluate to the variable's value. But you can use bracket notation to achieve what you want. var progres_mark = function(progress_state) { var now = Date(); var obj = {}; obj[progress_state] = now; console.log(obj) }
has comment: http://stackoverflow.com/comment/41545538
has comment: http://stackoverflow.com/comment/41545509
answers question: http://stackoverflow.com/q/26452146
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26452146
type: Answer
score: 11

http://stackoverflow.com/q/26447697
upvote count: 1
has comment: http://stackoverflow.com/comment/41537625
type: Question
has comment: http://stackoverflow.com/comment/41537604
has title: On click split my square div in equal parts continously in equal matrix matrix form
tagged with: javascript
has comment: http://stackoverflow.com/comment/41537489
downvote count: 4
has comment: http://stackoverflow.com/comment/41537888
answer count: 1
has answer: http://stackoverflow.com/a/26447964
tagged with: jquery
has comment: http://stackoverflow.com/comment/41537679
favorite count: 0
linked to: http://stackoverflow.com/q/13297080
has comment: http://stackoverflow.com/comment/41537911
has body: I am very new on this site and found it very interesting... Actually,I want splitting of div in equal matrix form,that I have already taken.On clicking anywhere inside it... For. example- 1)On first click my div will split into 2 X 2 parts.. 2)On second click my div will split into 3 X 3 parts.. And so on upto n X n.. I have already searched it on google,but unfortunately i hve not found any script as a solution for it..Thanks a lot for replying in advance.. &lt;div class="main_div" style="width:500px;height:500px;background-color:#9F0;"&gt; &lt;/div&gt;
score: -3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41537658
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41537786
accepted answer: http://stackoverflow.com/a/26447964

http://stackoverflow.com/comment/42584711
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26481814
score: 0
has text: @krnekires: sorry with Chrome 38 and Firefox 33, it did not work.

http://stackoverflow.com/q/26359864
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41380429
has answer: http://stackoverflow.com/a/26361290
score: 0
has comment: http://stackoverflow.com/comment/41377753
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26361290
has body: As shown in this fiddle I almost have a working example of a horizontal side by side and stacked chart. Whats wrong with it? Does it have something to do with the way the data is formatted? data: [ [10, 1], [20, 2], [30, 3], [40, 4], [50, 5], [60, 6] ]
has title: jquery flot, horizontal side by side and stacked chart not correctly working
answer count: 1
tagged with: flot
tagged with: jquery

http://stackoverflow.com/comment/41509823
comment on: http://stackoverflow.com/a/26432572
score: 1
has text: Snippet using console.log. Open your console with `f12` and you see the result :) Also is better to avoid document.write.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41387207
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/26364745
has text: Depends on how the engine implements arrays! Maybe this helps (for V8): http://www.html5rocks.com/en/tutorials/speed/v8/
type: Comment

http://stackoverflow.com/comment/41401709
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26371742
has text: When you call jquery's hide() on the element, it should be dynamically adding style attributes to the element - if you inspect the element, do you see those style attributes updating on it?

http://stackoverflow.com/q/26401923
has answer: http://stackoverflow.com/a/26402858
has comment: http://stackoverflow.com/comment/41467899
downvote count: 1
tagged with: model-view-controller
score: 2
type: AnsweredQuestion
has body: Assumptions: I have a banking app with a Java-style web server. The Client side is written in JS with backbone and other plugins. (The developers are fans of Angular, but they're not using that). My JavaScript developers have come to me and said "X is impossible because of the way we do the MVC in the browser." Now I'm fine with an MVC on the server side; we already have that. But when the JavaScript guys want to have an MVC on the client, it feels like we're keeping a state about the customer's experience in two different places. I think it's simpler to keep in one place. I'm familiar with the 'three-tier' architectures of the 90s - with a database tier, a tier for transaction management, and another tier for customer interaction. We moved away from that because it was horrible. I'm also familiar with running server-side apps in Node.js. To me - it makes sense to have a server-side MVC in this scenario. My question is: What are the reasons I would need an MVC model on the browser client for a server-based application?
has answer: http://stackoverflow.com/a/26402963
has comment: http://stackoverflow.com/comment/41453598
type: Question
has comment: http://stackoverflow.com/comment/41454583
has answer: http://stackoverflow.com/a/26402469
tagged with: three-tier
tagged with: javascript
has comment: http://stackoverflow.com/comment/41457781
accepted answer: http://stackoverflow.com/a/26402963
favorite count: 0
answer count: 4
has title: What are the reasons I would need an MVC model on the browser client for a server based application?
tagged with: backbone.js
possible better answer: http://stackoverflow.com/a/26402506
tagged with: angularjs
upvote count: 3
has answer: http://stackoverflow.com/a/26402506

http://stackoverflow.com/q/26416725
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26416945
has title: Google analytics events not firing
answer count: 1
type: AnsweredQuestion
has body: I'm using the new "universal analytics" package. Everything is working except for event, which are not firing. onClick: "ga('send', 'event', 'ajax_action', 'user_prompt', 'user_classification', 'yes', {'nonInteraction': 1});" That code does not produce an error in the console, but it doesn't trigger an event. What could the problem be?
type: Question
tagged with: google-analytics
accepted answer: http://stackoverflow.com/a/26416945

http://stackoverflow.com/q/26469428
has title: Scroll event never fires and .scrollTop() always returns 0 because of wrapper DIV
has comment: http://stackoverflow.com/comment/41577069
type: Question
possible better answer: http://stackoverflow.com/a/26470544
tagged with: javascript
has answer: http://stackoverflow.com/a/26470544
tagged with: jquery
has answer: http://stackoverflow.com/a/26470522
accepted answer: http://stackoverflow.com/a/26470522
upvote count: 2
score: 0
answer count: 2
downvote count: 2
favorite count: 0
has comment: http://stackoverflow.com/comment/41576675
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41577924
has body: Basically what I'm trying to do is use a on scroll event and use jquery scrollTop() while using this [off-canvas menu][1] Here's a fiddle! http://jsfiddle.net/k6hsvp1a/ Here's the code that isn't working as expected: (The scroll event never fires and scrollTop() always returns as 0) $( window ).on('scroll', function() { console.log($(window).scrollTop()); console.log('scrolling!'); }); My understanding is that because the off-canvas menu uses a relatively positioned wrapper div, the scroll event never fires because $(window).scrollTop() always returns zero. How can I make a scroll event work and use scrollTop() ?

http://stackoverflow.com/a/26392362
upvote count: 1
has comment: http://stackoverflow.com/comment/62187931
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/62154836
accepted answer of: http://stackoverflow.com/q/26378733
has body: The solution you found online is not likely to help your issue. I doubt your IsIE() function is correctly identifying IE. If it was, SignalR should only be attempting to establish a "foreverFrame" connection, since IE does not even support "serverSentEvents". I would not expect IE to make any "/signalr/poll" requests, because those requests are only made by the "longPolling" transport. Also, having a "pending" poll request in the IE F12 tool's network tab is entirely expected. This is how long polling is designed to work. Basically, as soon as a message is received the client makes a new ajax request (a long poll) to retrieve new messages. If no new messages are immediately available, the server will wait (for up to 110 seconds by default in the case of SignalR, not forever) for a new message to be sent to the client before responding to the pending long poll request with the new message. Can you clarify exactly what issue you are having other than seeing a pending poll request showing up under the network tab? It would also help if you you enabled tracing in the JS client, provided the console output, and showed all the "/signalr/..." requests in the network tab.
type: Answer
answers question: http://stackoverflow.com/q/26378733
has comment: http://stackoverflow.com/comment/41449365
has comment: http://stackoverflow.com/comment/64342612
has comment: http://stackoverflow.com/comment/132251424
has comment: http://stackoverflow.com/comment/41470522
score: 0
has comment: http://stackoverflow.com/comment/63864639

http://stackoverflow.com/a/43919712
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: I am using jQuery and this is what worked for me: var dz = $(".my-awesome-dropzone").dropzone()[0]; dz.dropzone.on("success", function (file, response) { ... })); Note that the dropzone() method adds an dropzone attribute to the DOM object. You have to call on() on that object - not the jQuery on().
answers question: http://stackoverflow.com/q/26421731

http://stackoverflow.com/q/26425987
has comment: http://stackoverflow.com/comment/41500080
score: 0
has comment: http://stackoverflow.com/comment/41499839
has comment: http://stackoverflow.com/comment/41499594
answer count: 1
has comment: http://stackoverflow.com/comment/41499692
has answer: http://stackoverflow.com/a/26426054
has title: Use a variable in PhP script passed by $http.post
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41499996
tagged with: php
type: AnsweredQuestion
tagged with: mysql
accepted answer: http://stackoverflow.com/a/26426054
has comment: http://stackoverflow.com/comment/41499473
tagged with: http
has body: In angular im using $http.post for sending an id to a php script in order to use this id for a mysql request. This is my controller: function ProjectDetailsCtrl($scope, $http, $timeout, getGoodIdProjectDetails) { $scope.idProjectDetails = getGoodIdProjectDetails.getId(); //Getting id project $scope.$emit('LOAD') $scope.url = 'scripts/findProjectDetails.php'; $http.post($scope.url, { "idProject" : $scope.idProjectDetails}). success(function(data, status) { $scope.projectDetails = {}; $scope.projectDetails.details = data; $scope.$emit('UNLOAD') }) . error(function(data, status) { $scope.data = data || "Request failed"; $scope.status = status; }); } idProjectDetails is a number. Then the Php script : &lt;?php $idProject = json_decode($_POST['idProject']); Php script returns that $idProject is undefined. Can you help me with this ? Edit : I tried this way but my app crashed with this : $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; $http({ method: 'POST', url: 'scripts/findProjectDetails.php', data: "idProject" : $scope.idProjectDetails }).success(function(data, status) { $scope.projectDetails = {}; $scope.projectDetails.details = data; console.log(projectDetails.details); $scope.$emit('UNLOAD') }) . error(function(data, status) { $scope.data = data || "Request failed"; $scope.status = status; }); With the first example, in Chrome console, the "request playload" contain this : {idProject:1} idProject:1 so I assume my variable is correctly passed through the php script?
linked to: http://stackoverflow.com/q/19254029
type: Question
has comment: http://stackoverflow.com/comment/41499515
has comment: http://stackoverflow.com/comment/41499806
has comment: http://stackoverflow.com/comment/41499711
linked to: http://stackoverflow.com/q/15485354
tagged with: javascript
has comment: http://stackoverflow.com/comment/41499970
has comment: http://stackoverflow.com/comment/41500256

http://stackoverflow.com/comment/41406883
type: QuestionComment
comment on: http://stackoverflow.com/q/26373631
has text: I Agree, but as far as there is no solution I put my own "it is impossible" answer. You can "+1" it if you agree with the statement.
score: 0
type: Comment

http://stackoverflow.com/a/26381860
has comment: http://stackoverflow.com/comment/41418925
type: Answer
has comment: http://stackoverflow.com/comment/41419102
has comment: http://stackoverflow.com/comment/41420682
upvote count: 2
has comment: http://stackoverflow.com/comment/41418638
answers question: http://stackoverflow.com/q/26380966
score: 2
has comment: http://stackoverflow.com/comment/41419320
has body: I was expecting myCar.setWheels = 2 to alter the inherited property, but instead it sets myCar's local property which shadows inherited one Well, you've "called" the setter on myCar, so you are setting its .wheels property. If you wanted to alter the inherited property, you need to alter it on the object from which it is inherited: Car.prototype.setWheels = 2; (Although I've never seen a car with two wheels) Notice that usually you'd expect instance properties (.wheels set in Vehicle) to be only apparent on instances (like myCar), not on prototypes. You might consider changing your way of inheritance to the commonly accepted one. The quote you have read at MDN: Setting a property to an object creates an own property. The only exception to the getting and setting behavior rules is when there is an inherited property with a getter or a setter. means that an own property will be generated on assignment when there is no setter (but it is a data property or not existing yet). If the property that gets assigned to has a setter defined (either own or inherited), then that setter function will be invoked instead. Indeed, in your example, no own .setWheels property is getting created on your myCar. What the setter function does it a whole different question. It can create a property (like yours does, by assigning to .wheels on the current instance, this), or do anything else; including crazy things like redefining itself. To get the "expected" behaviour, you could use a local variable to store the number of wheels and use a setter/getter property for it: function Car() {} var w = 4; // "local", could be in an IIFE Object.defineProperty(Car.prototype, "wheels", { set: function(x) { w = x; // no property changes/creations involved }, get: function() { return w; } }); // yourCar inherits 'wheels' var yourCar = new Car(); yourCar.wheels; // 4 yourCar.wheels = 2; // you've got an odd car var myCar = new Car(); myCar.wheels; // 2 - what's wrong with my car?! Here, there is only on…
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26380966

http://stackoverflow.com/q/26397564
has title: Implememting autolookup in angularJS
score: 0
has answer: http://stackoverflow.com/a/26398050
answer count: 1
has body: I have a json object in my hand, and three textbox in a row. when I enter something on first textbox, and if it matches any data I have in my object I want to fill the remaining two textboxes with the corresponding row. I want only one row data to be shown, most matching row I have in my search result rest can be ignored. I have tried many ways to achieve this but all failed. My HTML is like this &lt;body ng-app="myApp" ng-controller="MainCtrl"&gt; &lt;div&gt; &lt;div ng-repeat="friendObj in friends | filter:search:strict | limitTo:1"&gt; &lt;input ng-model="search.name" /&gt; &lt;input ng-model="friendObj.name" /&gt; &lt;input ng-model="friendObj.phone" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt;&lt;/div&gt; &lt;/body&gt; Note : I won't be able to change My HTML structure at any condition. My JS Code angular.module('myApp', []).controller('MainCtrl', ['$http', '$scope', function ($http, $scope) { $scope.friends = [{ name: 'John', phone: '555-1276' }, { name: 'Mary', phone: '800-BIG-MARY' }, { name: 'Mike', phone: '555-4321' }, { name: 'Adam', phone: '555-5678' }, { name: 'Julie', phone: '555-8765' }, { name: 'Juliette', phone: '555-5678' }]; }]); I don't think I have reached anywhere at my objective. I am confused is ng-repeat and filter itself is the right tools for this job? Can any one point out the correct way to achieve this? http://jsfiddle.net/v2xqmkwx/11/
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26398050
tagged with: javascript
tagged with: angularjs
type: Question

http://stackoverflow.com/a/26474767
has body: Use display: none and display: block instead of visibility: hidden and visibility: visible respectively, like this: &lt;style&gt; .mobile{ display: none !important;; } @media (max-width:480px) { .desktop{ display: none !important;; } .mobile{ display: block !important;; } } &lt;/style&gt;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26474740

http://stackoverflow.com/q/26479314
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 2
tagged with: safari
score: 2
tagged with: polymer
type: AnsweredQuestion
has body: I guess this is not a very original question for those already familiar with Polymer. Anyway I have started using it from two months, developed a lot of code, enjoyed it and now I am realizing it doesn't work on Safari (or at least the code I have developed doesn't work). I am importing the polymer platform.js as described in the doc but I think there has to be something I am still missing. No errors are reported in the safari console Any help would be really appreciated
has title: Polymer elements not rendered on Safari 7.0
has answer: http://stackoverflow.com/a/26488529
type: Question
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26488529
tagged with: javascript

http://stackoverflow.com/comment/41576702
type: Comment
comment on: http://stackoverflow.com/a/26467240
type: AnswerComment
score: 0
has text: This is a comment, not an answer.

http://stackoverflow.com/q/26380374
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/26380783
type: Question
tagged with: javascript
tagged with: jquery
tagged with: css-animations
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: I use jquery to alter a table's td contents. I want to "move" the content of one td to another td, replacing the existing content. E.g.: | A | B | | C | D | now i "move the content of D to A" and get: | D | B | | C | &nbsp; &nbsp; | how can I animate this transition? Fade-out/fade-in is easy but how can one visually move D to A? Thanks very much Update: I need to do it programatically, so user drag/drop is not an option.
has comment: http://stackoverflow.com/comment/41415712
has comment: http://stackoverflow.com/comment/41415823
favorite count: 0
has comment: http://stackoverflow.com/comment/41415766
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26380628
has title: Animate moving of a td to another td
has answer: http://stackoverflow.com/a/26380825

jqplot
tags question: http://stackoverflow.com/q/26385985
tag name: jqplot
tags question: http://stackoverflow.com/q/26466989
tags question: http://stackoverflow.com/q/26503417
tags question: http://stackoverflow.com/q/26502266
type: Tag
tags question: http://stackoverflow.com/q/26469741

http://stackoverflow.com/comment/41460499
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26405657
has text: @DennisMartinez That's exactly what I want. But when I use that with the real JSON data it doesn't work. I think I'm handling the json response wrongly. Take a look at this JSFiddle: http://jsfiddle.net/narzero/kgtLpe5g/

http://stackoverflow.com/q/26367516
score: 0
tagged with: dictionary
has comment: http://stackoverflow.com/comment/41392966
has title: How to generate an array of dictionaries with a For loop
has answer: http://stackoverflow.com/a/26368097
has body: The way I'm currently generating my array of dictionaries is very hard-wired in, and I'd rather not do it that way. Top 3 doesn't necessarily have 3 items, I used that name for other reasons. For example, if I know Top 3 will contain two items in addition to the search term, it will look like this: var top3Titles = []; var top3Prices = []; var top3ImgURLS = []; var top3ItemURLS = []; //where the title, price, and img url are sent over to the app matchCenterItems.forEach(function(item) { var title = item.title[0]; var price = item.sellingStatus[0].convertedCurrentPrice[0].__value__; var imgURL = item.galleryURL[0]; var itemURL = item.viewItemURL[0]; top3Titles.push(title); top3Prices.push(price); top3ImgURLS.push(imgURL); top3ItemURLS.push(itemURL); }); // 10 results per MC Item, only showing 4 by default var top3 = { "Top 3": [ { "Search Term": searchTerm }, { "Title": top3Titles[0], "Price": top3Prices[0], "Image URL": top3ImgURLS[0], "Item URL": top3ItemURLS[0] }, { "Title": top3Titles[1], "Price": top3Prices[1], "Image URL": top3ImgURLS[1], "Item URL": top3ItemURLS[1] }, ] }; return top3; What I want to do instead is to have the number of dictionaries after the initial Search Term depend on how many item objects there are in the matchCenterItems array. I figured I could do this using a for loop, but I'm not entirely sure how to format it for this purpose. Rather than having separate arrays for titles, prices, etc, I want it to be an object with a title property for example.
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26368382
answer count: 2
tagged with: arrays
accepted answer: http://stackoverflow.com/a/26368097
possible better answer: http://stackoverflow.com/a/26368382
tagged with: javascript

http://stackoverflow.com/a/26429496
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26426298
has body: This isn't a direct answer to the question as others have already answered, it's more to highlight libraries that contain an isUndefined() function for anybody looking for quick solution and they're in a position to use them. Underscore and Lo-dash both contain an isUndefined() function, the latter, because it's built upon Underscore. http://underscorejs.org/#isUndefined https://lodash.com/docs#isUndefined

http://stackoverflow.com/q/26406405
has comment: http://stackoverflow.com/comment/41461541
has comment: http://stackoverflow.com/comment/41461644
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
has body: i have query like this: var query='(("email=mk@gmailcom"|"ame=mk")&amp;("email=mk1@gmailcom"|"nam=mk1"))&amp;code=123'; but this may vary. how to convert this type of query into mongodb query syntax like this : { $and: [ { &lt;expression1&gt; }, { &lt;expression2&gt; } , ... , { &lt;expressionN&gt; } ] } we need a library or algorithm by which we can convert any logical query into mongodb query. is there any library or algorithm ?
has title: how to convert any logical query into mongodb query?
answer count: 0
type: Question
tagged with: algorithm
tagged with: javascript
has comment: http://stackoverflow.com/comment/41502778
has comment: http://stackoverflow.com/comment/41461560
score: 0
tagged with: mongodb

http://stackoverflow.com/q/26364931
tagged with: javascript
has answer: http://stackoverflow.com/a/26365007
accepted answer: http://stackoverflow.com/a/26364964
has comment: http://stackoverflow.com/comment/41387531
favorite count: 0
has answer: http://stackoverflow.com/a/26365084
upvote count: 2
tagged with: css
possible better answer: http://stackoverflow.com/a/26364971
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26364971
has comment: http://stackoverflow.com/comment/41387694
has answer: http://stackoverflow.com/a/26364964
score: 1
has title: Why can't I remove a style from an element?
downvote count: 1
type: Question
has body: I have a code which should add and remove styles. (function (){ var elem = document.querySelector('div'); elem.style.backgroundColor = 'green'; elem.style.outline = 'solid red 5px'; elem.style.removeProperty('outline'); elem.style.removeProperty('backgroundColor'); })(); And I can't remove backgroundColor. How can i fix it? Here is my jsFiddle example http://jsfiddle.net/gjm550sL

http://stackoverflow.com/comment/41632579
type: Comment
comment on: http://stackoverflow.com/a/26500151
type: AnswerComment
score: 1
has text: That JSON is not equivalent to the OP's JSON.

http://stackoverflow.com/a/26510365
answers question: http://stackoverflow.com/q/26507950
score: 0
has comment: http://stackoverflow.com/comment/41656174
has body: You can't do this with CodeMirror's current mode system -- to know whether a line is the last line in a paragraph, you would have to look ahead to the next line, and that is not possible. See also https://github.com/codemirror/CodeMirror/issues/839
type: Answer

http://stackoverflow.com/q/26397017
upvote count: 7
has body: Is there any way to create a horizontal multilevel menu structure using bootstrap I haven't seen any multilevel menus with Horizontal orientation . If not i have to use some external css and styles to generate this kind of menu . A sample structure of the menu structure is similar to this
score: 7
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Bootstrap Horizontal multilevel Menu
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/26397074
type: UnansweredQuestion

http://stackoverflow.com/comment/41574675
type: Comment
has text: Happy to help. One other tip, look into caching your jquery selectors. `var $progressSelected = $(".progress-selected");` https://eamann.com/tech/selector-caching-jquery/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26467836

http://stackoverflow.com/q/26436857
accepted answer: http://stackoverflow.com/a/26437023
linked to: http://stackoverflow.com/q/46155
has comment: http://stackoverflow.com/comment/41518192
tagged with: regex
has comment: http://stackoverflow.com/comment/41518225
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26437021
has title: Javascript Regex returning 0
has comment: http://stackoverflow.com/comment/41518277
has comment: http://stackoverflow.com/comment/41518147
possible better answer: http://stackoverflow.com/a/26437021
type: Question
score: 0
answer count: 2
has body: As you can see, the e-mail should be valid. Regardless of what I enter, z returns null. Am I using the wrong syntax, entirely? How do I make this regex return true? Thanks! function emailValidate() { var x = document.forms["creation"]["emailCreation"].value; var y = x.length; var z = x.match(" /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/"); var_dump(z); var_dump(x);
tagged with: javascript
has answer: http://stackoverflow.com/a/26437023

http://stackoverflow.com/q/26447030
has comment: http://stackoverflow.com/comment/41536407
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26447087
has comment: http://stackoverflow.com/comment/41536401
has comment: http://stackoverflow.com/comment/41536398
has comment: http://stackoverflow.com/comment/41536419
type: Question
has comment: http://stackoverflow.com/comment/41536421
has comment: http://stackoverflow.com/comment/41536383
has comment: http://stackoverflow.com/comment/41536538
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I have a list of questions that a person can answer yes or no to. At the end, I want to display the question, whether they answered yes or no, and a paragraph about the results. I'm having trouble getting my if/else statement to work. HTML: Are any of your valuables visible from the street? yes no n/a Get Results > JS: $('#results').click(function(){ var q1 = $('li#q1 input:checkbox:checked.calc').val(); if (q1 == 1) { console.log("You answered No"); } else { console.log("You answered Yes"); } }); I've tried every variation I can think of, but the console always prints out "You answered Yes".
score: 0
possible better answer: http://stackoverflow.com/a/26447056
has title: jQuery if/else based on input value
has answer: http://stackoverflow.com/a/26447087
has answer: http://stackoverflow.com/a/26447056

http://stackoverflow.com/comment/41482867
has text: @Barmar When the post was initially made, the `document.write(document.all.length);` was originally commented out.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26417888
type: Comment

http://stackoverflow.com/q/26382950
has title: SVG append issue in html
downvote count: 3
tagged with: css
upvote count: 0
tagged with: http://stackoverflow.com/tag/svg
accepted answer: http://stackoverflow.com/a/26394887
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41421347
has body: I am working on application in which i am using d3js charts as widgets. On adding widget, a function is called which creates and draws the widget(svg element) to that div. Problem: My problem is that when same widget is added twice, then instead of drawing the d3js chart(svg element) into new div, it gets appended to the previously created div(with previous svg). Also I am facing problem in resizing the charts when the div is resized. This is the response from ajax: &lt;div id="chart"&gt;&lt;/div&gt; &lt;script&gt; var m = [30, 50, 10, 30], w = 600 - m[1] - m[3], h = 400 - m[0] - m[2]; var format = d3.format(",.0f"); var x = d3.scale.linear().range([0, w]), y = d3.scale.ordinal().rangeRoundBands([0, h], .1); var xAxis = d3.svg.axis().scale(x).orient("top").tickSize(-h), yAxis = d3.svg.axis().scale(y).orient("left").tickSize(0); var svg = d3.select("#chart").append("svg") .attr("width", w + m[1] + m[3]) .attr("height", h + m[0] + m[2]) .attr("viewBox", "0 0 600 400") .append("g") .attr("transform", "translate(" + m[3] + "," + m[0] + ")") // Parse numbers, and sort by value. data.forEach(function(d) { d.value = +d.value; }); data.sort(function(a, b) { return b.value - a.value; }); // Set the scale domain. x.domain([0, d3.max(data, function(d) { return d.value; })]); y.domain(data.map(function(d) { return d.name; })); var bar = svg.selectAll("g.bar") .data(data) .enter().append("g") .attr("class", "bar") .attr("transform", function(d) { return "translate(0," + y(d.name) + ")"; }); bar.append("rect") .attr("width", function(d) { return x(d.value); }) .attr("height", y.rangeBand()); bar.append("text") .attr("class", "value") .attr("x", function(d) { return x(d.value); }) .attr("y", y.rangeBand() / 2) .attr("dx", 50) .attr("dy", ".35em") .attr("text-anchor", "end") .text(function(d) { return format(d.value); }); svg.append("g") .attr("class", "x axis") .call(xAxis); svg.append("g") .attr("class", "y axis") .call(yAxis); &lt;/script&gt; i am appending this: var i = counter…
score: -3
linked to: http://stackoverflow.com/q/13544618
has comment: http://stackoverflow.com/comment/41421547
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26394887
has comment: http://stackoverflow.com/comment/41420688
has comment: http://stackoverflow.com/comment/41421131
type: Question
has comment: http://stackoverflow.com/comment/41420815
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41421059
tagged with: jquery
has comment: http://stackoverflow.com/comment/41420796
favorite count: 0
has comment: http://stackoverflow.com/comment/41420555

http://stackoverflow.com/q/26430866
answer count: 0
has title: How to get a URL from a jQuery Ajax
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41506528
tagged with: ajax
score: 0
favorite count: 0
linked to: http://stackoverflow.com/q/14220321
has body: I have this function, and every time I call it, I need the imagesUploadScript variable to be updated with a new URL. I've implemented in the server side a JSON response with the desired URL for each request, but I'm not able to get that JSON value with jQuery. $(function () { $('.editor').editorInsert({ editor: editor, addons: { images: { imagesUploadScript: /* The url*/ } }); }); I have tried this, but doesn't seem to work :S $.getJSON("/admin/upload_url",function(result){ return JSON.stringify(result) }) EDIT I have restructured my code, this way my function accepts a callbacks as @Mohamad suggested and thanks to this question: function getURL(callback) { var url; $.ajax({ type: "GET", async: false, url: "/admin/upload_url", dataType: "json", contentType: "application/json; charset=utf-8", success: function (data) { url = data['url']; callback(url); } //success }); } But I'm not able to return the url for imagesUploadScript but yes this way getURL(function(url){ console.log(url); }); I'm confused, how should I declare this function inside the other one so imagesUploadScript get's a new URL every time is called ? Thanks in advance for any help ! :D
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41506832

http://stackoverflow.com/a/26441601
has comment: http://stackoverflow.com/comment/41526297
accepted answer of: http://stackoverflow.com/q/26441462
has body: While most regex flavours have roughly a similar syntax for the basic features, there is not a clear standard as to the syntax of the replacement strings. Some tools use \1 for referencing strings, others use $1 and so on. As you use Notepad++, you should know it uses the boost library for its regex implementation, and it uses the Boost-Extended format string for the replacement pattern. In particular, the placeholder for the nth capture group is $n.
type: Answer
answers question: http://stackoverflow.com/q/26441462
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26485881
downvote count: 0
has comment: http://stackoverflow.com/comment/41606119
has comment: http://stackoverflow.com/comment/41606571
has comment: http://stackoverflow.com/comment/41606103
score: 9
has comment: http://stackoverflow.com/comment/41606181
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41606499
has comment: http://stackoverflow.com/comment/41606277
type: Answer
accepted answer of: http://stackoverflow.com/q/26485729
upvote count: 9
answers question: http://stackoverflow.com/q/26485729
has comment: http://stackoverflow.com/comment/41606512
has body: You can surely do it with javascript: var span = document.getElementById('phrase'), text = span.innerHTML.split('').map(function(el) { return '' + el + ''; }).join(''); span.innerHTML = text; .char-e { color: red; } Here are some words For convenience it wraps each character with a span with corresponding class name, which makes it easy to assign individual styles. Warning: However I would not recommend doing this with large texts because the code above replaces innerHTML it can break your HTML if it contains other nested elements. But for small titles with only text this is not going to be a problem. If you want to work with more complex HTML markup (with children elements) the function needs to be improved to work recursively on child items text content.

http://stackoverflow.com/a/26369247
score: 0
answers question: http://stackoverflow.com/q/26369075
has body: You should get familiar with javascript's Date objects. You can subtract one date object from another to find differences in time, and all kinds of other nifty things. It's definitely much cleaner, and less error-prone, than working with strings and integers.
type: Answer

http://stackoverflow.com/comment/41565286
has text: @SanjaySoni - glad to help you :). click on 'upvote' and 'correct' on answer which will help others to get the correct solution thanks
type: Comment
comment on: http://stackoverflow.com/a/26460284
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41548443
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26443845
type: Comment
has text: LOL, function calls are expensive! I never said 'short', Good code would be efficient by not needing to ask many questions and certainly not calling extra functions per iteration of an array

http://stackoverflow.com/comment/41562439
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26423872
has text: @New2Programming I'm only able to debug that code with IE11 and for this one, everything works fine for me. However. It may be good if you give each form an unique name and store your "policynum" into an input field or as a data-attribute directly to your textarea.
score: 0

http://stackoverflow.com/q/26395597
has body: I have a site I'm working on Modestewebstudio.com On the contact section of the site I have a form that I'm trying to submit using jQuery and pHp. For some reason the form does not submit. The validation works fine but whenever I hit submit nothing happens. $(document).ready(function () { $(window).load(function() { $("#load").fadeOut("slow"); }); var fadeInElement = function(id) { $('#' + id).fadeIn(); }; //HOME------------------------------------------------- $(".home").click(function () { $('#about, #works, #contact').filter(":visible").fadeOut(); fadeInElement('home'); }); //ABOUT------------------------------------------------ $(".about").click(function () { $('#home, #works, #contact').filter(":visible").fadeOut(); fadeInElement('about'); }); //WORKS------------------------------------------------ $(".works").click(function () { $('#home, #about, #contact').filter(":visible").fadeOut(); fadeInElement('works'); }); //CONTACT---------------------------------------------- $(".contact").click(function () { $('#home, #about, #works').filter(":visible").fadeOut(); fadeInElement('contact'); }); //><!-- $('form#contact-us').submit(function() { $('form#contact-us .error').remove(); var hasError = false; $('.requiredField').each(function() { if($.trim($(this).val()) == '') { var labelText = $(this).prev('label').text(); $(this).parent().append('Your '+labelText+' is missing.'); $(this).addClass('inputError'); hasError = true; } else if($(this).hasClass('email')) { var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; if(!emailReg.test($.trim($(this).val()))) { var labelText = $(this).prev('label').text(); $(this).parent().append('Your '+labelText+' is invalid.'); $(this).addClass('inputError'); hasError = true; } } }); if(!hasError) { var formInput = $(this).serialize(); $.post($(this).attr('action'),formInput, function(data){ $('form#contact-us').slideUp("fast", function() { $(this).before(' Your email has been delivered! '); }); }); } return false; }); //-->! //------…
tagged with: php
type: AnsweredQuestion
has title: JQuery/PHP form not Submiting
has answer: http://stackoverflow.com/a/26395652
tagged with: forms
type: Question
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26395652
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/26395107
has body: Your code is full of errors. This is what it looks like after correcting the errors. Demo on Fiddle (For some reason, the first six inputs are unclickable on the fiddle. So, to get the focus on those inputs, click on the left top corner of the Result window and press the Tab key.) HTML: Bernoulli's Energy Balance P1 + ρ*g*h1 + ρ*(V12⁄2) = P2 + ρ*g*h2 + ρ*(V22⁄2) + ρ*F P1: P2: h1: h2: V1: V2: ρ: F: g: JavaScript: function calculate() { var p1 = parseFloat(document.getElementById("p1").value, 10); var p2 = parseFloat(document.getElementById("p2").value, 10); var h1 = parseFloat(document.getElementById("h1").value, 10); var h2 = parseFloat(document.getElementById("h2").vaule, 10); var v1 = parseFloat(document.getElementById("v1").value, 10); var v2 = parseFloat(document.getElementById("v2").value, 10); var rho = parseFloat(document.getElementById("rho").value, 10); var F = parseFloat(document.getElementById("F").value, 10); var g = parseFloat(document.getElementById("g").value, 10); var Lside = p1 + (rho * g * h1) + (rho * ((v1 ^ 2) / 2)); var Rside = p2 + (rho * g * h2) + (rho * ((v2 ^ 2) / 2)) + (rho * F); var ans; if (!p1) { ans = Rside - (rho * ((v1 ^ 2) / 2)) - (rho * g * h1); document.getElementById("p1").value = Math.round(ans * 100) / 100; } else if (!h1) { ans = (Rside - (rho * ((v1 ^ 2) / 2)) - p1) / (rho * g); document.getElementById("h1").value = Math.round(ans * 100) / 100; } else if (!v1) { ans = (Rside - p1 - (rho * g * h1)) / rho; ans = ans * 2; ans = Math.sqrt(ans); document.getElementById("v1").value = Math.round(ans * 100) / 100; } else if (!p2) { ans = Lside - (rho * ((v2 ^ 2) / 2)) - (rho * g * h2) - (rho * F); document.getElementById("p2").value = Math.round(ans * 100) / 100; } else if (!h2) { ans = (Lside - (rho * ((v2 ^ 2) / 2)) - (rho * F) - p2) / (rho * g); document.getElementById('h2').value = Math.round(ans * 100) / 100; } } var btn = document.getElementById('btn'); btn.onclick = calculate; CSS: .container { text-align: center; } .data { wid…
answers question: http://stackoverflow.com/q/26394277
has comment: http://stackoverflow.com/comment/41442554
score: 0
type: Answer

http://stackoverflow.com/q/26447603
has answer: http://stackoverflow.com/a/26447638
favorite count: 0
answer count: 3
has body: I took this piece of code from another post. Number.prototype.countDecimals = function () { if(Math.floor(this.valueOf()) === this.valueOf()) return 0; return this.toString().split(".")[1].length || 0; } var x = 23.453453453; x.countDecimals(); //returns 9 as expected Basically, it returns the amount of decimal places in a given number. The problem is that I need to get that value from a number that is inside an input: console.log($('#myinput').val().countDecimals()); ...but that action returns: Uncaught TypeError: undefined is not a function How can I integrate the previous code to work with input values (with jQuery)? Thanks!
has answer: http://stackoverflow.com/a/26447665
upvote count: 3
possible better answer: http://stackoverflow.com/a/26447629
type: AnsweredQuestion
score: 3
tagged with: numbers
has answer: http://stackoverflow.com/a/26447629
accepted answer: http://stackoverflow.com/a/26447665
tagged with: prototype
has title: Number.prototype.function not working on result of jQuery(..).val()
type: Question
downvote count: 0
linked to: http://stackoverflow.com/q/17369098
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26357810
has body: You added a handler to form submit event that always prevents it. If #submit_b is an &lt;input&gt; with type="submit" located inside the form, you could do instead: $('#my_form').submit(function(e){ if (/*conditions are not met*/) { e.preventDefault(); return; //this will just abort } //additional operations or do nothing, which will submit the form });
type: Answer
answers question: http://stackoverflow.com/q/26357653
score: 0

http://stackoverflow.com/a/26441940
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26441836
answers question: http://stackoverflow.com/q/26441836
has body: Your code works perfectly fine, provided you include jQuery: http://jsfiddle.net/d65cdh2v/1/ But I assume you aren't using jQuery, judging by the rest of your code, so to do it with vanilla JavaScript: document.getElementById('result').innerHTML = x + " not a valid :)"; JSFiddle
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41527141
has comment: http://stackoverflow.com/comment/41527160
upvote count: 1

http://stackoverflow.com/q/26495900
accepted answer: http://stackoverflow.com/a/26496332
answer count: 1
tagged with: promise
tagged with: angularjs
tagged with: angular-promise
type: AnsweredQuestion
score: 0
type: Question
has body: I just have to write a promise, then, with the result of this promise, an array of movies, I have to loop inside the array and for each element do a remote call (with promise too) to decorate with additional data. I tried this way: var deferred = $q.defer(); var promises = []; angular.forEach(tree, function(node) { promises.push( APICall.GetMovieList(node).then(function(success){ var contents = {}; //simple data manipulation return contents; }) .then(function(contents){ /////////////////////// concatenation part that won't work angular.forEach(contents, function(content) { APICall.GetMovieDetails(content.ID).then(function(success){ content.metadata = success.metadata; }); }); return contents; }) ); }); $q.all(promises).then(ResolveFunction); return deferred.promise; For the sake of readability I deleted the ResolveFunction, it simply manage the promise array and do a $q.resolve(results). The thing is that without the concatenation it works like a charm, but with the necessary concatenation it does just return the same result as before, it behave like this due to async calls that will be called after... Is it a good idea to create another deferred and nest a $q.all inside the concatenation part and return the $q.all solved array promise? Thanks so much
tagged with: nested-loops
tagged with: javascript
has answer: http://stackoverflow.com/a/26496332
has comment: http://stackoverflow.com/comment/41625382
has title: loop of promises after a single promise

http://stackoverflow.com/q/26433522
tagged with: javascript
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Trouble getting CSS animation to work when AJAX call
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26434907
tagged with: animation
upvote count: 1
has body: So I am making a website and can make the CSS animation work for when the page is first called but I want it to call everytime the AJAX function is called. Here is the javascript XML call which works function XML(infoId) { var xmlHttp = xmlHttpObjCreate(); if (!xmlHttp) { alert("The browser doesn't support this action."); return; } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState == 4 &amp;&amp; xmlHttp.status == 200) { elemObj = document.getElementById('textbox'); elemObj.innerHTML = xmlHttp.responseText; elemObj.className = "bounceInUp"; } } // Append GET data to identify which quote we want var reqURL = "FILE_NAME_HERE_?infoId=" + infoId; xmlHttp.open("GET", reqURL, true); xmlHttp.send(); } Here is an example of what calls the function Here is the CSS animation code which is named is "bounceInUp" #textbox { width: 100%; background-color: transparent; height: 200px; color: #0000FF; font-weight: bold; font-size: 22px; overflow: auto; padding: 10; -webkit-animation: bounceInUp 1200ms ease-out; -moz-animation: bounceInUp 1200ms ease-out; -o-animation: bounceInUp 1200ms ease-out; animation: bounceInUp 1200ms ease-out; } @-webkit-keyframes bounceInUp { 0%, 60%, 75%, 90%, 100% { -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); } 0% { opacity: 0; -webkit-transform: translate3d(0, 3000px, 0); transform: translate3d(0, 3000px, 0); } 60% { opacity: 1; -webkit-transform: translate3d(0, -20px, 0); transform: translate3d(0, -20px, 0); } 75% { -webkit-transform: translate3d(0, 10px, 0); transform: translate3d(0, 10px, 0); } 90% { -webkit-transform: translate3d(0, -5px, 0); transform: translate3d(0, -5px, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @keyframes bounceInUp { 0%, 60%, 75%, 90%, 100% { -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); transition-timing-function: cubic-bezier(0.215, 0…
type: Question
score: 1
has answer: http://stackoverflow.com/a/26433720
answer count: 2
downvote count: 0

http://stackoverflow.com/a/26393060
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41439800
accepted answer of: http://stackoverflow.com/q/26392271
answers question: http://stackoverflow.com/q/26392271
upvote count: 2
has body: It's trying to read the property next_page of YAHOO.buttonObjects. Therefore YAHOO.buttonObjects is undefined. In other words, whatever YAHOO is, it no longer has an element called buttonObjects. Is YAHOO an external library? If so, check whether they've removed the buttonObjects functionality.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41448488

http://stackoverflow.com/a/26462045
has comment: http://stackoverflow.com/comment/70004115
type: Answer
score: 1
has body: use ng-class in CSS .class-name{ color:green; }
upvote count: 1
answers question: http://stackoverflow.com/q/26461948
downvote count: 0

http://stackoverflow.com/comment/41431202
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26388154
has text: I don't know how to interpret this restriction: "don't use the digits used for the five 4-digit-lenght strings for the 2-digit-lenght strings.".
type: AnswerComment

http://stackoverflow.com/q/26419058
has comment: http://stackoverflow.com/comment/41484832
accepted answer: http://stackoverflow.com/a/26419101
downvote count: 0
has answer: http://stackoverflow.com/a/26419212
score: 1
has title: Getting the value of a hidden field in using jquery
has answer: http://stackoverflow.com/a/26419095
favorite count: 0
has comment: http://stackoverflow.com/comment/41485428
has comment: http://stackoverflow.com/comment/41487551
linked to: http://stackoverflow.com/q/15044558
has answer: http://stackoverflow.com/a/26419127
type: Question
has comment: http://stackoverflow.com/comment/41485517
has comment: http://stackoverflow.com/comment/41484795
tagged with: css
answer count: 6
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/26419126
has answer: http://stackoverflow.com/a/26423224
upvote count: 1
has comment: http://stackoverflow.com/comment/41484711
has body: I have a table data which is generated dynamically via a loop. The td contains a hidden field. below is the code for the same: &lt;td class="gridtd" id = "r&lt;%=RowNumber%&gt;c&lt;%=ColumnNumber%&gt;"&gt; &lt;input id="hiddendata" type="hidden" value="&lt;%: item.Key%&gt;"/&gt; &lt;/td&gt; I need to extract the value of the hidden field based on the td selected using jQuery. Please help me get the correct jquery code.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26419101
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26419095
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41531488
type: AnswerComment
has text: Thank you for your help, yet I couldn't get how to use the code. By the way, the function hangul_to_roman is actually already defined inside <?php include("js/roman.js"); ?>
type: Comment
comment on: http://stackoverflow.com/a/26444100
score: 0

http://stackoverflow.com/q/26447447
score: -3
tagged with: range
tagged with: regex
has title: JS regex to check a string is number of char long, between a min and max limit, not counting spaces
has comment: http://stackoverflow.com/comment/41537113
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26447478
has answer: http://stackoverflow.com/a/27067688
has answer: http://stackoverflow.com/a/26447496
accepted answer: http://stackoverflow.com/a/26447496
has comment: http://stackoverflow.com/comment/41537939
type: Question
tagged with: javascript
downvote count: 5
has comment: http://stackoverflow.com/comment/41537100
possible better answer: http://stackoverflow.com/a/26447478
answer count: 3
has body: Update - The Use-Case: this is for a custom "pattern"-like attribute on a Custom Element. The custom attribute/accessor takes any regex - I've already coded this part. I need this particular regex for my own use, and given I only have an attribute value (a string) to work with, and it's expecting a regex, I must have the regex perform all required functions. Update 2: look folks, if you can think of a way to not use a regex with an attribute (validate="") that requires a regex string, then good luck. That's my constraint, it's what I'm dealing with. It's a valid question, and having drive-by downvoters doesn't change that, or help. Grow up, seriously. Basically, I need a regex that checks a string for a length that fits a provided min and max range, without counting any spaces in the string. For example: var foo = ' a 1 b 2 - _ '; In the variable foo above, there are 6 non-space characters, which given their total count would fit a range of 3-6, 5-7, 6-10, etc. I need a way of tallying all those non-space chars and checking they fit in a range. Note: I cannot accept answers that say "First, remove spaces from the string with replace()", or anything like that - it must be all done in the regex.
favorite count: 0
upvote count: 2

http://stackoverflow.com/q/26485648
tagged with: angularjs
type: UnansweredQuestion
type: Question
tagged with: protractor
has answer: http://stackoverflow.com/a/26485995
score: 0
has title: How do you use protractor.js in the context of Angulars documentation?
has body: I'm reading the documentation for Angular, and there is usually a file called protractor.js included with each code sample. For example, this page of documentation - among many. A Google search revealed that protractor is a way of testing Angular code. But I can't find any guides about how to use this file - especially in the context of the Angular tutorial. Is there any way to see the protractor.js file within the online plunkr environment, or anything like that?
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41461621
type: Comment
comment on: http://stackoverflow.com/a/26405919
score: 0
type: AnswerComment
has text: @MrPk Iv not done anything . I literally copied the code from the js fiddle . I can drag and drop , but if there is more than one place a box can go , it will cause the box to stay green even after the item has been droped on another.

http://stackoverflow.com/q/26401932
has comment: http://stackoverflow.com/comment/41453600
has comment: http://stackoverflow.com/comment/41453412
type: Question
has title: form not sending data in ajax.serialize when form contents are updated via javascript
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has body: I am facing problem when using javscript to update inner html of form. I want to dynamically add input type with same name in form and then send this form data via jquery ajax serialize. Eg. function addinput() { //update form html to add following } function initiate() { document.myform.action="initiateMultipleReceiptReceiptAction.action?next=0"; var formdata=$('form[name$="myform"]').serialize(); } Click to add more now the problem is that formdata is not showing $addtext value
has comment: http://stackoverflow.com/comment/41456758
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41457619
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41454392
answer count: 0

http://stackoverflow.com/a/26436358
score: 0
has comment: http://stackoverflow.com/comment/41526336
answers question: http://stackoverflow.com/q/26433666
type: Answer
has body: Taking @dsfq's answer even further -- Turns out you can nest promises in a flattened way that makes the code more elegant. This trick inspired by https://parse.com/docs/js_guide#promises-series -- please tell me if this is documented for native js promises anywhere! (code is live at http://jsfiddle.net/q306nzk2/6/ ) function getInput() { return new Promise(function (resolve, reject) { var $form = $("form.prompt").one('submit', function (event) { var input = $form.find("input").val(); event.preventDefault(); resolve(input); }); }); }; // start by making essentially a "blank", resolved promise: var prm = Promise.resolve(); // next, append a function to perform, which returns a promise; // this will cause prm to effectively "block" until the promise // getInput returns is resolved prm = prm.then(function() { return getInput().then(function(response) { alert("input resolved; response is " + response); }); }); // do it again -- this function won't execute until the previous promise resolves! prm = prm.then(function() { return getInput().then(function(response) { alert("input resolved again; response is " + response); }); });
has comment: http://stackoverflow.com/comment/41526301
has comment: http://stackoverflow.com/comment/41527117
has comment: http://stackoverflow.com/comment/41518506

http://stackoverflow.com/q/26494826
accepted answer: http://stackoverflow.com/a/26495461
favorite count: 0
tagged with: angularjs
tagged with: phantomjs
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has title: Testing AngularJS with Phantomjs
tagged with: javascript
has body: I am trying to test the AngularJS tutorial (http://angular.github.io/angular-phonecat/step-7/app) with PhantomJS. I cannot get typing in a search to actually run. Here is what I am at so far: var page = new WebPage(); page.open('http://angular.github.io/angular-phonecat/step-7/app', function() { page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { page.evaluate(function() { $("[ng-model=query]").click(); $("[ng-model=query]").focus(); $("[ng-model=query]").val("xoom"); console.log($('ul.phones').text()); }); phantom.exit() }); });
has answer: http://stackoverflow.com/a/26495461
downvote count: 0
answer count: 1

http://stackoverflow.com/q/26391829
has comment: http://stackoverflow.com/comment/41436742
upvote count: 3
tagged with: debugging
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41436767
has title: Restangular is slow to ask API for data
score: 3
answer count: 0
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41437730
tagged with: angularjs
type: Question
has body: I'm quite new to both javascript and AngularJS, and am trying to figure out how to debug a speed issue I have: I have a data service defined in my AngularJS app, that calls a JSON RESTful API for the data to populate a &lt;select&gt; in a UI-Router view. When the page loaded for the first time, which I simulate by turning off caching in Chrome and doing a shift-F5 to reload the page, the &lt;select&gt;'s list of options takes between 8-15 seconds to populate. (Subsequent loads with caching turned on do not get the delays) Looking at logs, the delay is between getting the html template for the partial for the ui-view and hitting the API, so it's not that the API is slow (it's on localhost and the test data set is only four records), it's that there's a huge delay between loading the partial and initiating the API call. I have no errors in the javascript console, nor in any of the server logs. How can I track down where the delay is coming from? The Chrome developer tools' network tab show that the vast majority of the time for the XHR retrieval is in the 'waiting' state. Are there other tools I can use to debug this?
tagged with: restangular

http://stackoverflow.com/a/26396627
answers question: http://stackoverflow.com/q/26396559
has body: Try this : find the first td containing 'Total' (remove single quotes) and append to tfoot var $cur_table = $("#wrap_table"); var $total_row = $cur_table.find("td:contains(Total):first").closest('tr'); $total_row.appendTo($cur_table.find("tfoot"));
type: Answer
score: 0

http://stackoverflow.com/a/26467877
has comment: http://stackoverflow.com/comment/41573818
answers question: http://stackoverflow.com/q/26467805
downvote count: 0
has comment: http://stackoverflow.com/comment/41573579
has comment: http://stackoverflow.com/comment/41573631
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41573426
has comment: http://stackoverflow.com/comment/41573389
has body: Surround your word regexp with brackets to make it a capture group that will be recognized by the replacement string as $1: /#([\w\dğüşçöı]+)/gi
has comment: http://stackoverflow.com/comment/41573993
upvote count: 1
has comment: http://stackoverflow.com/comment/41573547

http://stackoverflow.com/comment/68708910
has text: Stealing a hash is not as bad as stealing passwords. Sure they can pretend to be an authenticated user on your application, but users can be non-security conscious and just might be re-using passwords on other sites.
type: Comment
comment on: http://stackoverflow.com/a/26432650
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41401127
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26372164
has text: mmmmm sound interesting... let me check

http://stackoverflow.com/q/26362792
answer count: 2
possible better answer: http://stackoverflow.com/a/26362912
has answer: http://stackoverflow.com/a/26362912
has title: Javascript function only receive integers
tagged with: php
type: AnsweredQuestion
has body: I call for a java script function and send 4 parameters with it, it only works if there are only integers send for the 4th parameter. Here is my onchange function: onchange="weekchange(this, &lt;?php echo $i ?&gt;,&lt;?php echo $teller ?&gt;,&lt;?php echo $project[$i] ?&gt;)" When I call this function I send 4 parameters with it: this, $i, $teller and $project[$i]. When $project[$i] is only integers my java script function will accept it. This variable is the name of a project, this name can have numbers, letters and characters like !@#$%^&amp; in it. When I have a project name that has a character that has a letter or characters like !@#$%^&amp; in it, it doesn't do anything. Also when I only have integers and it starts with a 0 i get very weird results. 01234 ends up being 668? My java script function: function weekchange(selected, weekkeuze, aantalprojecten, projectnaam) { var samen; var week; var id; var projecten = String(projectnaam); alert(selected.value); week = selected.value; id = weekkeuze; samen = "id="+id+"&amp;week="+week+"&amp;projectnaam="+projecten; var test = document.getElementById(id) test = test+1; submit_javascript("GET","capaciteitberekening.php?"+samen+"&amp;dag="+0,id+"ma","true"); submit_javascript("GET","capaciteitberekening.php?"+samen+"&amp;dag="+1,id+"di","true"); submit_javascript("GET","capaciteitberekening.php?"+samen+"&amp;dag="+2,id+"wo","true"); submit_javascript("GET","capaciteitberekening.php?"+samen+"&amp;dag="+3,id+"do","true"); submit_javascript("GET","capaciteitberekening.php?"+samen+"&amp;dag="+4,id+"vr","true"); } How is this happening?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26362930
accepted answer: http://stackoverflow.com/a/26362930
score: 0

http://stackoverflow.com/a/26392451
has comment: http://stackoverflow.com/comment/41437749
type: Answer
answers question: http://stackoverflow.com/q/26392411
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41437762
upvote count: 2
has body: Strings in JavaScript have a match method - you can use this to match all instances of a regular expression, returned as an array: stringTest.match(curly); This will return an array of matches: &gt; ["{test}", "{pattern}"] To pull the inner values, you can use substr: var arr = stringTest.match(curly); arr[0] = arr[0].substr(1, arr[0].length - 2); &gt; "test" Or to convert the entire array: for (var i = 0; i &lt; arr.length; i++) arr[i] = arr[i].substr(1, arr[i].length - 2); &gt; ["test", "pattern"]

http://stackoverflow.com/q/26511064
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41656180
linked to: http://stackoverflow.com/q/19369558
linked to: http://stackoverflow.com/q/717019
has comment: http://stackoverflow.com/comment/41655253
has comment: http://stackoverflow.com/comment/41652205
duplicate of: http://stackoverflow.com/q/717019
answer count: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
score: 0
tagged with: google-maps
tagged with: jquery
favorite count: 0
has title: Google map showing only states of USA and shows only cities of corresponding state when clicked along with zoom
has comment: http://stackoverflow.com/comment/41652277
has body: Peace be upon you all I have a simple question. I want to embed a Google map in my website in which it only shows USA map without allowing users to zoom out from USA map to somewhere else. Most importantly i want it to show only names of states with default view and display only corresponding names of cities by zooming when clicking on particular state not anything else. So is there a way to do that or i have to look for some other services?? Any idea, suggestion or help will be appreciated. &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"&gt;&lt;/script&gt; &lt;script&gt; function initialize() { var myLatlng = new google.maps.LatLng(39.574912, -102.344687); var mapOptions = { zoom: 4, maxZoom: 7, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; &lt;div id="map-canvas"&gt;&lt;/div&gt;

http://stackoverflow.com/a/26362092
downvote count: 2
type: Answer
upvote count: 0
score: -2
has body: * you start jquery click function* $("input[type=text]").click(function() { $(this).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true }); }); OR $("#EFFECTIVE_DATE1").click(function() { $(this).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true }); });
answers question: http://stackoverflow.com/q/26361876

http://stackoverflow.com/comment/41536053
has text: My advice: Leave your pagination details in the URL. Don't hide them. When people traverse through their history or bookmark something and you've gone out of your way to mangle the URL, you erase this important information. If you wanted clean URLs you wouldn't have `.php` in the URL in the first place, so until that's gone the rest is irrelevant. If you need to restrict functionality, your server-side code should take care of that. Hiding the URL parameters does nothing.
score: 0
comment on: http://stackoverflow.com/q/26446552
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26448812
score: 0
has comment: http://stackoverflow.com/comment/41539779
has comment: http://stackoverflow.com/comment/41539762
answer count: 0
has title: Reload a particular domain's Tabs in Browser?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4079280
tagged with: vb.net
tagged with: c#
has comment: http://stackoverflow.com/comment/41539896
has comment: http://stackoverflow.com/comment/41539728
type: Question
has comment: http://stackoverflow.com/comment/41539761
has body: I have an ASP.NET Web application and different pages are opened in multiple tabs of same browser. Now, if user logs through a new tab in the same browser, I want to refresh all the tabs of that particular domain/website, which are already opened in different tabs of same browser. How can I achieve this? Thanks..!!
tagged with: javascript
tagged with: jquery
tagged with: asp.net

http://stackoverflow.com/q/26405877
has body: I've got a problem. I have this window confirm: {{school.name}} But whether i click on Ok, or on Cancel, it will still proc the link in the href attribute and redirect to this action.
has title: Window confirm redirects even on cancel
type: Question
has answer: http://stackoverflow.com/a/26405926
tagged with: javascript
tagged with: jquery
score: 0
tagged with: symfony
answer count: 1
type: UnansweredQuestion
tagged with: twig

http://stackoverflow.com/q/26390382
has comment: http://stackoverflow.com/comment/41434012
tagged with: javascript
has title: jQuery file conflict
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41434353
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am making a test website for a future project and I am having jQuery issues. It is a static HTML5 website with a social widget, when I remove one of the jQuery lines, the site loses its styling and the widget looks pretty. When I add that jQuery I removed, the site will look good, but the widget will look really bad. How can I fix this conflict issue? I will add the code to the main website on here: &lt;!DOCTYPE HTML&gt; &lt;html&gt;&lt;head&gt; &lt;title&gt;test site&lt;/title&gt; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt; &lt;meta name="description" content="" /&gt; &lt;meta name="keywords" content="" /&gt; &lt;!--[if lte IE 8]&gt;&lt;script src="css/ie/html5shiv.js"&gt;&lt;/script&gt;&lt;![endif]--&gt; &lt;script src="js/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="js/jquery.dropotron.min.js"&gt;&lt;/script&gt; &lt;script src="js/skel.min.js"&gt;&lt;/script&gt; &lt;script src="js/skel-layers.min.js"&gt;&lt;/script&gt; &lt;script src="js/init.js"&gt;&lt;/script&gt; &lt;noscript&gt; &lt;link rel="stylesheet" href="css/skel.css" /&gt; &lt;link rel="stylesheet" href="css/style.css" /&gt; &lt;/noscript&gt; &lt;!--[if lte IE 8]&gt;&lt;link rel="stylesheet" href="css/ie/v8.css" /&gt;&lt;![endif]--&gt; &lt;!-- Social Widget Goodies Start --&gt; &lt;link rel="stylesheet" type="text/css" href="css/dcsmt.css" media="all" /&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="inc/js/jquery.plugins.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="inc/js/jquery.site.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.social.media.tabs.1.7.1.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; jQuery(document).ready(function($){ $('#social-tabs').dcSocialTabs({ widgets: 'twitter,facebook', twitterId: '20782546', facebookId: '69431101263', fblikeId: '69431101263', fbrecId: 'https://www.f…
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26390418
type: Question

http://stackoverflow.com/q/26402047
type: Question
upvote count: 4
tagged with: javascript
has title: How do languages whose variables don't have sigils deal with dynamic dispatch/invocation?
has answer: http://stackoverflow.com/a/26591717
has answer: http://stackoverflow.com/a/26531529
has body: Dynamic languages allow dispatching with and invoking on values from variables whose values are only known at run-time. Contrasting examples in Perl: class names constant Foo::Bar-&gt;some_method Foo::Bar::-&gt;some_method 'Foo::Bar'-&gt;some_method These are all identical, except the first one is an edge case. If there's a subroutine defined in scope with that name, the dispatch happens on its return value, which leads to difficult to understand bugs. The quoted versions are always safe. dynamic my $class_name = 'Foo::Bar'; $class_name-&gt;some_method method names constant Some::Class-&gt;foo_bar dynamic my $method_name = 'foo_bar'; Some::Class-&gt;$method_name function names constant foo_bar; (\&amp;foo_bar)-&gt;() dynamic my $function_name = 'foo_bar'; (\&amp;$function_name)-&gt;() I wonder, how do languages whose variable names have no sigils (normally, or at all) deal with these problems, specifically how did their language designers disambiguate the following? resolving class name FooBar.some_method where class FooBar might be name literal or a variable whose value is a class name dispatching to SomeClass.foo_bar where method foo_bar might be name literal or a variable whose value is a method name invoking foo_bar where the function might be a name literal or a variable whose value is a function I'm primarily interested in the three languages mentioned in this question's tags, but if you know a different dynamic language with no sigils, you can answer too.
has answer: http://stackoverflow.com/a/26515833
favorite count: 0
tagged with: ruby
answer count: 5
type: UnansweredQuestion
downvote count: 2
tagged with: python
score: 2
tagged with: dynamic-languages
has comment: http://stackoverflow.com/comment/41661055
tagged with: sigils
has answer: http://stackoverflow.com/a/26402516
has answer: http://stackoverflow.com/a/26403697

http://stackoverflow.com/comment/41439985
type: Comment
comment on: http://stackoverflow.com/a/26393719
has text: Well the form won't post if the click function is not attached to the correct element.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41636690
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26459762
has text: Thank you for your help I'm using the first option https://github.com/niutech/showModalDialog but the problem is that arguments of the function are lost after using the open.showModal Dialog. I mean if i want to set the return value in textbox by document.getElementById(one_of_the_function_arguments) it's not working because this argument is lost in google chrome only!!! Do you have any idea why?? Thanks again
type: Comment

http://stackoverflow.com/a/26404468
has body: There does not appear to be a way of doing this easily, so I created a .Net DLL to do that job for me.
answers question: http://stackoverflow.com/q/26358211
score: 0
type: Answer

http://stackoverflow.com/q/26493665
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41621140
tagged with: http://stackoverflow.com/tag/html
tagged with: user-input
has title: Javascript search and display divs with matching keywords
has comment: http://stackoverflow.com/comment/41621113
has comment: http://stackoverflow.com/comment/41621187
has comment: http://stackoverflow.com/comment/41621150
upvote count: 7
has answer: http://stackoverflow.com/a/26494293
has comment: http://stackoverflow.com/comment/41621037
type: AnsweredQuestion
tagged with: displayobject
has body: What I'm looking for: I'm working on creating an easy way for a user to search a list of people, and for results to instantly display below the search field. The results MUST display "close" results, rather than exact. For example: User searches for "Mr. Smith" and The following existing result is displayed: "John Smith" (since there is no "Mr. Smith" entry, it displayed one with the keyword "smith") What I have: I have a working code that lets the user enter some characters and all divs that include a string matching the input is displayed (see in jsfiddle: http://jsfiddle.net/891nvajb/5/ Code is also below) Unfortunately, this only displays results that match EXACTLY. Andy Daulton Owner Nissan Doug Guy Bug Collector Sam Hilton Famous Celebrity in Hollywood Don Grey Old man Amy Hinterly Cook Gary Doll Racecar Driver Tod Akers Football Player Greg Barkley Interior designer Alen Simmons 8th place winner
score: 7
tagged with: search
possible better answer: http://stackoverflow.com/a/26494414
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26494414
accepted answer: http://stackoverflow.com/a/26494293
downvote count: 0

http://stackoverflow.com/a/26504344
has comment: http://stackoverflow.com/comment/89583457
has comment: http://stackoverflow.com/comment/41640490
has comment: http://stackoverflow.com/comment/41640254
accepted answer of: http://stackoverflow.com/q/26503746
has comment: http://stackoverflow.com/comment/41641019
upvote count: 1
answers question: http://stackoverflow.com/q/26503746
has comment: http://stackoverflow.com/comment/51749943
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/89583519
has body: The mousedown event doesn't fire on disabled input or select elements, or any mouse event on disabled elements. Here is your example and it adds both the input and select element, try clicking on them, it will not fire an alert. I have made the div with background color red so you can see where it is, so if you click only on the red part it will fire. So your statement that the mousedown event is fired on disabled input field, but not on disabled select is false :) var buttonClick = function() { var editor = $("#test"); var div = $(" ") .mousedown(function() { alert("!!!"); }) .appendTo(editor); var textinput = $(" ") .attr("type", "text") .attr("disabled", "disabled") .appendTo(div); var selecttest = $(" ") .attr("disabled", "disabled") .appendTo(div); $(" ").attr("value", '').appendTo(selecttest); }; select { width: 200px; } button { width: 70px; height: 21px; } #test div { background: red; } Click
has comment: http://stackoverflow.com/comment/41640721
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41535592
has text: Very nice answer. I like how you did it without evaluate. When you say checks to see if it is loaded, does that mean it checks to see if it was loaded without errors? I just need to make sure the image was loaded properly.
type: Comment
comment on: http://stackoverflow.com/a/26435399
score: 0
type: AnswerComment

http://stackoverflow.com/a/26403621
accepted answer of: http://stackoverflow.com/q/26401774
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: DEMO $(document).ready(function(){ $("#second_line_accordian_banner_one").click(function(){ $("#second_line_accordian_area_two").animate({width:"0px"}, "fast"), $("#second_line_accordian_area_three").animate({width:"0px"}, "fast"), $("#second_line_accordian_area_two").css( {'display':'none'}), $("#second_line_accordian_area_three").css( {'display':'none'}), $("#second_line_accordian_area_one").css( {'display':'block'}), $("#second_line_accordian_area_one").animate({width:"300px"}, "slow"); }), $("#second_line_accordian_banner_two").click(function(){ $("#second_line_accordian_area_one").animate({width:"0px"}, "fast"), $("#second_line_accordian_area_three").animate({width:"0px"}, "fast"), $("#second_line_accordian_area_one").css({ 'display':'none'}), $("#second_line_accordian_area_three").css( {'display':'none'}), $("#second_line_accordian_area_two").css( {'display':'block'}), $("#second_line_accordian_area_two").animate({ width:"300px"},600); }), $("#second_line_accordian_banner_three").click(function(){ $("#second_line_accordian_area_two").animate({width:"0px"}, "fast"), $("#second_line_accordian_area_one").animate({width:"0px"}, "fast"), $("#second_line_accordian_area_one").css( {'display':'none'}), $("#second_line_accordian_area_two").css( {'display':'none'}), $("#second_line_accordian_area_three").css( {'display':'block'}), $("#second_line_accordian_area_three").animate({ width:"300px"},600); }); });
answers question: http://stackoverflow.com/q/26401774

http://stackoverflow.com/q/26356804
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41372442
has comment: http://stackoverflow.com/comment/41385068
linked to: http://stackoverflow.com/q/23323929
has body: I am using JQuery Validate and CKEditor and I am trying to get the CKEditor to validate code. It is not working. The validate works on all my other form components. How do I get it working for my CKEditor My CKEditor is iniitialised like this CKEDITOR.replace('description', { toolbar: [ { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', '-', 'RemoveFormat' ] }, { name: 'list', items: [ 'NumberedList', 'BulletedList' ] } ] }); My validator uses data-rule-required on the CKEditor but it does not validate it. Here is my JQuery valadation code. if (jQuery().validate) { var removeSuccessClass = function(e) { $(e).closest('.form-group').removeClass('has-success'); } jQuery.validator.setDefaults({ errorElement: 'span', //default input error message container errorClass: 'help-block', // default input error message class errorPlacement: function(error, element) { if(element.parent('.chosen').length){ error.insertAfter(element.parent()); } if(element.parent('.input-group').length) { error.insertAfter(element.parent()); } else if(element.parent('.checkbox').length){ error.insertBefore(element.parent('.checkbox')); } else { error.insertAfter(element); } }, focusInvalid: false, // do not focus the last invalid input ignore: ':hidden:not(.chosen)', // need line to validate chosen items that are shown. rules: { 'send_email[]': { required: true, minlength: 1 } }, messages: { 'send_email[]': { required: 'Must select at least one address', minlength: 'Must select at least one address' } }, invalidHandler: function (event, validator) { //display error alert on form submit var el = $(validator.errorList[0].element); if ($(el).hasClass('chosen')) { $(el).trigger('chosen:activate'); } else { $(el).focus(); } }, highlight: function (element) { // hightlight error inputs $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group }, unhighlight: function (element) { // revert the change dony by hightlight $(elemen…
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41372547
has comment: http://stackoverflow.com/comment/41451172
has comment: http://stackoverflow.com/comment/41384225
type: Question
has title: JQuery validate with CKEditor
duplicate of: http://stackoverflow.com/q/23323929
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/41379817
score: 0

http://stackoverflow.com/a/26477502
answers question: http://stackoverflow.com/q/26477322
score: 1
has comment: http://stackoverflow.com/comment/41592557
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41592737
has body: Try var callbacks = $.Callbacks("once") , dropMarker = function() { // do stuff }; callbacks.add(dropMarker); $(window).scroll(function () { if ($(window).scrollTop() >= $(document).height() - $(window).height() - 300 && $(window).scrollTop() <= $(document).height() - $(window).height() - 200 ) { var dropOnlyOnce = (function(){ dropped = false; if (dropped == false) { callbacks.fire() // call `dropMarker` "once" } dropped = true; })(); } }); See jQuery.Callbacks at "Possible Flags" -> "once" var callbacks = $.Callbacks("once") , dropMarker = function() { console.log(123) }; callbacks.add(dropMarker); $(window).scroll(function () { if ($(window).scrollTop() >= $(document).height() - $(window).height() - 300 && $(window).scrollTop() <= $(document).height() - $(window).height() - 200 ) { var dropOnlyOnce = (function(){ dropped = false; if (dropped == false) { // dropMarker(); // this is the function I'm calling callbacks.fire() } dropped = true; })(); } }); div { height : 500px; } abc
upvote count: 1

http://stackoverflow.com/q/26381721
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: xmlhttprequest
has title: XHR Post Response 200 but Failed to Execute Send
upvote count: 1
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has body: I am having an issue with a post to an Api. The Api is using OAuth, I am generating all the valid information and posting it to the request_token url. In Chrome Network tab I get a response 200 with the correct token in response, but in the console I get an error and cannot get the response data. NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://www.obsidianportal.com/oauth/request_token'. If I set it to Async then it fails outright with a POST (cancelled) xhr.open("POST", "https://www.obsidianportal.com/oauth/request_token", false); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); //xhr.responseType = "text/html"; //xhr.responseType = "text"; xhr.addEventListener("error", function() { console.log(xhr, arguments); }, false); xhr.send(postData); PostData is the generated OAuth information which is only valid once, so it is hard to debug. Any help on this issue would be great.

http://stackoverflow.com/comment/41559629
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26460025
has text: You can try with a `[WebMethod]` inside `UpdateData.cs` and then it should look something like this `sUpdateURL: "UpdateData.cs\MyUpdateMethod"`. I personally am using `.ashx` file as http handle, where I can use the `HttpContext`. Don't know which one is better, but `.ashx` serves me well even though it has some mahor disadvantages.

http://stackoverflow.com/a/26388047
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26387926
has body: Use this in your code where u write document.write document.write(fib[i]+', ');

regex
tags question: http://stackoverflow.com/q/26445157
tags question: http://stackoverflow.com/q/26428276
tags question: http://stackoverflow.com/q/26453939
tags question: http://stackoverflow.com/q/26495958
tags question: http://stackoverflow.com/q/26374494
tags question: http://stackoverflow.com/q/26388648
tags question: http://stackoverflow.com/q/26487078
tags question: http://stackoverflow.com/q/26441210
tags question: http://stackoverflow.com/q/26459838
tags question: http://stackoverflow.com/q/26422628
tags question: http://stackoverflow.com/q/26436414
tags question: http://stackoverflow.com/q/26448873
tags question: http://stackoverflow.com/q/26423373
tag name: regex
tags question: http://stackoverflow.com/q/26413154
tags question: http://stackoverflow.com/q/26439658
tags question: http://stackoverflow.com/q/26369069
tags question: http://stackoverflow.com/q/26389545
tags question: http://stackoverflow.com/q/26438202
tags question: http://stackoverflow.com/q/26488211
tags question: http://stackoverflow.com/q/26488683
tags question: http://stackoverflow.com/q/26395932
tags question: http://stackoverflow.com/q/26440089
tags question: http://stackoverflow.com/q/26380557
tags question: http://stackoverflow.com/q/26418580
tags question: http://stackoverflow.com/q/26502982
tags question: http://stackoverflow.com/q/26356782
tags question: http://stackoverflow.com/q/26471706
tags question: http://stackoverflow.com/q/26412880
tags question: http://stackoverflow.com/q/26392411
tags question: http://stackoverflow.com/q/26436857
tags question: http://stackoverflow.com/q/26357138
tags question: http://stackoverflow.com/q/26509118
tags question: http://stackoverflow.com/q/26471842
tags question: http://stackoverflow.com/q/26437771
tags question: http://stackoverflow.com/q/26484332
tags question: http://stackoverflow.com/q/26391386
tags question: http://stackoverflow.com/q/26496072
tags question: http://stackoverflow.com/q/26360842
tags question: http://stackoverflow.com/q/26447447
tags question: http://stackoverflow.com/q/26409429
tags question: http://stackoverflow.com/q/26441462
tags question: http://stackoverflow.com/q/26500713
tags question: http://stackoverflow.com/q/26428617
tags question: http://stackoverflow.com/q/26400336
tags question: http://stackoverflow.com/q/26369085
tags question: http://stackoverflow.com/q/26433624
tags question: http://stackoverflow.com/q/26434559
tags question: http://stackoverflow.com/q/26426158
tags question: http://stackoverflow.com/q/26415503
tags question: http://stackoverflow.com/q/26449098
tags question: http://stackoverflow.com/q/26490380
tags question: http://stackoverflow.com/q/26476098
tags question: http://stackoverflow.com/q/26462061
tags question: http://stackoverflow.com/q/26453329
tags question: http://stackoverflow.com/q/26415011
tags question: http://stackoverflow.com/q/26431958
tags question: http://stackoverflow.com/q/26425850
tags question: http://stackoverflow.com/q/26449314
tags question: http://stackoverflow.com/q/26470016
tags question: http://stackoverflow.com/q/26429314
tags question: http://stackoverflow.com/q/26397714
tags question: http://stackoverflow.com/q/26495217
tags question: http://stackoverflow.com/q/26416593
tags question: http://stackoverflow.com/q/26357989
tags question: http://stackoverflow.com/q/26431883
tags question: http://stackoverflow.com/q/26441093
tags question: http://stackoverflow.com/q/26453390
tags question: http://stackoverflow.com/q/26407015
tags question: http://stackoverflow.com/q/26467805
tags question: http://stackoverflow.com/q/26493906
tags question: http://stackoverflow.com/q/26499712
tags question: http://stackoverflow.com/q/26486064
tags question: http://stackoverflow.com/q/26361774
tags question: http://stackoverflow.com/q/26410430
tags question: http://stackoverflow.com/q/26420054
tags question: http://stackoverflow.com/q/26361505
tags question: http://stackoverflow.com/q/26435869
tags question: http://stackoverflow.com/q/26377842
tags question: http://stackoverflow.com/q/26412281

http://stackoverflow.com/comment/41621119
type: Comment
has text: @CayceK Well you can also show two `br` if you want: `bt + br + br` will leave two `br` and hide subsequent.
type: AnswerComment
comment on: http://stackoverflow.com/a/26490145
score: 0

charts
tags question: http://stackoverflow.com/q/26486850
tags question: http://stackoverflow.com/q/26498717
tags question: http://stackoverflow.com/q/26421469
tags question: http://stackoverflow.com/q/26379159
tags question: http://stackoverflow.com/q/26466989
tags question: http://stackoverflow.com/q/26461725
tags question: http://stackoverflow.com/q/26470147
tags question: http://stackoverflow.com/q/26391372
tags question: http://stackoverflow.com/q/26408027
tags question: http://stackoverflow.com/q/26405072
tags question: http://stackoverflow.com/q/26364646
tags question: http://stackoverflow.com/q/26438999
type: Tag
tags question: http://stackoverflow.com/q/26409298
tags question: http://stackoverflow.com/q/26382899
tags question: http://stackoverflow.com/q/26366387
tags question: http://stackoverflow.com/q/26449431
tag name: charts
tags question: http://stackoverflow.com/q/26503407
tags question: http://stackoverflow.com/q/26460919
tags question: http://stackoverflow.com/q/26512326

http://stackoverflow.com/q/26385840
type: Question
has answer: http://stackoverflow.com/a/26385878
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26386059
answer count: 3
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26386059
tagged with: regex
has title: Javascript regex for number check and maximum length of 3 and does not start with 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/75925399
accepted answer: http://stackoverflow.com/a/26385878
downvote count: 0
score: 1
has body: Currently I am trying to find a regular expression, that does the following 1) checks number 2) Allows max length of 3 3) Does not start with 0 I have the following regex which works fine ^[0-9]{1,3}$ Above regular expression allows only numbers that have maximum 3 digits but I am not sure how to prevent 0 in the beginning. code var numericRegex = new RegExp("^[1-9][0-9]{0,2}$"); numericRegex.test(123) //false Let me know what I am missing Thanks

http://stackoverflow.com/q/26393143
tagged with: breeze
has title: EntityAspect property still not avail after adding an expand clause to a BreezeJS query
upvote count: 1
has comment: http://stackoverflow.com/comment/41619947
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/41439477
score: 1
has comment: http://stackoverflow.com/comment/41478431
has answer: http://stackoverflow.com/a/26718088
has body: This is a follow up to the question that Ziad asked on 13 Nov 2013. His question was in regard the EntityAspect property was no longer available after adding an expand clause in BreezeJS. It appeared that this functionality worked in V1.4.3, but after upgrading to V1.4.5 with EF6 and WebApi2, this functionality was no longer available. We now have a Breeze Client of V1.5, EF 6.1.1 and WebApi 2.2 and the functionality still has not been restored. My questions are: Will this functionality ever be restored and, if not, is there a workaround available. Unless I can find a way to overcome this issue, I have a major Breeze, Knockout, Durandal based application that is effectively dead in the water. I have stolen Ziad example code. I hope he does not mind because it clearly illustrates the problem. This code works fine: var query = breeze.EntityQuery.from("Products").take(1); The EntityAspect property for the row is available. However, when he added an expand clause: var query = breeze.EntityQuery.from("Products").expand("Orders").take(1); Here is the code Ziad used to retrieve the data: var mgr = new breeze.EntityManager(rootUrl + 'breeze/ProductsApi'); mgr.executeQuery(query, function (data) { alert(data.results[0].entityAspect); // undefined. }); The EntityAspect property for the row was now undefined and the fields retrieved showed up as plain values instead of KnockoutJS type observables. I was able to get around the issues of the retrieved fields showing up as plain text. I believe it was because I used ko.observableArray instead of ko.observable. But the problem with EntityAspect not working on expand structures is a showstopper. I cannot keep my UI and my underlying Breeze cache synchronized. My SaveChanges functionality does seem to work reliably. Trying to make this work has only produced hours of frustration. I am about to either walk away from this Breeze/Knockout project or return to a version of the project that used Durandal, Odata, and Knockout. The project…
answer count: 2
has answer: http://stackoverflow.com/a/26495618
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: entity-framework-6
type: UnansweredQuestion

http://stackoverflow.com/comment/41430647
type: Comment
comment on: http://stackoverflow.com/a/26388066
score: 0
type: AnswerComment
has text: If you are getting the filename from a parameter, create the `File` like this: `java.io.File file = new java.io.File(request.getParameter("nameOfParameterGoesHere"));`

http://stackoverflow.com/a/26502738
has body: you need .eq() for (var index = 0; index &lt; dosages.size(); index++) { console.log(dosages.eq(index).data('date')); }
score: 0
answers question: http://stackoverflow.com/q/26502602
type: Answer

http://stackoverflow.com/comment/41624036
score: 1
comment on: http://stackoverflow.com/a/26495115
type: AnswerComment
has text: I'm sorry I didn't give your answer the check mark. In some ways, it is the most correct answer: "become familiar with what you're doing; understand every bit of it". If I could give out two check marks, I would. Cheers.
type: Comment

http://stackoverflow.com/comment/41387461
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26364141
has text: Perhaps XSLT is another approach you could use for your problem. I 'd follow BenM 's advice. Don 't do a template engine with javascript.
score: 0

http://stackoverflow.com/comment/108765664
type: Comment
score: 0
has text: You should also check each time after `scrolled` calculation it isn't less than zero (for up button) and it isn't greater than element[0].scrollHeight (for down button). Otherwise, when user continues to click on the same button when scroll reaches its logical end, `scrolled` goes and goes out of the element height borders and the opposite button will take visible affect only after several clicks, when `scrolled` will be again within element height borders.
type: AnswerComment
comment on: http://stackoverflow.com/a/26412386

http://stackoverflow.com/comment/41625243
type: Comment
comment on: http://stackoverflow.com/q/26495802
has text: @raidenace 1. the OP wants to change the url **after** the hostname 2. HTML5 already supports a function like this, but the OP wants this to work in old browsers
score: 0
type: QuestionComment

http://stackoverflow.com/q/26449135
tagged with: jquery
type: UnansweredQuestion
has title: Javascript - use an array for object names then grab properties using a loop
has body: Going crazy trying to do this so I thought I'd get help. I have an array like this: OBJECTS = ["mainmenu","mainviewer","mainsearch"]; Each of these is an object like this: mainmenu = {width:250,height:250,backgroundcolor:red}; mainviewer = {width:250,height:250,backgroundcolor:green}; mainsearch = {width:250,height:250,backgroundcolor:blue}; Now the crux of it ... I'm simply trying to get the properties like this: for (var item in OBJECTS) { var name = OBJECTS[item]; console.log("the width of "+name+" is "+name.width); } The console logs back to me: the width of mainmenu is undefined Any help greatly appreciated ...
type: Question
has answer: http://stackoverflow.com/a/26449180
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26449155
has comment: http://stackoverflow.com/comment/41540058
tagged with: javascript

http://stackoverflow.com/q/26471555
tagged with: function
tagged with: this
has comment: http://stackoverflow.com/comment/41586839
has comment: http://stackoverflow.com/comment/41580668
has comment: http://stackoverflow.com/comment/41580861
has body: Just want to say what a great forum this is for developers and IT professionals. I have this code below. I am trying to get the count value outside of the function that the count is being processed in. But its not working, even with a global variable to that function. Is there anyway this can be done? Thanks for your help guys, much appreciated. var getcountglobal =0; var that =this.buttonforitem; //this refers to button created by javascript that.onclick = function() { getcountglobal++; console.log(getcountglobal);// in console when clicking the button it gives 1,2,3,etc } console.log(getcountglobal); // here it gives 0 and not the click number. Why doesn't or cant the variable be changed?
has answer: http://stackoverflow.com/a/26471596
has comment: http://stackoverflow.com/comment/41580886
tagged with: return-value
has title: Getting the Global Variable to change based on increment defined within an onclick function?
has comment: http://stackoverflow.com/comment/41586642
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26471613
type: Question
tagged with: counter
tagged with: javascript
has comment: http://stackoverflow.com/comment/41586510
has answer: http://stackoverflow.com/a/26471601
has comment: http://stackoverflow.com/comment/41580621
has comment: http://stackoverflow.com/comment/41580666
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41580610

http://stackoverflow.com/a/26405446
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26404718
answers question: http://stackoverflow.com/q/26404718
type: Answer
has comment: http://stackoverflow.com/comment/41462825
downvote count: 0
score: 1
has body: I'm not quite sure I understand completely what you are trying to achieve. If you just need to populate the list with the return value from a getter Method, then you could use something like this: &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt; &lt;jsp:useBean id="apiinfo" class="your.package.ApiInfo" /&gt; &lt;c:forEach var="method" items="${apiinfo.privateApiMethods}"&gt; &lt;option&gt;${method.methodName}&lt;/option&gt; &lt;/c:forEach&gt; for further reference: http://www.tutorialspoint.com/jsp/jsp_java_beans.htm (Access Java Beans from JSP) how to Use &lt;c:forEach&gt; in scripts tag on JSP page? (Use of foreach in JSP)
has comment: http://stackoverflow.com/comment/41462544
has comment: http://stackoverflow.com/comment/41463238
has comment: http://stackoverflow.com/comment/41462838
upvote count: 1

http://stackoverflow.com/comment/41561529
type: QuestionComment
comment on: http://stackoverflow.com/q/26461210
type: Comment
score: 0
has text: Why not ` ` where `this` will be the target input.

http://stackoverflow.com/q/26381678
has body: i have the following input field: with this i have the following code $('#txt_comment').keyup(function(e){ if(e.keyCode == 13) { addComment(); return false; } e.preventDefault(); }); However when i press enter it still reloads the page. Can anyone tell me what im doing wrong? Update function addComment() { var comment = $('#txt_comment').val(); { $.ajax({ type: 'POST', url: '/Comment/addComment', dataType: 'json', data: { request: 'ajax', reciver:user_id, comment: comment }, success: function (data) { $('#comment_list').prepend( ' '+ ' '+data['sender']+':'+ ' '+comment+' '+ ' '+ ' '+ ' ' ) $('.timestamp').each(function() { var text = $(this).next() var timer = $(this).val(); var new_text = moment(timer, "YYYY-MM-DD- HH:m:ss").fromNow(); text.html(new_text); }); $('#txt_comment').val(''); } }) } } And my function now look like this: $('#txt_comment').keyup(function(e){ if(e.keyCode === 13) { addComment(); e.preventDefault(); return false; } }); Still having page reloads
has comment: http://stackoverflow.com/comment/41418336
score: 0
accepted answer: http://stackoverflow.com/a/26382024
answer count: 3
possible better answer: http://stackoverflow.com/a/26381727
has answer: http://stackoverflow.com/a/26381727
has comment: http://stackoverflow.com/comment/41418022
linked to: http://stackoverflow.com/q/1370021
tagged with: javascript
has comment: http://stackoverflow.com/comment/41417987
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26381954
has answer: http://stackoverflow.com/a/26382024
has comment: http://stackoverflow.com/comment/41418178
has title: Prevent page reload on enter key pressed
type: Question

http://stackoverflow.com/comment/41374209
has text: ...I can do this easily using the built-in Web developer tools, but in FireBug, reloading the page stops the profiling session.
score: 1
comment on: http://stackoverflow.com/q/26357671
type: Comment
type: QuestionComment

asp.net-mvc
tags question: http://stackoverflow.com/q/26471097
tags question: http://stackoverflow.com/q/26510786
tags question: http://stackoverflow.com/q/26362622
tags question: http://stackoverflow.com/q/26439305
tags question: http://stackoverflow.com/q/26415625
tags question: http://stackoverflow.com/q/26423083
tags question: http://stackoverflow.com/q/26459577
tags question: http://stackoverflow.com/q/26390487
tags question: http://stackoverflow.com/q/26462493
tags question: http://stackoverflow.com/q/26429518
tags question: http://stackoverflow.com/q/26484321
tags question: http://stackoverflow.com/q/26465915
tags question: http://stackoverflow.com/q/26415999
tags question: http://stackoverflow.com/q/26393713
tags question: http://stackoverflow.com/q/26509778
tags question: http://stackoverflow.com/q/26512207
tags question: http://stackoverflow.com/q/26462658
tags question: http://stackoverflow.com/q/26488616
tags question: http://stackoverflow.com/q/26467378
tags question: http://stackoverflow.com/q/26492696
tags question: http://stackoverflow.com/q/26437977
tags question: http://stackoverflow.com/q/26444027
tags question: http://stackoverflow.com/q/26470615
tags question: http://stackoverflow.com/q/26378121
tags question: http://stackoverflow.com/q/26440554
tags question: http://stackoverflow.com/q/26365619
tags question: http://stackoverflow.com/q/26377648
tags question: http://stackoverflow.com/q/26454331
tags question: http://stackoverflow.com/q/26493142
tags question: http://stackoverflow.com/q/26414320
tags question: http://stackoverflow.com/q/26412197
tags question: http://stackoverflow.com/q/26438120
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/26470862
tags question: http://stackoverflow.com/q/26362654
tags question: http://stackoverflow.com/q/26471805
tags question: http://stackoverflow.com/q/26393741
tags question: http://stackoverflow.com/q/26402255
tags question: http://stackoverflow.com/q/26493824
tags question: http://stackoverflow.com/q/26369801
tags question: http://stackoverflow.com/q/26467304
type: Tag
tags question: http://stackoverflow.com/q/26443860
tags question: http://stackoverflow.com/q/26377103
tags question: http://stackoverflow.com/q/26490850
tags question: http://stackoverflow.com/q/26401105
tags question: http://stackoverflow.com/q/26451049
tags question: http://stackoverflow.com/q/26471841
tags question: http://stackoverflow.com/q/26484984
tags question: http://stackoverflow.com/q/26489314

http://stackoverflow.com/q/26433451
tagged with: google-maps
tagged with: arrays
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/41512245
has body: This Json Data from an Ajax call { "VehicleID": 1, "Tracks": [{ "TrackID": 1, "trackPoints": [{ "lat": 36.25514030456543, "lng": 33.501180542295344 }, { "lat": 36.255140304562, "lng": 33.5011805422952 }, { "lat": 36.255140304561, "lng": 33.5011805422951 }] }, { "TrackID": 1, "trackPoints": [{ "lat": 31.25514030456543, "lng": 31.501180542295344 }, { "lat": 31.255140304562, "lng": 31.5011805422952 }, { "lat": 31.255140304561, "lng": 31.5011805422951 }] }] } using google maps two for loops for iterating over tracks and points in each track, I'm printing most of what I do into the console for (var i = 0; i &lt; numtracks; i++) { var numPoints = result.Tracks[i].trackPoints.length; arr[i] = new Array(numPoints); //creating 2d array for points console.log("*********Array number " + i + " Got created" + "and its lenght is " + arr[i].length + " *******************"); console.log("Lenght of track #" + i + " Points =&gt; " + numPoints); console.log("array lenghth for Points track #" + i + " =&gt; " + arr[i].length); The second loop for acessing points for (var j = 0; j &lt; result.Tracks[i].trackPoints.length; j++) { var x = result.Tracks[i].trackPoints[j].lat; var y = result.Tracks[i].trackPoints[j].lng; console.log("x= " + x + " for #" + j + " Point"); console.log("y= " + y + " for #" + j + " Point"); I'm passing data into google maps API var p = new google.maps.LatLng(x, y); console.log("p befor push lat for the " + p.lat()); console.log("p befor push lng for the " + p.lng()); after pushing data into arr[i] . arr[i].push(p); //when acessing arr[i][j].lat();is not recgnising it console.log("track #" + i + " , point #" + j + "pushed into array x= " + arr[i][j].lat() + " ,y=" + arr[i][j]); This is the output from the console array lenghth for tracks =&gt; 2 trackss:96 Tracks lenght : 2 trackss:97 *********Array number 0 Got createdand its lenght is 3 ******************* trackss:110 Lenght of track #0 Points =&gt; 3 trackss:111 array lenghth for Points track #0 =&gt; 3 trackss…
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26433607
has title: can't access object elements after pushing into 2d array?

http://stackoverflow.com/comment/41650190
comment on: http://stackoverflow.com/q/26509976
type: Comment
type: QuestionComment
has text: Cuts down on the amount of code that is being executed, I believe it does anyway. Also looks neater.
score: 0

http://stackoverflow.com/comment/41401593
type: Comment
type: QuestionComment
score: 0
has text: Using the demo page produces the same result so it looks like it leaves text: http://htmlpurifier.org/demo.php?filter[AutoFormat.AutoParagraph]=0&filter[AutoFormat.DisplayLinkURI]=0&filter[AutoFormat.Linkify]=0&filter[AutoFormat.RemoveEmpty]=0&filter[AutoFormat.RemoveSpansWithoutAttributes]=0&filter[Null_CSS.AllowedProperties]=1&filter[Core.CollectErrors]=0&filter[Null_HTML.Allowed]=1&filter[Null_HTML.Doctype]=1&filter[HTML.SafeObject]=0&filter[HTML.TidyLevel]=medium&filter[URI.DisableExternalResources]=0&filter[Null_URI.Munge]=1&html=%27%22+onclick%3D%22alert%281%29%3B%22+&submit=Submit
comment on: http://stackoverflow.com/q/26370634

http://stackoverflow.com/a/26448104
has comment: http://stackoverflow.com/comment/55191372
has body: You can store the promise returned by the interval and use $interval.cancel() to that promise, which cancels the interval of that promise. To delegate the starting and stopping of the interval, you can create start() and stop() functions whenever you want to stop and start them again from a specific event. I have created a snippet below showing the basics of starting and stopping an interval, by implementing it in view through the use of events (e.g. ng-click) and in the controller. angular.module('app', []) .controller('ItemController', function($scope, $interval) { // store the interval promise in this variable var promise; // simulated items array $scope.items = []; // starts the interval $scope.start = function() { // stops any running interval to avoid two intervals running at the same time $scope.stop(); // store the interval promise promise = $interval(setRandomizedCollection, 1000); }; // stops the interval $scope.stop = function() { $interval.cancel(promise); }; // starting the interval by default $scope.start(); // stops the interval when the scope is destroyed, // this usually happens when a route is changed and // the ItemsController $scope gets destroyed. The // destruction of the ItemsController scope does not // guarantee the stopping of any intervals, you must // be responsible for stopping it when the scope is // is destroyed. $scope.$on('$destroy', function() { $scope.stop(); }); function setRandomizedCollection() { // items to randomize 1 - 11 var randomItems = parseInt(Math.random() * 10 + 1); // empties the items array $scope.items.length = 0; // loop through random N times while(randomItems--) { // push random number from 1 - 10000 to $scope.items $scope.items.push(parseInt(Math.random() * 10000 + 1)); } } }); Start Interval Stop Interval
accepted answer of: http://stackoverflow.com/q/26447923
answers question: http://stackoverflow.com/q/26447923
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41538180
has comment: http://stackoverflow.com/comment/41538245
type: Answer
score: 162
downvote count: 0
upvote count: 162

http://stackoverflow.com/a/26495707
upvote count: 2
has body: I've just adjusted your Fiddle with the adjusted .append($('option:selected', this).data('name') + '&lt;br/&gt;&lt;img alt="coming soon" src="' + $('option:selected', this).data('img') + '"/&gt;&lt;br/&gt;' + $('option:selected', this).data('price')) and added some dummy-images to display the result. I guess you can adjust from there on with some CSS as I just used &lt;br/&gt; to display title and price above and below. Update for further request in comment: To display the title instead of "Image will go here": $('#modal_special').find('.modal-body').html('&lt;p&gt;' + $('option:selected', this).data('name') + '&lt;/p&gt;') .append('&lt;img alt="coming soon" src="' + $('option:selected', this).data('img') + '"/&gt;&lt;br/&gt;' + $('option:selected', this).data('price')) Updated Fiddle
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26495571

http://stackoverflow.com/a/26415205
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26415181
has comment: http://stackoverflow.com/comment/41478135
has comment: http://stackoverflow.com/comment/41478156
type: AcceptedAnswer
downvote count: 0
has body: According to your json: ciudad.tiendas.code doesn't exist, you probably wanted to do this instead:
type: Answer
accepted answer of: http://stackoverflow.com/q/26415181

http://stackoverflow.com/a/26507225
type: Answer
has body: This should do your work: $(document).ready(function(){ //Your code here.... });
score: 0
answers question: http://stackoverflow.com/q/26506735

http://stackoverflow.com/comment/41639618
has text: Yes, you can have a look at this fiddle someone has put together [jQueryUIConfirm](http://jsfiddle.net/taditdash/vvjj8/)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26504079

http://stackoverflow.com/comment/41484832
type: QuestionComment
score: 2
has text: For adequate elements' selecting their IDs **must** be unique. It is a bad style to use multiple same IDs. But in this situation you can use Ionică Bizău, P5Coder and user3168736 answers.
comment on: http://stackoverflow.com/q/26419058
type: Comment

http://stackoverflow.com/q/26453151
answer count: 3
tagged with: mobile
has answer: http://stackoverflow.com/a/26453189
downvote count: 0
has comment: http://stackoverflow.com/comment/41547213
has comment: http://stackoverflow.com/comment/78328078
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Javascript onClick for mobile devices
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41547220
tagged with: css
has body: I am working on a submenu for a nav that I need to be accessible for mobile and tablet devices. I am aware that using onClick="return true" will do the trick, however, I also need my list item to close when the user clicks on the list item. Basically I need it to toggle the submenu. If I add this simple line of Javascript, it will work but the submenu will always remain open. How can I get it to close/toggle the submenu? HTML: Menu 1 Menu 2 Menu 3 Menu 4 Sub 1 Sub 2 Javascript: $('nav li.bg').on('click', function(){ return true; }
has comment: http://stackoverflow.com/comment/41547445
has comment: http://stackoverflow.com/comment/41547502
type: Question
score: 3
has answer: http://stackoverflow.com/a/26474338
tagged with: javascript
has comment: http://stackoverflow.com/comment/41547790
has answer: http://stackoverflow.com/a/34592437
upvote count: 3

http://stackoverflow.com/comment/41523307
type: AnswerComment
has text: @Murplyx: I've forgotten the `g` (global) modifier. see my edit
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26439805

http://stackoverflow.com/a/26435642
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26435549
upvote count: 1
type: Answer
has body: Seems there is bug here: $result = $tier0 &amp;&amp; $tier1 &amp;&amp; tier2; this should be like $result = $tier0 &amp;&amp; $tier1 &amp;&amp; $tier2; ^---------This is added

http://stackoverflow.com/a/26506729
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26501259
type: Answer
accepted answer of: http://stackoverflow.com/q/26501259
has body: I got the answer from Angular channel over irc by Foxandxss, here is what he said. there is two different injection places services, controllers, directives, run oh, and filters there you can inject services but NOT providers then, you have another injection place, providers and config functions there you can only inject constant and providers so a provider has two parts the "provider part, which is configuration" and the "factory" inside it which is the $get if you inject your provider in another provider or config you inject the configuration part and you have to append the Provider on the name so when you inject "unicornLauncher" into config you should put "unicornLauncherProvider" that will inject the configuration part and not the $get if you go to a controller and you inject unicornLauncher it will inject the factory inside it (AKA the $get) you won't be able to access "usetinfoilshielding" inside it because that is part of the provider and not the factory ($get) inside so basically a provider is two parts and you use one or the other you can't use both

http://stackoverflow.com/comment/41469211
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26407955
has text: See: [how-to-get-binary-representation-of-floating-point-number](http://stackoverflow.com/questions/4729526/how-to-get-binary-representation-of-floating-point-number-in-php)

http://stackoverflow.com/q/26439305
type: Question
tagged with: c#
tagged with: asp.net-mvc
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: ajax
tagged with: asp.net-mvc-ajax
has body: I wanna change some MVC Ajax Form parameters like InsertionMode or LoadingElementId via javascript at client side. How can I do it? sample of a MVC ajax form : @using (Ajax.BeginRouteForm("DevicesByObjectName", new AjaxOptions { InsertionMode = InsertionMode.InsertBefore, UpdateTargetId = "Devices", LoadingElementId = "LoaderContents", OnSuccess = "MoreDevicesOnSuccess", OnFailure = "MoreDevicesOnFailure", OnBegin = "MoreDevicesOnBegin", OnComplete = "MoreDevicesOnComplete", })) { &lt;div&gt; @Html.AntiForgeryToken() &lt;input type="hidden" value="@Model.Object.Id" id="ObjectId" name="ObjectId" /&gt; &lt;input type="hidden" value="2" id="PageNumber" name="PageNumber" /&gt; &lt;input type="hidden" value="" id="Filtering" name="Filtering" /&gt; &lt;div class="center-block" style="max-width: 360px;"&gt; &lt;input type="submit" value=" more" class="btn btn-primary btn-lg btn-block center-block" /&gt; &lt;/div&gt; &lt;div id="LoaderContents" class="ajax-loader center-block hidden"&gt;&lt;/div&gt; &lt;/div&gt; }
has answer: http://stackoverflow.com/a/26559761
score: 1
favorite count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/41522494
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26559761
has title: Changing InsertionMode of MVC Ajax form via JavaScript?

http://stackoverflow.com/comment/41419189
type: AnswerComment
has text: The only reason I don't like this answer is because *it assumes you have control over how the function is being called*. If so, *JSLint's original error is actually valid* -- stop passing in those first two parameters if they're not used. The `unparam` workaround is for when you find yourself stuck in event handler land or a similarly constraining convention, and you can't reasonably stop extra params being passed.
type: Comment
comment on: http://stackoverflow.com/a/26380765
score: 1

http://stackoverflow.com/q/26414985
favorite count: 0
has comment: http://stackoverflow.com/comment/45382270
upvote count: 5
has comment: http://stackoverflow.com/comment/53412005
tagged with: templates
tagged with: meteor
has title: Calling one helper from another helper within the context of a template (Meteor 0.9.4)
downvote count: 0
type: Question
type: AnsweredQuestion
has body: As of Meteor 0.9.4, defining Template.MyTemplate.MyHelperFunction() is no longer valid. We deprecated the Template.someTemplate.myHelper = ... syntax in favor of Template.someTemplate.helpers(...). Using the older syntax still works, but it prints a deprecation warning to the console. This seemed fine to me, as it would (at the least) save some mis-typing and duplicated text. However, I soon discovered that the way I was building Meteor apps had leaned on an ability that this new version has deprecated. In my apps, I've been defining helpers/functions with the old syntax, then calling those methods from other helpers. I found it helped me keep my code clean and consistent. For example, I might have a control like this: //Common Method Template.myTemplate.doCommonThing = function() { /* Commonly used method is defined here */ } //Other Methods Template.myTemplate.otherThing1 = function() { /* Do proprietary thing here */ Template.myTemplate.doCommonThing(); } Template.myTemplate.otherThing2 = function() { /* Do proprietary thing here */ Template.myTemplate.doCommonThing(); } But this does not appear to be available with the new method Meteor suggests (which makes me think I was wrong all along). My question is, What is the preferred way to share common, template-specific logic between a template's helpers?
score: 5
has answer: http://stackoverflow.com/a/26415029
accepted answer: http://stackoverflow.com/a/26415029
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/27755891

http://stackoverflow.com/a/54214949
type: Answer
has body: It may be a good idea to use ResizeObserver like here to have each module be able to setup / remove its own resize observer.
answers question: http://stackoverflow.com/q/26409078
score: 0

http://stackoverflow.com/q/26496900
score: 0
has answer: http://stackoverflow.com/a/26497005
has body: My friend and I are making a data validation program. If you enter in data that the program will not accept (example such as putting numbers in a name field) you get a windows alert telling you that is not valid. We decided we want to change this so that instead of a windows alert there will be an empty table cell to the right of each of the form elements that displays that your data is not valid. How could I change this? Attaching code below. function fNameValidation() { if (document.forms[0].fName.value.length==0) //First name data validation { //check for any entry alert('Please enter your first name.'); document.forms[0].fName.focus(); return; }
answer count: 3
has answer: http://stackoverflow.com/a/26497060
type: UnansweredQuestion
tagged with: alert
has comment: http://stackoverflow.com/comment/41626954
type: Question
tagged with: cell
has answer: http://stackoverflow.com/a/26497065
has title: In Javascript how can I change an alert window to display that alert next to an input box
tagged with: javascript

http://stackoverflow.com/comment/41615844
has text: @Evilzebra I haven't posted what I've tried because frankly, I couldn't really get much farther than a basic expression. Here is the closest I got to the requirement though (I'm still capturing that 6 in the second list): http://regex101.com/r/nX9hP9/2
comment on: http://stackoverflow.com/q/26490380
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26422770
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41491200
type: Answer
answers question: http://stackoverflow.com/q/26422706
has body: So, you want to loop through sentence, ans check if any of the sentences are in the keywords. This'll do the trick: // Build a big string of all keywords var keyWordLine = keywords.join('').toLowerCase(); // "my car is bluegghcxfkjc532jjHow are you tech" // Loop through all sentences for(var i = 0; i &lt; sentence; i++){ // Check the current sentence if(keyWordLine.indexOf(sentence[i].toLowerCase()) !== -1){ // sentence is in the keywords! }else{ // sentence is not in the keywords! } } Now, what you'll do with these results is up to you. You could, for example, build an array that includes only the sentences that appear in keywords: var keywords = ["my", " ", "car", " ", "is", " ", "blue", "gghcxfkjc", "532jj", "How", " ", "are", " ", "you", " ", "tech"], sentence = ["my car is blue", "the dog is sleeping", "I am in the kitchen", "How are you"], keyWordLine = keywords.join('').toLowerCase(), output = []; for(var i = 0; i &lt; sentence; i++){ if(keyWordLine.indexOf(sentence[i].toLowerCase()) !== -1){ output.push(sentence[i]); } } alert(output);

http://stackoverflow.com/a/26413118
answers question: http://stackoverflow.com/q/26394376
upvote count: 2
has comment: http://stackoverflow.com/comment/41509134
has body: Alright, here we go. I think HTML5 data attributes will do it for you. Keep in mind the code I shared below extremely minimal. Have a look at my JSFiddle for a more complete example. By doing this, you only need one set of hidden fields (the fields that you are going to submit with the modal form). This is what happens: User clicks on a product. The button clicked has data attributes associated with it which get passed along to the modal form. A modal opens with an form inside (you can make this hidden, they are visible to demonstrate) the form now holds the correct data. User proceeds, the form will be submitted. $(document).ready(function() { // You'll probably wan't to make .btn-default more specific $('.btn-default').on( 'click', function() { var name = $(this).attr('data-name'); var type = $(this).attr('data-type'); var id = $(this).attr('data-id'); var option = $(this).parents('.product').find(':selected').attr('data-option'); $('.modal input#choosen_option').val(option); $('.modal input#choosen_name').val(name); $('.modal input#choosen_type').val(type); $('.modal input#choosen_id').val(id); }); }); The markup: 12 Months 24 Months 36 Months Buy Now 12 Months 24 Months 36 Months Buy Now The modal with form:
has comment: http://stackoverflow.com/comment/41509235
has comment: http://stackoverflow.com/comment/41508127
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41475103
type: Answer
accepted answer of: http://stackoverflow.com/q/26394376
has comment: http://stackoverflow.com/comment/41474630
score: 2

http://stackoverflow.com/q/26504609
has body: i am trying to show information for each record on tooltip using jquery tooltip for custom content. It does not show record for each item but only first record details. below is the view code which includes code and script as well. i am looping through each item as @foreach (var item in Model.Courses) i want to display tooltip for each record when there is mouse hover on Detail View @using (Html.BeginFormAntiForgeryPost(Url.Action("Summary", "SignupOrLogin", new { area = "Course" }))) { Select Course @foreach (var item in Model.Courses) { @item.Course.Name (£@item.Course.Fees) Detail @item.Course.Name Start Date: @item.Course.StartDate End Date : @item.Course.EndDate Category: @item.Course.Category Location: @item.Course.Location Fees: £ @item.Course.Fees Total Space: @item.Course.TotalSpace Description: @item.Course.Description } }
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/26505717
accepted answer: http://stackoverflow.com/a/26505717
tagged with: razor
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: jquery-tooltip
tagged with: javascript
tagged with: jquery
has title: displaying jquery tooltip for each record in custom content
score: 0

http://stackoverflow.com/comment/76778353
has text: I also faced infinite loop problem according to correct answer. So I use your answer but 'presenters' is empty array and nothing show in {{p.name}}. So if you have any idea, please help me. Thanks a lot.
type: Comment
comment on: http://stackoverflow.com/a/35400846
score: 0
type: AnswerComment

http://stackoverflow.com/q/26395842
has answer: http://stackoverflow.com/a/26395963
has body: I'm having a little trouble with this basic JavaScript Mortgage calculator... I haven't implemented the math yet. But I am having trouble displaying the final sum (x + y + z) below the form after it has been submitted(It's client-side, and I'm just using the sum of the variables to test it). Also, the reset form button doesn't work. Can anybody help me? Thanks! <?xml version="1.0" encoding="utf-8"?> JavaScriptcript Mortgage Calculator APR: Loan Term: Loan Amount: Calculate Payment Button
has answer: http://stackoverflow.com/a/26396068
has comment: http://stackoverflow.com/comment/41443650
has comment: http://stackoverflow.com/comment/41443746
has answer: http://stackoverflow.com/a/26395977
has title: Basic JavaScript Calculator
has comment: http://stackoverflow.com/comment/41443542
possible better answer: http://stackoverflow.com/a/26396068
downvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26396142
score: -1
answer count: 6
upvote count: 0
has answer: http://stackoverflow.com/a/26396076
tagged with: javascript
tagged with: calculator
has answer: http://stackoverflow.com/a/58045070
favorite count: 0
accepted answer: http://stackoverflow.com/a/26396142
has comment: http://stackoverflow.com/comment/41443537

http://stackoverflow.com/a/26386509
accepted answer of: http://stackoverflow.com/q/26386097
has body: There can not / must not be elements with the same id name in one page. http://www.w3.org/TR/html5/elements.html#the-id-attribute The id attribute specifies its element's unique identifier (ID). The value must be unique amongst all the IDs in the element's home subtree and must contain at least one character. The value must not contain any space characters. So to fix your problem, just remove the same ids and just leave the class st-accordion http://jsfiddle.net/5h559dyj/3/ $(function() { $('.st-accordion').accordion(); });
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41427408
answers question: http://stackoverflow.com/q/26386097
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26401547
answer count: 4
has answer: http://stackoverflow.com/a/26522105
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26522105
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26505101
type: Question
has answer: http://stackoverflow.com/a/26502963
has answer: http://stackoverflow.com/a/26505101
has comment: http://stackoverflow.com/comment/41452933
has comment: http://stackoverflow.com/comment/41453095
score: 1
tagged with: listview
has comment: http://stackoverflow.com/comment/41453203
upvote count: 1
has comment: http://stackoverflow.com/comment/41453062
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has body: i'm using an Asp.net Listview to show data in a "grid". This is my code <asp:ListView ID="lvDmr" runat="server" DataSourceID="dsDmr" DataKeyNames="id"> Expand/Hide Div <%# Eval("rivista")%> <a href='dmr.aspx?cliente=<%# Eval("cliente")%>'> <%# Eval("cliente")%> <%# Eval("categoria")%> <%# Eval("sottocategoria")%> <%# Eval("prodotto")%> <%# Eval("formato")%> <%# Eval("posizionamento")%> <%# Eval("spazio")%> <%# Eval("id")%> Dettaglio <asp:Label ID="lblNoPost" runat="server" Font-Size="Large" Font-Bold="true" Text="Non ci sono record !"> </asp:Label> Rivista Cliente Categoria Sottocategoria Prodotto Formato Posizionamento Spazio id <asp:DataPager ID="DataPager1" runat="server" PageSize="24" QueryStringField="page"> <asp:NumericPagerField ButtonType="Link" NumericButtonCssClass="PageNumber" NextPreviousButtonCssClass="PageNumber" NextPageText="Next" PreviousPageText="Prev" CurrentPageLabelCssClass="PageNumberCurrent" /> </asp:DataPager> </asp:ListView> I would like to allow user to Show / Hide the div divDetail under each row (like a master detail) clicking an icon/button near each row. The problem is that the each div change his name after asp.net render it (because i use runat=server). So how can i use jquery or javascript to show hide ONLY the div under the correct row ? Is it possible ? Thanks
has comment: http://stackoverflow.com/comment/41452898
has title: How to show / hide row of a ListView using jquery
has answer: http://stackoverflow.com/a/26503190

http://stackoverflow.com/q/26408576
upvote count: 1
has answer: http://stackoverflow.com/a/26408910
has answer: http://stackoverflow.com/a/26408845
has title: Change href to tel: + number (user defined)
has comment: http://stackoverflow.com/comment/41465725
favorite count: 0
has answer: http://stackoverflow.com/a/26408734
accepted answer: http://stackoverflow.com/a/26408734
has comment: http://stackoverflow.com/comment/41465640
has answer: http://stackoverflow.com/a/26408668
answer count: 4
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/26408668
score: 1
has comment: http://stackoverflow.com/comment/41472861
type: Question
tagged with: href
has comment: http://stackoverflow.com/comment/41465649
has comment: http://stackoverflow.com/comment/41465790
tagged with: hyperlink
tagged with: javascript
tagged with: jquery
has body: I'm trying to write a script where users can type a phone number and store it in the input (which works in this demo: http://bootsnipp.com/snippets/featured/iphone-number-pad) and then update href="" = "tel:" + that-same-value. So for example the if the user types 600 999 999 the href is updated to href="tel:600 999 999" and the user can then click the the button and make a call. I've been beating myself up trying to figure this out. It seemed really simple because I'm not even trying to use restrict the phone number to 6-7 characters long. Any help would be greatly appreciated. $(document).ready(function() { // Get number $('.num').click(function() { var num = $(this); var text = $.trim(num.find('.txt').clone().children().remove().end().text()); var telNumber = $('#telNumber'); $(telNumber).val(telNumber.val() + text); $('#call-this').href = "tel:" + $(telNumber).val(telNumber.val() + text) console.log(text); console.log(telNumber); }); // add number to href var call = $(#call - this).attr('target') // Other stuff I've tired // $('#call-this').click( // $('#call-this').href="tel:" + $(telNumber).val(telNumber.val() + text) // var call = $('#call-this'); // $('#call-this').href= "tel:" + telNumber; // console.log(call); // }); }); 0 1 2 3 4 5 6 7 8 9 Call

http://stackoverflow.com/comment/41575171
has text: @Teemu, no worries, I was apparently a bit hasty to post an answer and glanced over the fact that you're not looking for the answer I provided! :) My best guess is that regardless of the order, both events are being permitted to fire but the form submit is taking precedence. A shot in the dark, I suppose.
comment on: http://stackoverflow.com/a/26468450
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26364351
type: AnsweredQuestion
type: Question
has title: Firefox JS not running unless debugged
tagged with: firefox
tagged with: javascript
tagged with: jquery
has body: I have a simple piece of code, that works fine both in IE and Chrome, but doesn't work in Firefox unless debugged. It seems as if Firefox is unable to fire event. Does anybody know what could be the issue?
has comment: http://stackoverflow.com/comment/41386384
score: 0
tagged with: jquery-events
accepted answer: http://stackoverflow.com/a/27144728
answer count: 1
has answer: http://stackoverflow.com/a/27144728
has comment: http://stackoverflow.com/comment/41386271

http://stackoverflow.com/q/26403466
tagged with: boolean
type: AnsweredQuestion
has title: Changing boolean from true to false and use it in if() afterward using jquery
score: 1
favorite count: 0
tagged with: var
type: Question
has answer: http://stackoverflow.com/a/26406031
has comment: http://stackoverflow.com/comment/41459317
answer count: 1
has comment: http://stackoverflow.com/comment/41455956
has comment: http://stackoverflow.com/comment/41460124
upvote count: 1
has body: I have tried several ways to implement the output from a boolean to an if-statement. Somehow I do it wrong. I'm able to change the value of the boolean and console.log it, so that should be right. I then try to use it in an if-statement, but somehow it is ignored and doesn't give the expected outcome. This is my code: var heroVelX = game.currentHero.GetLinearVelocity().x; var heroVelY = game.currentHero.GetLinearVelocity().y; var speed = Math.sqrt(Math.pow(heroVelX, 2) + Math.pow(heroVelY, 2)); var moveOn = ""; function delay(){ moveOn = Boolean(speed&lt;1.5); console.log("Speed = " + speed + " " + moveOn); }; setTimeout(delay, 3500); // These are the conditions I have tried using. I can see in console.log that the value is changed. But somehow it is ignored? All the other conditions are accepted in the if-statement. // moveOn ===!false // moveOn == true if(!game.currentHero.IsAwake() || moveOn === !false || heroX&lt;0 || heroX &gt;game.currentLevel.foregroundImage.width ){ // then delete the old hero box2d.world.DestroyBody(game.currentHero); game.currentHero = undefined; // and load next hero game.mode = "load-next-hero"; } Can someone tell me what I'm doing wrong?
accepted answer: http://stackoverflow.com/a/26406031
has comment: http://stackoverflow.com/comment/41459064
tagged with: if-statement
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26442692
type: Answer
answers question: http://stackoverflow.com/q/26442565
score: 0
has body: try adding your code inside $( document ).ready(function() { // put code here }); This is because if your JS and JQuery are being ran before the page finishes loading..

http://stackoverflow.com/a/26359975
answers question: http://stackoverflow.com/q/26358140
accepted answer of: http://stackoverflow.com/q/26358140
type: AcceptedAnswer
score: 1
has body: The top left 3×3 submatrix is the rotation, the top right 3×1 vector is the translation, the bottom row is (0,0,0,1). (This is assuming that you're multiplying matrix times column vector, not row vector times matrix. Otherwise the situation would be transposed.) So yes, it should be easy to adapt the constructor which creates the matrix from a rotation to also cater for the case where there is an extra translation vector. Or you might create the matrix from the rotation and then change some of its entries to incorporate the translation. Note that this assumes your notation to mean “rotate then translate”. If it's the other way round, then you'd have to apply the rotation to the translation vector before including that into the matrix.
type: Answer
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/41451356
score: 0
has text: Thank you for the guidance, pretty new to stack overflow so was unsure of the 'Best practices', I shall take your advice on board next time.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26400065

http://stackoverflow.com/a/26492451
has comment: http://stackoverflow.com/comment/41619721
has comment: http://stackoverflow.com/comment/41621048
accepted answer of: http://stackoverflow.com/q/26492297
type: AcceptedAnswer
has body: It's unclear exactly what you're asking for. But if it's any help, the addToCart method that comes with the default template accepts an optional second field, which is the quantity. So you could do: &lt;a onClick="addToCart('&lt;?php echo $product['product_id']; ?&gt;', &lt;?php echo $discount['quantity']; ?&gt;);" class="button"&gt;&lt;?php echo $button_cart; ?&gt;&lt;/a&gt; Edit for items with options: I'll assume you're on the product page, as you need to select the options somehow... now we could clone the whole function that submits the data to the cart. But I think this is easier to manage: First, change the link to look like this: &lt;a class="buy-bulk" data-quantity="&lt;?php echo $discount['quantity']; ?&gt;" class="button"&gt;&lt;?php echo $button_cart; ?&gt;&lt;/a&gt; Then add the following near the bottom: &lt;script type="text/javascript"&gt; $(document).ready(function() { $('.buy-bulk').on('click', function() { var quantity = $(this).data('quantity'); // change the quantity $('input[name="quantity"]').val(quantity); // simulate a click on the "add to cart button" $('#button-cart').trigger('click'); }) }); &lt;/script&gt; NOTE: untested! :)
answers question: http://stackoverflow.com/q/26492297
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41620919
has comment: http://stackoverflow.com/comment/41619914

http://stackoverflow.com/q/26401251
type: Question
has title: editable dropdown (g:select) grails
tagged with: javascript
tagged with: grails
has body: I want to make an editable g:select in grails. I have an g:select with my default values but I want to can add some from hand. How can I do that?
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/740195
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26405166
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41454860

http://stackoverflow.com/q/26404764
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26404913
linked to: http://stackoverflow.com/q/4281838
type: Question
answer count: 2
tagged with: autocomplete
has body: I have an HTML page which has an input field with type="text", autocomplete="off" and autocorrect="off" Although this turns off the drop down that appears below the input field with previously entered values, I still get these values in the suggestions that appear above my soft keyboard in Samsung Galaxy Tab S tablet. Please see the image below. Setting autocomplete="off" and autocorrect="off" works fine for Sony Xperia Z tablet. But Samsung Galaxy Tab S is giving issue, which has android 4.4.2 and chrome browser version 38.0.2125.102. Anyone knows why? Note: I know i can turn off suggestions from keyboard settings or change the keyboard itself, but i want it to work without the user having to do that. For example sony xperia z tablet have suggestions turned on but it never shows suggestions for input fields that have autocomplete=off, and shows suggestions otherwise.
has answer: http://stackoverflow.com/a/26404913
tagged with: javascript
tagged with: jquery
has title: Tablet showing previously entered values from input field, even after having set autocomplete and autocorrect to 'off'
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26407115
has answer: http://stackoverflow.com/a/26407115
favorite count: 0
tagged with: android

http://stackoverflow.com/q/26391436
favorite count: 0
has comment: http://stackoverflow.com/comment/41436059
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26391533
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41436007
has title: Jquery with HTML replacement
has body: I created and if else statement to reflect appropriate specific text, I have a Jfiddle set up here: http://jsfiddle.net/heykate/osvg4h33/ What I am trying to accomplish, is depending if a user is logged in or not the text will change from Sign In or Create Account (if Welcome Guest) or say Sign Out (if logged in, ie: Welcome Friend). HTML: Welcome Guest Welcome Friend JQUERY: if ($('.welcome:contains("Guest")').length > 0) { $("span.acctLink").html("Sign In Or Create An Account"); } else { $('span.acctLink').html("Sign out"); } In JSFiddle, it is validating the script, but the parenthesis' around the else statement are highlighted green. Follow Up Thanks guys for the help I was able to get the jquery to work just as expected, and how I needed it to work. Again, thank you for all the help, here is my final solution (probably a better way to do this - feedback is always welcomed): HTML: Welcome %%GLOBAL_CurrentCustomerFirstName%% ( ) JQUERY: $('.welcome').each(function () { if ($(this).is(':contains("Guest")')) { $(this).find("span.customerMenu").html('Sign In Or Create An Account'); } else { $(this).find('span.customerMenu').html('Sign out'); } });
possible better answer: http://stackoverflow.com/a/26391517
type: Question
has answer: http://stackoverflow.com/a/26391517
accepted answer: http://stackoverflow.com/a/26391533
tagged with: javascript
has comment: http://stackoverflow.com/comment/41436002
answer count: 2
score: 2
has comment: http://stackoverflow.com/comment/41435987
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41436014

http://stackoverflow.com/a/26491573
upvote count: 2
answers question: http://stackoverflow.com/q/26491019
score: 2
has body: You're facing some cross browser issues with events. Try this function numbersOnly(event) { var key = (event.hasOwnProperty('charCode')) ? event.charCode : event.which; // Return "true" for all numbers and the delete (a.k.a., backspace) key. return ((key &gt;= 48 &amp;&amp; key &lt;= 57) || key == 8) ? true : false; }
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26491019

http://stackoverflow.com/comment/41482175
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26417489
score: 0
has text: if your're referring to this ` `, that already exist inside my `body tag`

http://stackoverflow.com/comment/103506545
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26354847
has text: @MattTheNinja Best way to do that is still to let the CDN provide you with the info...
score: 0

http://stackoverflow.com/comment/41380899
comment on: http://stackoverflow.com/q/26361486
has text: Are you doing any odd `$.ajaxSetup()`?
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26443596
has comment: http://stackoverflow.com/comment/41530119
upvote count: 1
type: AcceptedAnswer
has body: check fiddle out @ http://jsfiddle.net/cwL9moqk/4/ Try this: JQuery: $(document).ready(function() { $('#play-video').on('click', function(ev) { $("#video")[0].src += "&amp;autoplay=1"; ev.preventDefault(); }); }); HTML: &lt;div id="playbutton"&gt; &lt;img src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRh0Aw8dopC_x6jfb8wYuiVRoo9Xy0EwWQskikB8MmE_AAepfUZEowIMQ" onclick="this.style.display='none';" id="play-video"&gt; &lt;iframe id="video" width="420" height="315" src="//www.youtube.com/embed/9B7te184ZpQ?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt; CSS: #play-video { width: 200px; height: 200px; border: 0; bottom: 10; left: 0; right: 0; position: fixed; text-align: center; margin: 0px auto; } check fiddle out @ http://jsfiddle.net/cwL9moqk/4/ If you need more help or this is not what your looking for please comment back - i'm happy to help!
has comment: http://stackoverflow.com/comment/41530306
has comment: http://stackoverflow.com/comment/41530408
has comment: http://stackoverflow.com/comment/41589520
type: Answer
has comment: http://stackoverflow.com/comment/41530165
has comment: http://stackoverflow.com/comment/41530161
has comment: http://stackoverflow.com/comment/41530151
has comment: http://stackoverflow.com/comment/41538889
has comment: http://stackoverflow.com/comment/41530160
has comment: http://stackoverflow.com/comment/41530436
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41530384
has comment: http://stackoverflow.com/comment/41530511
accepted answer of: http://stackoverflow.com/q/26442987
has comment: http://stackoverflow.com/comment/41530310
has comment: http://stackoverflow.com/comment/41530279
has comment: http://stackoverflow.com/comment/41587226
answers question: http://stackoverflow.com/q/26442987
has comment: http://stackoverflow.com/comment/41530104
has comment: http://stackoverflow.com/comment/41533759

http://stackoverflow.com/a/26452511
has body: You can cut down the time which your website takes while loading by a huge margin if you use CSS3 background-gradients instead of the large background-images. Talking about your homepage background-image for instance, you can create a background=gradient like this and use the image of the lady as the background-image and position it to the right: #content { display: block; height: 1500px; } body { background: url(http://s29.postimg.org/gxm9ideuf/ladyimage.png) no-repeat right top fixed, -webkit-linear-gradient(left, #ba53a0, #fff); background: url(http://s29.postimg.org/gxm9ideuf/ladyimage.png) no-repeat right top fixed, -o-linear-gradient(right, #ba53a0, #fff); background: url(http://s29.postimg.org/gxm9ideuf/ladyimage.png) no-repeat right top fixed, -moz-linear-gradient(right, #ba53a0, #fff); background: url(http://s29.postimg.org/gxm9ideuf/ladyimage.png) no-repeat right top fixed, linear-gradient(to right, #ba53a0, #fff); } &lt;body&gt; &lt;div id="content"&gt;&lt;/div&gt; &lt;/body&gt;
downvote count: 0
answers question: http://stackoverflow.com/q/26452407
has comment: http://stackoverflow.com/comment/87815355
score: 7
type: Answer
upvote count: 7

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

http://stackoverflow.com/comment/41417888
comment on: http://stackoverflow.com/a/26379529
has text: That doesn't do anything. When I click the drop-down, nothing happens. Was I supposed to do something with var model = as didn't know what to put there
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41559382
comment on: http://stackoverflow.com/a/26444421
has text: Make a bunch of fake URLs for facebook to scrape and then do a javascript redirect to the real place where the user should go after clicking.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26419522
accepted answer of: http://stackoverflow.com/q/26416049
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Assuming the appendColumn function works, as is, on reloads; then you would rewrite it slightly and call it from waitForKeyElements(). You don't need most of that rigamorole, just use class names display and discog for the selector. Like so: waitForKeyElements (".display.discog", appendColumn); function appendColumn(jNode) { var tbl = jNode[0]; // table reference var i; var newCell, newText; var tr = tbl.tHead.children[0], th = document.createElement('th'); // THE REST OF THE FUNCTION IS THE SAME... //...
answers question: http://stackoverflow.com/q/26416049

http://stackoverflow.com/comment/41461964
has text: how about a jquery solution?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26406273
score: 0

http://stackoverflow.com/comment/41663377
has text: I'm not the downvoter - I was making the observation.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26495292
score: 0

http://stackoverflow.com/comment/41605064
type: Comment
type: QuestionComment
has text: Yeah I saw that one too late. Let me have another look :)
comment on: http://stackoverflow.com/q/26485122
score: 0

google-tag-manager
tags question: http://stackoverflow.com/q/26479977
type: Tag
tag name: google-tag-manager
tags question: http://stackoverflow.com/q/26445653
tags question: http://stackoverflow.com/q/26509904

http://stackoverflow.com/comment/88820172
score: 1
type: AnswerComment
has text: @KirstieBallance this question/answer was about a bootstrap plugin. The original post has the solution on how to do it in pure jQuery `$('input:checkbox').not(this).prop('checked', this.checked);`
comment on: http://stackoverflow.com/a/26493042
type: Comment

http://stackoverflow.com/q/26416655
has comment: http://stackoverflow.com/comment/41481175
upvote count: 5
tagged with: angularjs
has answer: http://stackoverflow.com/a/26445438
linked to: http://stackoverflow.com/q/16569841
has answer: http://stackoverflow.com/a/26428448
type: AnsweredQuestion
downvote count: 0
type: Question
answer count: 2
score: 5
tagged with: javascript
has title: Direct Link to URL with route params breaks AngularJS App
possible better answer: http://stackoverflow.com/a/26428448
has body: Im having a problem when I have a direct link to a page that has a param after it. Links from the page work. Im working on a blog app. localhost/blog loads correctly. On that page I have a link to localhost/blog/name-of-article. That link will load correctly. The problem is when I refresh the /blog/name-of-article page or directly go to it. It'll break and not load anything. The Javascript console in chrome just gives the error "Uncaught SyntaxError: Unexpected token &lt; " for all of the javascript files. I also have this problem when the url has a trailing / which seems like a common problem for angular. Not sure if it is related though. relevant part of my routes. app.config(['$routeProvider','$locationProvider', function($routeProvider,$locationProvider){ $routeProvider. when('/',{ templateUrl: '/partials/home.html', controller: 'HomeController as HomeCtrl' }). when('/home',{ templateUrl: '/partials/home.html', controller: 'HomeController as HomeCtrl' }). when('/blog',{ templateUrl: '/partials/blog.html', controller: 'BlogController as blogCtrl' }). when('/blog/:name', { templateUrl: '/partials/article.html', controller: 'ArticleController as articleCtrl' }). otherwise({ redirectTo: '/' }); $locationProvider.html5Mode(true); }]); I'm using Node/Express for the server and api for the angular app. app.use('*', function(req, res){ res.sendFile(__dirname + '/public/index.html'); console.log('page loaded'); }); I also have routes for /api/contact and /api/article.
accepted answer: http://stackoverflow.com/a/26445438
has comment: http://stackoverflow.com/comment/41481652
favorite count: 0

http://stackoverflow.com/a/26475481
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26475189
type: Answer
answers question: http://stackoverflow.com/q/26475189
has body: Following assumes that jQuery UI selectable plugin is being used If so you can try something like this and build on it $(function() { $("#selectable").selectable({ filter: "li" , unselected:mapSelected, selected:mapSelected }); }); function mapSelected(event,ui){ var $selected = $(this).children('.ui-selected'); var text = $.map($selected, function(el){ return $(el).text() }).join(); $('#bad_times').val(text) } DEMO
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/26443139
has body: I need to know how can I delete an uploaded image or delete value of input hidden. For example, into if(document.getElementByID("eliminar").click()). Thanks so much. That is my upload-file.php <?php $uploaddir = './uploads/'; $file = $uploaddir . basename($_FILES['uploadfile']['name']); if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) { echo "success"; } else { echo "error"; } ?>
tagged with: php
has title: Delete image on image uploader
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26443174
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26443174
score: 0
answer count: 1

http://stackoverflow.com/a/26419361
has comment: http://stackoverflow.com/comment/41515453
accepted answer of: http://stackoverflow.com/q/26419317
type: Answer
has comment: http://stackoverflow.com/comment/41558634
answers question: http://stackoverflow.com/q/26419317
has comment: http://stackoverflow.com/comment/41485536
has body: That's because you are reloading the map. You should change the center. So you should modify your code to have 2 functions: 1- To inizialize the map. function initialize(position) { lat = position.coords.latitude; lon = position.coords.longitude; latlon = new google.maps.LatLng(lat, lon) mapholder = document.getElementById('mapholder') mapholder.style.height='250px'; mapholder.style.width='500px'; var myOptions={ center:latlon,zoom:14, mapTypeId:google.maps.MapTypeId.ROADMAP, mapTypeControl:false, navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL} } var map = new google.maps.Map(document.getElementById("mapholder"),myOptions); var marker = new google.maps.Marker({position:latlon,map:map,title:"You are here!"}); } 2- To change the focus. function showPosition(position) { map.setCenter(position); }
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26434444
linked to: http://stackoverflow.com/q/9318674
accepted answer: http://stackoverflow.com/a/26435142
tagged with: forms
tagged with: post
answer count: 2
has body: Can someone tell me why all of a sudden some of my hidden inputs are not posting when I select a "No" option from one of 3 radio buttons on my checkout table? http://jsfiddle.net/#&togetherjs=O6ViKmJQRB Heres my table... Product Total Demo Vacation Home 1 adults, 0 children 2014-11-21 to 2014-11-23 × 1 $1,000.00 Refundable Damage Deposit (not taxed, not included in order total) Please note that the Refundable Damage Deposit must be paid within 45 days of your reserved vacation check-in date. For international creditcard transactions there is an additional 6% surcharge. $ 2,000.00 Cleaning Fee $ 175.00 City Occupancy Tax 8% $ 80.00 Preheat Pool? Yes No $ 200.00 Have Pet(s)? Yes No $ 150.00 Property Damage Protection? Yes No $ 80.00 Reservation Fee 6% $ 101.10 Vacation Package Total $ 1,786.10 Order Total $ 1,786.10 Heres the form with the hidden inputs... And here's the javascript below that is the form...
has comment: http://stackoverflow.com/comment/41513739
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41513947
has comment: http://stackoverflow.com/comment/41513915
has answer: http://stackoverflow.com/a/26435142
has answer: http://stackoverflow.com/a/26434885
tagged with: paypal
has title: Hidden Inputs not Posting?
possible better answer: http://stackoverflow.com/a/26434885
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/41490424
comment on: http://stackoverflow.com/q/26422386
has text: possible duplicate of [JavaScript parseFloat in Different Cultures](http://stackoverflow.com/questions/12694455/javascript-parsefloat-in-different-cultures)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26478475
type: Answer
has comment: http://stackoverflow.com/comment/41593884
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26478240
score: 1
answers question: http://stackoverflow.com/q/26478240
upvote count: 1
type: AcceptedAnswer
has body: You are pretty close, but you don't need the extra if condition you added, this should be sufficient: function loadjscssfile(filename, filetype, pos) { var fileref; if (filetype === "js") { //if filename is a external JavaScript file fileref = document.createElement("script"); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", filename); } else if (filetype === "css") { //if filename is an external CSS file fileref = document.createElement("link"); fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", filename); } if (fileref) { document.getElementsByTagName(pos)[0].appendChild(fileref); } } Give that a shot.

http://stackoverflow.com/a/26499561
has body: Firstly although your function is correctly returning true or false depending on your requirement, you are not returning it to the onsubmit, so your form onsubmit should read onsubmit="return validate(this)" secondly you may experience an interesting bug due to the errors[] being global. If the first form validation fails, then every subsequent form submit will fail also (even if it is valid) as you are not clearing the errors array. Declare the errors[] variable inside the validate function. Also I'm not sure the exact behavior you will get tring to redirect the browser in the validate function. This may stop the form from submitting (i.e. the data collected on the form will not be posted) or the redirect will not work. Personally I wouldn't try this approach, redirect on the server side if everything works the way it should, as it is best practice to validate server side and client side
answers question: http://stackoverflow.com/q/26499263
score: 0
type: Answer

http://stackoverflow.com/a/26488312
has comment: http://stackoverflow.com/comment/41612023
has comment: http://stackoverflow.com/comment/41612239
type: Answer
has comment: http://stackoverflow.com/comment/41611568
has comment: http://stackoverflow.com/comment/41612374
has comment: http://stackoverflow.com/comment/41611713
has comment: http://stackoverflow.com/comment/41612121
accepted answer of: http://stackoverflow.com/q/26487959
has body: plusMinus(''); //'-' plusMinus('-'); //'' plusMinus('abc2-3'); //'abc23' plusMinus('a2-'); //'a2' plusMinus('s23.3'); //s-23.3 function plusMinus(str) { return str.replace(/(^|[^\d\.])(?=[\d\.]*$)/, function ($0) { return $0 === '-'? '' : $0 + '-'; }); } I am just unsure about what to do with something like 33, because now it will return -33. Is this the desired behavior?
has comment: http://stackoverflow.com/comment/41612179
score: 0
answers question: http://stackoverflow.com/q/26487959
type: AcceptedAnswer

http://stackoverflow.com/a/26433741
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26433551
score: 1
upvote count: 1
has body: Not a directly nodejs-related solution. We use a Linux commandline tool Sonic Annotator to extract waveform (peaks) and detect beat in audio files. Its a host that can run VAMP plugins that are quite good at these tasks. Peaks are extracted as a set of floats from 0 to 1 at equal intervals. SHould be rather simple to build an svg on top of that data (with D3 i.e.). I'm not used to nodejs, but the docs says it can run external commands.
has comment: http://stackoverflow.com/comment/41513135
accepted answer of: http://stackoverflow.com/q/26433551

http://stackoverflow.com/comment/41375115
score: 1
type: Comment
comment on: http://stackoverflow.com/a/26358129
has text: the main problem is if you have a input with name as `submit` then that element will be will assigned to the property `form.submit` so now `form.submit` is no longer a function.... thus the attempt to submit will fail
type: AnswerComment

http://stackoverflow.com/a/26449874
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41544051
downvote count: 0
has comment: http://stackoverflow.com/comment/41546863
answers question: http://stackoverflow.com/q/26449725
has comment: http://stackoverflow.com/comment/41620610
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41543532
accepted answer of: http://stackoverflow.com/q/26449725
type: Answer
has comment: http://stackoverflow.com/comment/41548639
has body: scope.$watch("config.propD") will watch reference to function instead of returning value scope.$watch("config.xxx") will watch return value from Math.random because you called function Simplest way is to use $watchCollection documentation but it's not perfect one scope.$watchCollection('config', function(config) { scope.caught++; } ); Another way is to program collection of $watch'ers it's work slightly better: angular.forEach(scope.config, function(value, key) { scope.$watch(function() { return scope.config[key]; }, function(config) { scope.caught2++; }, true); });
has comment: http://stackoverflow.com/comment/41545983
has comment: http://stackoverflow.com/comment/41677337
has comment: http://stackoverflow.com/comment/41621696
has comment: http://stackoverflow.com/comment/41546028

http://stackoverflow.com/a/26370093
has comment: http://stackoverflow.com/comment/41406124
answers question: http://stackoverflow.com/q/26369604
type: Answer
has body: Long post, if you have any questions, please ask A Zombie View is just a view that is not in the DOM, but listens to and reacts to events -- sometimes this behavior is expected, but not typically. If the DOM Event handlers for the view are not properly removed, the view and it's in-memory HTML fragments will not be garbage collected. If the Backbone.Event handlers are not unbound properly, you could have all sorts of bad behavior... such as a bunch of "Zombie" view triggering AJAX requests on models. This problem was very common on older versions of Backbone prior to stopListening and listenTo especially if you shared models between views. In your code, you don't have a Zombie View, because you are properly closing your views. You can see the console.log because you are initializing the second view (and triggering the event still:alive) before you close the first view. To switch views, you are calling: mainApp.viewsManager.rederView(new app.views.test()); Calling new app.views.test() initializes the second view which triggers the event that the first listens to. If you update your code to the following, you won't see the console.log anymore. //baseRouter controller var baseController = { instructions: function() { mainApp.viewsManager.rederView(app.views.instructions); }, beginTest: function(options) { mainApp.viewsManager.rederView(app.views.test); }, }; And update rederView rederView : function(ViewClass, rootEl) { //if DOM el isn't passed, set it to the default RootEl rootEl = rootEl || this.rootEl; //close current view if (this.currentView) this.currentView.close(); //store reference to next view this.currentView = new ViewClass(); //render next view $(rootEl).html(this.currentView.render().el); }, If you remove this line from your close method, you will have a zombie view and should see the console.log. //unbind any model and collection events that the view is bound to this.stopListening(); Zombie View Example In the following code, I am creating 100 views, but…
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26369604
score: 6
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26416994
has answer: http://stackoverflow.com/a/26417118
has comment: http://stackoverflow.com/comment/41482584
downvote count: 0
has body: I want if list equal 1 remove buttons, Remove buttons from ID count 1 list, If have another ID count > 1 don't remove buttons, Using jQuery, var $this = jQuery(this); var $getList = jQuery('#count li'); var $sliderButtons = jQuery('#count .slider_next, #count .slider_prev'); if($getList.length == 1){ $sliderButtons.remove(); }; I code want to working with only list == 1 remove buttons if equal 1 list, remove buttons. if equal > 1 list, don't remove buttons. hello Thanks
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26417118
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26417931
has title: jquery if list equal 1 remove buttons
has comment: http://stackoverflow.com/comment/41482618
has comment: http://stackoverflow.com/comment/41481378
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41481288
has answer: http://stackoverflow.com/a/26417931
type: Question
answer count: 2

http://stackoverflow.com/comment/41577075
comment on: http://stackoverflow.com/q/26424366
has text: @RobW: i sent you an email today. Please let me know. Thanks a lot!!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41400537
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26371776
type: Comment
has text: ... It 's just a detail ... everyone uses the syntax they prefer, but as you learn all the possibilities... you are welcome James :).

http://stackoverflow.com/q/26431265
has comment: http://stackoverflow.com/comment/41507875
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26432541
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26939341
favorite count: 0
possible better answer: http://stackoverflow.com/a/26432541
has title: When tableDnD is disabled it leaves residual css and I can't clear the css
tagged with: css
type: AnsweredQuestion
has body: tableDnD (table Drag and Drop) is a jQuery plugin I'm using to be able to re-order rows in my html table. It's a pretty cool library, but the fact that you can click, drag, and drop rows -- disables the ability to select that row by clicking -- it thinks you might be starting a drag and drop, or doing a 0-distance drag. So you can view my example here, and see what I'm talking about -- http://jsfiddle.net/du31ufts/5/ It starts off as disabled, so enable the row re-ordering and see the library. Then, try to select just one row in the middle. The only way the blue highlighting indicating selection shows up is if you click outside the bounds of the table, and thus you would only be able to select starting from the bottom or top, and not be able to select one row at a time. I need to select these rows to be able to copy-paste these rows into excel. I've tried looking into the library itself and detaching $('__dragtable_disable_text_selection__'), I've tried jquerys removeAttr for unselectable, I've tried $('.dragtable-sortable').attr('-moz-user-select', 'none'); Nothing is re-enabling my ability to be able to click and select single rows. I'd like to do this without modifying tableDnD functions. Which CSS properties could be affecting my ability to select table rows?
score: 1
accepted answer: http://stackoverflow.com/a/26939341
upvote count: 1
type: Question
tagged with: html-table
answer count: 2

http://stackoverflow.com/comment/41454017
score: 0
type: Comment
type: QuestionComment
has text: So all works properly, now?
comment on: http://stackoverflow.com/q/26383040

http://stackoverflow.com/a/26429603
type: Answer
has comment: http://stackoverflow.com/comment/41504175
answers question: http://stackoverflow.com/q/26429416
has body: Seems like firefox uses the image cache and chrome doesn't. I have used magnific popup, http://dimsemenov.com/plugins/magnific-popup/ It has a built-in prefetch for galleries.
score: 0

http://stackoverflow.com/comment/41379659
type: Comment
comment on: http://stackoverflow.com/a/26360743
has text: See the edited answer it should fix the concatenating problem
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41602534
score: 0
type: Comment
type: QuestionComment
has text: What is the content of `ViewBag.ApplicationName` when it's output to the view? Can you debug it and see it's value? And what URL does it output to the page?
comment on: http://stackoverflow.com/q/26483633

http://stackoverflow.com/q/26494855
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41623025
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26494886
has comment: http://stackoverflow.com/comment/41623030
has title: Use HTML Search bar input to call javascript function
type: Question
tagged with: forms
has body: So I have a navbar form, where I basically want someone to input either a 3 digit number or 5 digit number, and so I am trying to use what is in the search bar input and call the function using that number, and depending on that open up a certain link. I can't get it to work though, I am having trouble with my function being called, and then as a result of the button being clicked, it opens the appropriate link. I'd appreciate any help. HTML: Javascript: var input = document.getElementById('submit'); function searchButton() { var str; if (input.length == 3) { str = '#/root/home/three/' + input.value; } else if (input.length == 5) { str = '#/root/home/five/' + input.value; } else{ alert('Invalid input'); } }; http://jsfiddle.net/BootstrapOrBust/wg1s25bq/3/
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26494886

http://stackoverflow.com/q/26371478
has answer: http://stackoverflow.com/a/26371949
answer count: 3
has answer: http://stackoverflow.com/a/26371551
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26371549
has body: Here is the html code: &lt;li&gt; &lt;h3 class="title"&gt; &lt;a href="http://somewebsite.com/pilots/stanley-robert-austin"&gt;Stanley Robert Austin&lt;/a&gt; &lt;/h3&gt; &lt;div class="search-snippet-info"&gt; &lt;p class="search-snippet"&gt;... 19/03/1897 First Name:&amp;nbsp; Stanley &lt;strong&gt;Robert&lt;/strong&gt; Date of Death:&amp;nbsp; Unknown Surname:&amp;nbsp; Austin ... Place of Birth:&amp;nbsp; Foxton, Manawatu Stanley &lt;strong&gt;Robert&lt;/strong&gt; Austin Royal Aero Club Cert. No.:&amp;nbsp; 5359 ...&lt;/p&gt; &lt;p class="search-info"&gt;The_107s - &lt;a href="/users/admin" title="View user profile." class="username"&gt;admin&lt;/a&gt; - 15/10/2014 - 11:14&lt;/p&gt; &lt;/div&gt; &lt;/li&gt; &lt;li&gt; &lt;h3 class="title"&gt; &lt;a href="http://somewebsite.com/pilots/philip-robert-going"&gt;Philip Robert Going&lt;/a&gt; &lt;/h3&gt; &lt;div class="search-snippet-info"&gt; &lt;p class="search-snippet"&gt;... of Birth:&amp;nbsp; Unknown First Name:&amp;nbsp; Philip &lt;strong&gt;Robert&lt;/strong&gt; Date of Death:&amp;nbsp; Unknown Surname:&amp;nbsp; Going Place of Birth:&amp;nbsp; Unknown Philip &lt;strong&gt;Robert&lt;/strong&gt; Going Royal Aero Club Cert. No.:&amp;nbsp; 3865 ...&lt;/p&gt; &lt;p class="search-info"&gt;The_107s - &lt;a href="/users/admin" title="View user profile." class="username"&gt;admin&lt;/a&gt; - 15/10/2014 - 11:14&lt;/p&gt; &lt;/div&gt; &lt;/li&gt; What I am trying to do is get the title link which is different for every list item, and repeat it as a button at the bottom of every list element. Here is what I came up with so far: // Add button to search results. Copy from title // Search page code. if ($('body').hasClass('page-search-node')) { $('ol.search-results li h3 a') .each(function() { var n = jQuery(this).find("ol.search-results li h3 a").html(); $(n).clone().insertAfter('.search-snippet-info'); }); } Can't get it to work. Any help is appreciated, thanks!
type: Question
has title: For each h3 link, copy to bottom of list item
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41439631
comment on: http://stackoverflow.com/q/26393471
has text: A string mask is a sequence of values that overlays the string to indicate whether or not to show characters at certain positions. For the string "BAD", to show say "-A-" the mask is "010". If treated as a binary number, it can be represented efficiently in some other base, say "2" in base 10. So step 1 is to generate the mask, step 2 is to apply it to the saved string. Incidentally, you don't have to convert the "original" string to an array, you can use [*charAt*](http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.4) to get the character at a particular index.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41487341
has text: Nothing is obviously wrong, and form submission is prevented [when I test it](http://jsfiddle.net/ev6x1f7g/). The problem, most likely, has to do with how (and when) you are loading the JavaScript into the page. You haven't shown us what script tags you are using or where they are in the page so we can't say for sure.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26420648

http://stackoverflow.com/a/26391958
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41437191
score: 1
answers question: http://stackoverflow.com/q/26391841
downvote count: 0
has body: Well you would need to loop through the keys of the second object. this.offerCategories = _.map(_.keys(this.offers), function(offer) { return { title: _.keys(this.offers[offer])[0] }; });
has comment: http://stackoverflow.com/comment/41438642

http://stackoverflow.com/comment/41616711
type: AnswerComment
comment on: http://stackoverflow.com/a/26490279
score: 0
type: Comment
has text: Hi Tomgranerod, I just saw your answer but it seems that msgTarget : 'side', would still remove the focus from the field. msgTarger: 'under' seems to solve the problem but I guess it would break the layout of a Password form field :(

http://stackoverflow.com/comment/41527142
score: 0
has text: I don't understand what you mean by "centred around the value `yScale(d)`" -- this is different for each bar, no? There's no single value to be centred around?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26409687

http://stackoverflow.com/q/26419801
tagged with: angular-ui-router
tagged with: javascript
has title: Acess parameters of parent state from child state in stateChangeStart
accepted answer: http://stackoverflow.com/a/26425934
answer count: 2
possible better answer: http://stackoverflow.com/a/26422500
has answer: http://stackoverflow.com/a/26422500
favorite count: 0
has answer: http://stackoverflow.com/a/26425934
upvote count: 3
tagged with: angularjs
has body: Is there any way to get the parameters from parent state. My states look like this. $stateProvider .state('home', { url: '/home/:param1', template: ' home<ui-view /> ', data: { parentdata: 'parentdata' } }) .state('home.child', { url: '/child/:param2', template: ' index ', data: { childdata: 'childdata' } }) }) I want to access the data value of parent state from child state. $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) { var tosateParam = toState.data.mycustomparam; //If this is the child state, how can I access the parent state param //may be like this toState.parent.data.parentParam }); If my current state name is "ABC.childstate", how can I access the parameters from ABC state.
downvote count: 0
linked to: http://stackoverflow.com/q/21097820
type: Question
type: AnsweredQuestion
score: 3

http://stackoverflow.com/a/26428010
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42199381
score: 4
has comment: http://stackoverflow.com/comment/41502122
has comment: http://stackoverflow.com/comment/42198244
has comment: http://stackoverflow.com/comment/42198942
has comment: http://stackoverflow.com/comment/41501417
downvote count: 0
has comment: http://stackoverflow.com/comment/42199426
has comment: http://stackoverflow.com/comment/42199390
has comment: http://stackoverflow.com/comment/41501750
accepted answer of: http://stackoverflow.com/q/26373322
has body: Here is a way to do it using a custom directive. I could not match your data model exactly, but this should be able to do what you want. This is what the object model looks like: { "viewValue": "\n abc\n \n abc\n ", "modelValue": [ { "innerText": "abc", "index": 0 }, { "obj": "abc", "index": 1 }, { "innerText": "abc", "index": 2 } ] } viewValue is the html that makes up the contenteditable and what you described is in modelValue. Here we set a bunch of event listeners (inspired by this question) and construct the model. elm.bind('blur keyup paste input', function() { scope.$apply(function() { var new$viewValue = { viewValue: elm.html(), modelValue: [] } var index = 0; angular.forEach(elm[0].childNodes, function(value, index) { if (value.nodeName === "INPUT") { if (value.value) { new$viewValue.modelValue.push({ obj: value.value, index: index }); } else { value.parentNode.removeChild(value); } } else if (value.nodeName === "#text") { new$viewValue.modelValue.push({ innerText: value.textContent.trim(), index: index }); } index++; }); ctrl.$setViewValue(new$viewValue); }); }); What this does is get all the childNodes of the contenteditable div and checks to see if they are of type input or text and adds the appropriate values to the model. We also store the html state of the div to allow us to redraw the view. The render function is called to draw the view, and we set the view's html to the html that we stored in the model. ctrl.$render = function() { elm.html(ctrl.$viewValue.viewValue); //Untested code that should add the text back into the fields if the model already exists angular.forEach(elm[0].childNodes, function (value, index) { if (value.nodeName === "INPUT") { if (ctrl.$viewValue.modelValue[index].obj) { value.value = ctrl.$viewValue.modelValue[index].obj } else { value.parentNode.removeChild(value); } } }); }; EDIT: Here is a way of having two way data-binding: scope.getViewValue = function() { var tempDiv = document.createElement("div"); angular.forEach(ctrl.…
has comment: http://stackoverflow.com/comment/42199312
has comment: http://stackoverflow.com/comment/42207842
type: Answer
answers question: http://stackoverflow.com/q/26373322
has comment: http://stackoverflow.com/comment/41501356
has comment: http://stackoverflow.com/comment/41501477
has comment: http://stackoverflow.com/comment/41774616
has comment: http://stackoverflow.com/comment/41501137
has comment: http://stackoverflow.com/comment/41502063
has comment: http://stackoverflow.com/comment/42199335
has comment: http://stackoverflow.com/comment/41501113
upvote count: 4
has comment: http://stackoverflow.com/comment/41501490

http://stackoverflow.com/comment/41397991
type: Comment
comment on: http://stackoverflow.com/q/26370197
has text: There is no `foreach` keyword in JavaScript.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26468594
upvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/41575226
has title: CheckBoxList - check all
has comment: http://stackoverflow.com/comment/41574804
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26471560
has body: I have CheckBoxList when I have one default value called "Select All" and rest items binded from database: <asp:CheckBoxList runat="server" ID="chkBxLstSystemTypes" CssClass="chkBxList" RepeatDirection="Horizontal" RepeatColumns="10" TabIndex="2"> <asp:ListItem Value="SelectAll">Select All</asp:ListItem> I would like to have JavaScript or jQuery function which will check all check boxes when user clicks "Select all" and deselect the check boxes when user deselects the "Select All". -- EDIT 1 Rendered HTML: Select All ASG AVP CDR CMS CUCM_Logins CUCM_Subscribers Cybertech eHealth Intuity MMSMailbox MMSUser NICE Perform PBX UNITY VoIP WebEx
linked to: http://stackoverflow.com/q/18537609
has comment: http://stackoverflow.com/comment/41574961
answer count: 2
has comment: http://stackoverflow.com/comment/41575466
possible better answer: http://stackoverflow.com/a/26471560
downvote count: 1
accepted answer: http://stackoverflow.com/a/26471272
tagged with: jquery
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/41579493
has answer: http://stackoverflow.com/a/26471272
type: AnsweredQuestion

http://stackoverflow.com/q/26495880
tagged with: ajax
has answer: http://stackoverflow.com/a/26496006
type: Question
tagged with: php
has title: AJAX post - {"readyState":0,"responseText":"","status":0,"statusText":"error"}
has comment: http://stackoverflow.com/comment/41625149
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41625030
has body: I have this javascript but it is not working : I receive the following error : {"readyState":0,"responseText":"","status":0,"statusText":"error"} This script is included in a webpage of my site which is in a subdirectory of the site. From my debugging, I do not understand where the error can come from... (since I do quite exactly the same for the index webpage of my site with another javascript which looks almost the same) $(document).ready(function() { //if submit button is clicked $('#filterbtn').click(function () { //Get the data from all the fields var a = JSON.stringify( $("#multiselect").val() ); var b; if ($('#b').prop('checked')) { b = 0; } else { b = 1; } var c = JSON.stringify($("#Sliderstart").slider("value")); var d = JSON.stringify($("#Sliderend").slider("value")); //organize the data properly var data = 'b=' + b + '&amp;c=' + c + '&amp;d=' + d + '&amp;a=' + a; //start the ajax $.ajax({ url: "./filter.php", type: "POST", data: data, crossDomain: true, cache: false, success: function (html) { document.getElementById("message").innerHTML=html; }, error: function (e) { alert(JSON.stringify(e)); } }); return false; }); }); Thank you guys ! Cheers
tagged with: jquery

dynamics-crm-2011
tags question: http://stackoverflow.com/q/26383390
tag name: dynamics-crm-2011
type: Tag
tags question: http://stackoverflow.com/q/26504568

http://stackoverflow.com/q/26415626
has title: Three.JS Flipping Collada Models
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41839405
tagged with: three.js
has comment: http://stackoverflow.com/comment/41572022
linked to: http://stackoverflow.com/q/19625199
has body: I am currently using a matrix to mirror my Collada models. I have posted this question before: Flip Normals Three.JS after flipping geometry and referenced this one: ThreeJS geometry flipping The problem is that I can't flip the geometry before adding it to a mesh to avoid the inverted material, since it is a Collada model, which already contains the mesh. What would be the best way to go about mirroring a Collada model while maintaining its material? I thought I could do the following, but I didn't know how to target the materials properly to change them (my new geometry does not have a new material applied to it). Also my models are fairly complex and contain a lot of hierarchies. The result is the flipped Collada model, with an inside out material. var mS = (new THREE.Matrix4()).identity(); var newGroup = new THREE.Object3D(); var newMesh; mS.elements[5] = -1; mesh.traverse(function(child){ if (child.geometry!==undefined) { if (child instanceof THREE.Mesh) { child.geometry.applyMatrix(mS); child.geometry.verticesNeedUpdate = true; child.geometry.normalsNeedUpdate = true; child.geometry.computeVertexNormals(); child.geometry.computeBoundingSphere(); child.geometry.computeFaceNormals(); child.geometry.computeVertexNormals(); if (child.material.materials!=undefined) { for (var i; i&lt;child.material.materials.length; i++) { child.material.materials[i]=newMaterial; child.material.materials[i].wrapAround = true; child.material.materials[i].side = THREE.DoubleSide; } } var geom = child.geometry.clone(); newMesh = new THREE.Mesh(geom, child.material); newMaterial.needsUpdate = true; newGroup.add( newMesh ); }; }; }); return newGroup; Thanks! UPDATE I had a typo in my code. Everything works. var i; should be var i=0;
answer count: 0
linked to: http://stackoverflow.com/q/25795538
has comment: http://stackoverflow.com/comment/41481659
has comment: http://stackoverflow.com/comment/41483232
tagged with: collada
type: Question
tagged with: mesh
has comment: http://stackoverflow.com/comment/41507387
tagged with: javascript
has comment: http://stackoverflow.com/comment/41480111
score: 0
has comment: http://stackoverflow.com/comment/41516513

http://stackoverflow.com/comment/41537677
type: Comment
has text: No problem Limon, whatever works best for you. However, you should not use the TriggerField with ExtJS 5 as this Class has been deprecated since 5.0. For versions from 5.0 up you should use the triggers configuration in the Textfield class.
score: 1
comment on: http://stackoverflow.com/a/26447536
type: AnswerComment

http://stackoverflow.com/q/26373607
answer count: 3
has answer: http://stackoverflow.com/a/26386793
linked to: http://stackoverflow.com/q/8217346
tagged with: cubic
linked to: http://stackoverflow.com/q/7348009
type: AnsweredQuestion
tagged with: css-transitions
has answer: http://stackoverflow.com/a/26374299
linked to: http://stackoverflow.com/q/23451801
has title: Get x on Bezier curve given y
type: Question
has answer: http://stackoverflow.com/a/26375055
accepted answer: http://stackoverflow.com/a/26374299
has body: I have a Bezier curve: (0,0), (.25,.1), (.25,1), and (1,1). This is graphically seen here: http://cubic-bezier.com/#.25,.1,.25,1 We see on the x axis is time. This is my unknown. This is a unit cell. So I was wondering how can I get x when y is 0.5? Thanks I saw this topic: y coordinate for a given x cubic bezier But it loops, I need to avoid something loops So I found this topic: Cubic bezier curves - get Y for given X But I can't figure out how to solve a cubic polynomial in js :(
tagged with: javascript
tagged with: bezier
possible better answer: http://stackoverflow.com/a/26386793
score: 0

http://stackoverflow.com/comment/42092638
type: Comment
comment on: http://stackoverflow.com/a/26399213
score: 0
type: AnswerComment
has text: i see that drag gets stuck for chromium browser in android how to solve it

http://stackoverflow.com/a/26511060
accepted answer of: http://stackoverflow.com/q/26510922
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26510922
has body: As inner() is defined inside of module() scope, you can't access it outside of this scope.. This pattern is used to implement private methods of module().

http://stackoverflow.com/q/26475489
type: Question
accepted answer: http://stackoverflow.com/a/26475675
answer count: 1
downvote count: 0
tagged with: meteor
favorite count: 0
has title: dynamically adding route with iron router in javascript
tagged with: iron-router
score: 1
upvote count: 1
type: AnsweredQuestion
has body: I want to make a route with iron router, but for some reason it's not rendering anything at all. Details ...and my Router.map function has this: this.route('strategy', { path: 'strategy', data: function(){ return Strategies.findOne(this.params._id); }, action:function(){ this.render(); } }); The link apparently links correctly to http://localhost:3000/strategy?_id=jShHwfv4fM7oxnrg2 ..but for some reason it's not rendering anything at all (resulted template is empty). Also, I tried making this: Details ...but that actually executes the route immediately. What I want is to just render the link. What am I missing here? edit following 1st answer: i know about pathFor but (maybe i wasnt clear in my explanation) - the anchor code you see above is in a JS function (file.js), im not talking about a html file where i can easily use pathFor. This anchor is generated dynamically in a JS function. I cant use handlebars code in a js function afaik
tagged with: javascript
has answer: http://stackoverflow.com/a/26475675

http://stackoverflow.com/q/26414894
has comment: http://stackoverflow.com/comment/41478003
answer count: 0
has body: I want to show table in div, div height and width specified by user. If table height and width increases by div height and width then scroll bar is added. When i resize div by jquery resizable method then table height and width will be change.IN short i want to show table in div. I write code for this, But its not working correctly. Html code:- http://jsfiddle.net/uhvL6fpe/ JQuery:- $(function(){ $("grid_1").resizable().draggable(); });
type: Question
has comment: http://stackoverflow.com/comment/41477841
tagged with: javascript
tagged with: jquery
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41477948
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41478457
tagged with: css
has title: Table height automatically increase in div

http://stackoverflow.com/comment/41686374
type: QuestionComment
comment on: http://stackoverflow.com/q/26360254
has text: no' it is not working, i have tried putting a number of headers, taken from the request header from AMQ management gui message sender.
score: 0
type: Comment

http://stackoverflow.com/q/26371049
has comment: http://stackoverflow.com/comment/41400029
has title: embed javascript game in facebook news feed
downvote count: 1
upvote count: 0
tagged with: javascript
tagged with: interactive
accepted answer: http://stackoverflow.com/a/26371540
type: AnsweredQuestion
favorite count: 0
score: -1
type: Question
tagged with: facebook
has comment: http://stackoverflow.com/comment/41407894
has comment: http://stackoverflow.com/comment/41423099
answer count: 1
has body: How do I embed an interactive javascript game in facebook news feed? I want to a javascript game to run in FB news feed so that people could play directly inside the news feed without opening another window. So far, I have seen only flash could be played within news-feed page.
has answer: http://stackoverflow.com/a/26371540

http://stackoverflow.com/comment/41402611
type: Comment
comment on: http://stackoverflow.com/a/26372924
score: 0
type: AnswerComment
has text: I think you may have misunderstood the question. It's more like `var obj = {health: 100}; var array1 = [obj]; var array2 = [obj]; array1[0].health -= 50; console.log(array2[0].health); /* outputs 50 */` - He's saying that he has appended the same object to multiple different arrays, and modifying the object in one array results in the object being modified in all arrays.

http://stackoverflow.com/a/26395089
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26394771
answers question: http://stackoverflow.com/q/26394771
type: AcceptedAnswer
downvote count: 0
score: 1
has body: You can use document.referrer to get the referral page. Once you get that from your corporate site you can probably put in some logic to redirect to the corporate site if it doesn't match where you're expecting. Something tells me this isn't the best way to handle user authentication, but I'm new to that aspect. Note: I'm on my phone, so excuse lack of code tags for that tiny bit up there.

http://stackoverflow.com/q/26512309
type: AnsweredQuestion
tagged with: c#
has title: PerformClick on RadioButtonList ListItem
type: Question
has comment: http://stackoverflow.com/comment/41654776
answer count: 1
tagged with: javascript
tagged with: asp.net
score: 0
tagged with: radiobuttonlist
accepted answer: http://stackoverflow.com/a/26524393
has body: I have a RadioButtonList with a javascript onclick function that is triggered when a user click on it. It's possible to have a performclick on the entire radiobuttonlist or on one single ListItem as is possible on a single RadioButton? I've a GridView with an hidden checkbox that I use to know if user have modified something on that row: &lt;asp:TemplateField ShowHeader="false" HeaderStyle-BackColor="White"&gt; &lt;ItemStyle BorderColor="White" Width="5%" /&gt; &lt;ItemTemplate&gt; &lt;asp:CheckBox runat="server" Style="display: none" Text="" ID="chkDaPa" Checked="false" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; on the gridview ondatabound I assign on a radiobuttonlist a javascript that check that hidden checkbox, so I know that I have to save that row: rdDaPa.Attributes.Add("onclick", "$('#" + chkDaPa.ClientID + "').attr('checked', true);"); &lt;asp:TemplateField&gt; &lt;ItemStyle HorizontalAlign="Center" Width="10%" Wrap="false" /&gt; &lt;ItemTemplate&gt; &lt;asp:RadioButtonList RepeatLayout="Flow" ID="rdDaPa" runat="server" RepeatDirection="Horizontal" SelectedValue='&lt;%#Eval("DaPa")%&gt;'&gt; &lt;asp:ListItem Text="SI" Value="True"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="NO" Value="False"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="" Text="" style="display: none" /&gt; &lt;/asp:RadioButtonList&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; And it's working fine if the user manually set a value on the radiobuttonlist on some row. The problem occur because that's a button that automatically set all the radiobuttonlist on a value, but in that case the javascript isn't triggered: RadioButtonList rdDaPag = (RadioButtonList)riga.FindControl("rdDaPa"); rdDaPa.SelectedValue = "True"; Because no one has clicked on it. I've seen this: http://msdn.microsoft.com/en-us/library/system.windows.forms.radiobutton.performclick%28v=vs.100%29.aspx and I think that's what I need, but it's possible to use on a ListItem instead of a RadioButton?
tagged with: onclick
has answer: http://stackoverflow.com/a/26524393

http://stackoverflow.com/q/26376966
tagged with: canvas
has comment: http://stackoverflow.com/comment/41426300
has answer: http://stackoverflow.com/a/26377755
tagged with: javascript
tagged with: data-structures
has comment: http://stackoverflow.com/comment/41422069
has answer: http://stackoverflow.com/a/26382316
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41409410
has body: After trying a couple different HTML5 frameworks, I've always found pure JS the most appealing. However, I am uncertain about the way I'm structuring it. Currently, I have been declaring different objects as global variables as such: var titlescreen = new Titlescreen(); var fps = new FPSTracker(); var input = new Input(); var background = new Background(); var shops = new Shops(); var chunkhandler = new ChunkHandler(); var explosionhandler = new ExplosionHandler(); var ui = new UI(); var world = new World(); var player = new Player(); var joystick = new Joystick(); My main problem with this is how I have them communicate with each other. For example, the Player class accesses some of world's functions by simply using it's name (world.functionINeedToUse();). Coming from a Java background, this gives me a very bad vibe as it depends on the declaration of this global variable with the specific name. Though I've found JS to be a more forgiving language, this still does not feel right. I haven't found any problems with it, so far. Are there more effective ways to structure a game? What about the problem with player/world?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16063394
has title: Structuring a HTML5 game without a framework
type: Question
score: 0
answer count: 2

http://stackoverflow.com/q/26407977
has comment: http://stackoverflow.com/comment/41466876
has title: Image not loading in IE but loads in all other browsers
tagged with: google-chrome
type: Question
tagged with: internet-explorer
tagged with: javascript
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41467282
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41466668
has body: I have a form where user can upload images of their interest to lock them in the UI Logo place. So, when uploading these images through form, once after the user uploads and fires save the button which displays a 40*40px image in the form to display what the user has uploaded previously. This 40*40px image clearly visible in all browsers but not in IE8, IE9, IE11. I have tried many solutions after searching around and got tired. Can any one help why this not happening in IE. Thanks in advance. Here is the form with "Img" tag inside <form:form id="submitform" action="updatePolicyLogo.non" name="policyLogosForm" modelAttribute="policyLogos" method="POST" autocomplete="off" enctype="multipart/form-data"> <label for="policyId" title='<spring:message code="tt.mysettings.policy" />'><spring:message code="label.policy" /> <form:select id="policyId" path="policyId" style="width:160px;"> <form:options items="${policies}" itemValue="value" itemLabel="label" htmlEscape="false" /> </form:select> <spring:message code="label.policy.logo.current" /> <spring:message code="label.policy.logo.none" /> <spring:message code="label.policy.logo.new" /> <form:input id="policyLogo" path="policyLogo" style="width:160px;" type="file" accept="image/*" /> <form:errors path="policyLogo" /> <input type="submit" class="button" value='<spring:message code="label.button.save" />' /> i am adding the image through Jquery here. $("#existingImageId").attr("src", "getLogo.ams?id="+selectedPolicyId).bind('load', function(event) { event.preventDefault(); $("#noneLogo").css('display', 'none'); $("#existingImageId").css('display', 'block'); $("#deleteImg").css('display', 'block'); alert("src"); }); In Chrome, I get the following HTML after loaded Policy All Policies Current Logo No Logo Selected. New Logo I also found some related issues which can't have a solution here http://madebyted.com/blog/using-images-as-labels-inside-forms-in-internet-explorer-11/ and https://github.com/desandro/imagesloaded/issues/4…
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26419283
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26419324
linked to: http://stackoverflow.com/q/18903547
score: -1
has comment: http://stackoverflow.com/comment/41485064
has comment: http://stackoverflow.com/comment/41485120
has title: How to enable share video on facebook from my website
upvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26419324
favorite count: 0
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
has body: I have a website with HTML5 videos. I wanted to make a button for each video to share on facebook. &lt;video controls style="width:970px;"&gt; &lt;source src="videos/video2.mp4" type="video/mp4"&gt; &lt;source src="videos/video1.webm" type="video/webm"&gt; Your browser does not support the video tag. &lt;/video&gt; How can I do that?
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/41383242
comment on: http://stackoverflow.com/q/26361896
score: 0
has text: Thanks Tushar for your help.Really appreciated. I have voted up your post. Actually I found Anton's answer more efficient. :)
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26390226
score: 0
answers question: http://stackoverflow.com/q/26389712
has body: I solved the problem. The Javascript library was being imported multiple times by Statamic due to the use of an alternative template file with repeat (unnecessary) code. Removing that code solved the problem. So KevinB was pretty close with his suggestion. Thanks guys!
type: Answer

http://stackoverflow.com/q/26372479
has comment: http://stackoverflow.com/comment/41401771
has answer: http://stackoverflow.com/a/26374460
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: porting
tagged with: css
tagged with: vb.net
type: Question
tagged with: javascript
score: 0
answer count: 2
has body: I'm taking an old VB.NET toy that I made in 2006 and trying to convert it to HTML/JavaScript/CSS3, so its functionality can be embedded in a page on Tumblr. However, I've managed to get the item 99% converted from its VB.NET form to a JavaScript form. The problem is, the item won't code. This below is the HTML of the body of my web port: Jewelry Jiddy's Wedding Ring Store Model Name Hearts in Lavaflow Scar of Africa Monkey's Uncle Flattering Fool Steal Deal Arwee Thearyet Checkbouncer Worth-Your-Soul The Rough Canyu Dr. Special Viderzhen Fiberglass Chicken Pink Puma Limit 1 Model Type per Sale Number of Items 1 2 3 4 5 Limit 5 per Sale Sales Code Normal 25% Off Sale 40% Off Sale 15% Senior Discount Total Amount Due Here's the JavaScript: I'm no JavaScript expert, but the script looks well-formed to me. So I can't quite understand why it is that it won't execute at all. When everything works right, the Total Amount Due field will display a numeric value, which I can then parse as money once I know I get a readout. But so far, I don't get any results. Does anyone have any suggestions to turn this thing around? Originally, this was part of a class assignment a decade ago. I compiled it in VB.NET back then, with everything working fine. I've removed the game-like "cheat" codes that gave funny results, since I want to get a basic script to work before making it cute. And no, I don't remember exactly how I did it in VB.NET. I haven't been doing that level of program compilation since 2007. UPDATE: Thank you for the "window." advice. But now there's a new problem: it doesn't remember selections. For example: When I set it to "Scar of Africa," it reverts to "Hearts in Lavaflow." When I set the radio buttons to two, they reset to 1. When I select a sale, I get redirected to the Normal mode. How do I get data choices retained before output? PS: I've removed the CSS, as some were saying it was getting in the way and is not part of the problem anyway.
has answer: http://stackoverflow.com/a/26374934
linked to: http://stackoverflow.com/q/2901102
has title: Why is this ported JavaScript from VB.NET not executing?
has comment: http://stackoverflow.com/comment/41402923

nan
tags question: http://stackoverflow.com/q/26442726
tag name: nan
type: Tag
tags question: http://stackoverflow.com/q/26426298

http://stackoverflow.com/q/26389311
has comment: http://stackoverflow.com/comment/41449559
type: UnansweredQuestion
tagged with: three.js
has comment: http://stackoverflow.com/comment/41432154
has comment: http://stackoverflow.com/comment/41437099
has comment: http://stackoverflow.com/comment/41434721
answer count: 0
has comment: http://stackoverflow.com/comment/41432949
type: Question
has title: Rotation round any center in Three.js
tagged with: javascript
has comment: http://stackoverflow.com/comment/41435181
score: 0
has comment: http://stackoverflow.com/comment/41434894
has body: Rotation happens round the center of a body. Thus both bodies of the end move: var geometry = new THREE.CylinderGeometry( 10, 10, 200, 24 ); var material = new THREE.MeshLambertMaterial( { color: 0x00ffff } ); gunTrunk = new THREE.Mesh( geometry, material ); scene.add( gunTrunk ); gunTrunk.rotation.z = Math.PI / 2; gunTrunk.position.set( 0, 0, 100 ); direction = new THREE.Vector3( 1, 0, 0 ).normalize(); gunTrunk.rotateOnAxis( direction, Math.PI / 3 ); I would like that one of the ends remained motionless. Whether there is an easy and effective way of rotation of a body round any axis in any point?
linked to: http://stackoverflow.com/q/26287238

http://stackoverflow.com/q/26365757
tagged with: javascript
has body: Is there something like Perls /e modifier in JavaScript to integrate simple arithmetic like multiplication and addition to a regular expression that is evaluated with the RegExp object? I want to transfer a pattern for URL generation which may includes concatenation, multiplication and division of strings and replaced integer variables that is more secure than to transfer and evaluate Javascript code.
has comment: http://stackoverflow.com/comment/41389004
tagged with: arithmetic-expressions
has comment: http://stackoverflow.com/comment/41389436
has title: Javascript: /e modifier for RegExp in Javascript
tagged with: regex
favorite count: 0
has comment: http://stackoverflow.com/comment/41389369
has comment: http://stackoverflow.com/comment/41389134
has answer: http://stackoverflow.com/a/26365863
accepted answer: http://stackoverflow.com/a/26365863
downvote count: 1
type: AnsweredQuestion
score: 2
upvote count: 3
type: Question
tagged with: perl
answer count: 1
tagged with: url

http://stackoverflow.com/q/26354233
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/2161388
accepted answer: http://stackoverflow.com/a/26354334
duplicate of: http://stackoverflow.com/q/2161388
has title: calling one function in an .html into another .html
tagged with: iframe
downvote count: 2
has body: Hi i want to call a function from 1 .html file to another .html file Parent.html Child.html button So when i hit the parent .html page a frame will open with the button in that frame......and when i click that button it should call that functiona and show the alert in parent.html file
type: Question
type: AnsweredQuestion
score: -2
has comment: http://stackoverflow.com/comment/41367852
upvote count: 0
has answer: http://stackoverflow.com/a/26354334
linked to: http://stackoverflow.com/q/17950598
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26498842
linked to: http://stackoverflow.com/q/14220321
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26498860
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26498860
has title: Angular JS access $http data from factory in controller
duplicate of: http://stackoverflow.com/q/14220321
upvote count: 0
linked to: http://stackoverflow.com/q/19121918
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41630715
has body: I am starting out with angular JS and I have created a factory with student data. The student data looks like the below. { "male": [ ["John", "Smith", "2000-10-10"], ["James", "Smith", "2000-10-10"] ] } I have a factory and a Controller setup as shown below .factory('Students', ['$http', function($http) { var data = {}; return { getStudents: function () { $http.get('api/students.json'). success(function(data, status, headers, config) { console.log(data.male); //returns the array of males data.studentlist = data.male; data.propertyOne = 'propertyOne'; //returns propertyOne but should also return in console.log(data) that I have further down the page. console.log(data.propertyOne); }). error(function(data, status, headers, config) { // log error console.log('error'); }); data.propertyTwo = 'propertyTwo'; console.log(data); //returns propertyTwo return data; } } }]); .controller('StudentCtrl', ['$scope', 'Students', function ($scope, Students) { $scope.students = Students.getStudents(); console.log($scope); // only properyTwo is returned in the students scope }]) What I can not work out is how to get the data which gets loaded on success to be added to my data object? As you can see from my comments, I am returning data in my success but then it is no longer available outside of my sucess function? What do I need to change here to get this working so that in my controller I can access the student list returned from my students.json file.
linked to: http://stackoverflow.com/q/12505760
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/26479064
score: 0
answers question: http://stackoverflow.com/q/26478250
type: Answer
has comment: http://stackoverflow.com/comment/41594641
has comment: http://stackoverflow.com/comment/41594802
has body: To search for an element having an attribute with a specific value, you can use $("[measureid='HeatLoad']"); It will return all the elements having attribute 'measureid' with value 'HeatLoad'.

http://stackoverflow.com/comment/108086740
comment on: http://stackoverflow.com/a/54738331
type: Comment
score: 0
has text: I think this is not the OP looking for. As this has size limitation of 32x32. he needed a solution that can add bigger image as cursor
type: AnswerComment

http://stackoverflow.com/comment/41454182
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26395227
has text: You could try https://github.com/ElbertF/Raphael.Export

http://stackoverflow.com/comment/41586814
type: Comment
comment on: http://stackoverflow.com/a/26472997
score: 0
type: AnswerComment
has text: Thanks for putting so much time in this. I will give this a try :).

http://stackoverflow.com/q/26488180
answer count: 1
accepted answer: http://stackoverflow.com/a/26488792
has body: How does one add browser arguments (such as --ignore-certificate-errors) for a javascript debug configuration in Webstorm? I'm debugging Dart in the Dartium browser.
has title: Webstorm - How to add browser arguments for javascript debug configuration
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26488792
score: 1
type: Question
upvote count: 1
tagged with: javascript
tagged with: webstorm
favorite count: 0
tagged with: dart

http://stackoverflow.com/a/27587041
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26461330
has body: I found that adding simpleCart.update(); to the controller causes the cart to appear appropriately. See: http://plnkr.co/edit/QQTceeYdDcJ8qDDWVJdP?p=preview It seems that SimpleCart makes its first pass looking for DOM elements it should update before angular has created them (as the content is not yet loaded). The update() call gives SimpleCart another chance to look for these elements.

http://stackoverflow.com/comment/41628698
type: Comment
type: QuestionComment
score: 0
has text: @SteveK: Then why not just place the IIFE in that place where the data is available? Nothing should force you to create the object immediately.
comment on: http://stackoverflow.com/q/26497720

http://stackoverflow.com/comment/41427591
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26386538
has text: Ah okey. but the name 'change' for event name doesn't matter? Let's say for example I would change **'change'** to **'event'** then I would use event:title if I wanted something to happend on the change of my title attribute?

http://stackoverflow.com/comment/41555688
score: 0
has text: @NickTho - We'd have to see what you're really trying to accomplish with your code, but my guess is that you need a different data structure that is easier to use.
comment on: http://stackoverflow.com/q/26457729
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26492367
type: Question
tagged with: parsley.js
score: 5
tagged with: javascript
has title: Parsley Date Format
answer count: 1
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/26494129
accepted answer: http://stackoverflow.com/a/26494129
type: AnsweredQuestion
downvote count: 0
has body: I am currently setting up a form with a &lt;input type=date&gt; field with Parsley to validate that the date cannot be in the past. However, I am unable to get it to validate despite giving it the correct values(in the future). It seems to read the minimum value from the min field but I tried changing the formats around(e.g Y/m/d) but the error still pops up. Can I know what is the issue behind this and what is the workaround to it? Thanks in advance. The error is This value should be greater than or equal to 10/21/2014. even though I gave it a date later than that. &lt;input type="date" name="contact-date" id="contact-date" placeholder="MM/DD/YYYY" data-date-format="mm/dd/yyyy" min="&lt;?php echo date('m/d/Y'); ?&gt;" parsley-type="dateIso"&gt; I looked through K D's answer and realized that the regex was for DD/MM/YYYY so I changed it from /^([12]\d|0[1-9]|3[01])\D?(0[1-9]|1[0-2])\D?(\d{4})$/ to /^(0[1-9]|1[0-2])\D?([12]\d|0[1-9]|3[01])\D?(\d{4})$/ Somehow this changed to any date passed is a valid date despite the min value being specified. Code is now: &lt;input type="date" class="contact-input" name="contact-date" id="contact-date" placeholder="MM/DD/YYYY" data-type="dateIso" data-parsley-min="&lt;?php echo date('m/d/Y'); ?&gt;"&gt;

http://stackoverflow.com/a/26500761
upvote count: 3
has comment: http://stackoverflow.com/comment/41633642
downvote count: 0
has body: (\d+)(?=[a-z]) Try this.Replace by $1*.See demo. http://regex101.com/r/rQ6mK9/31
answers question: http://stackoverflow.com/q/26500713
type: Answer
has comment: http://stackoverflow.com/comment/41633705
has comment: http://stackoverflow.com/comment/41633629
score: 3

http://stackoverflow.com/comment/41572198
score: 0
type: Comment
has text: Scimonster was a few seconds after my comment and a few before my answer which indeed is more complete. I pick on you because your answer is 5 hours after and I get curious when I see large later answers with example code that does not imo add anything new but just looks more correct due to size. You deemed it off topic after writing such an elaborate answer? Weirder and weirder - never mind....
comment on: http://stackoverflow.com/a/26455767
type: AnswerComment

http://stackoverflow.com/q/26431690
tagged with: iteration
answer count: 2
accepted answer: http://stackoverflow.com/a/26431906
upvote count: 0
possible better answer: http://stackoverflow.com/a/26432007
has answer: http://stackoverflow.com/a/26432007
favorite count: 0
linked to: http://stackoverflow.com/q/351495
has comment: http://stackoverflow.com/comment/41508212
has body: I have to iterate through an array, change one of its values, and create another array refelecting the changes. this is what I have so far: JS: var arr = new Array(); arr['t1'] = "sdfsdf"; arr['t2'] = "sdfsdf"; arr['t3'] = "sdfsdf"; arr['t4'] = "sdfsdf"; arr['t5'] = "sdfsdf"; var last = new Array(); for (var i = 0; i &lt;= 5; i++) { arr['t2'] = i; last.push(arr); } console.log(last); Unfortunately, these are my results As you can see, I am not getting the results needed as 0,1,2.. instead I am getting 2, 2, 2.. This is what i would like my results to be: How can I fix this?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41508442
has comment: http://stackoverflow.com/comment/41508493
score: -5
has comment: http://stackoverflow.com/comment/41508289
has answer: http://stackoverflow.com/a/26431906
has comment: http://stackoverflow.com/comment/41508266
type: Question
has comment: http://stackoverflow.com/comment/41508360
has title: cannot iterate through array and change value in JS
tagged with: arrays
downvote count: 5
tagged with: javascript

http://stackoverflow.com/comment/41769851
comment on: http://stackoverflow.com/a/26571784
type: Comment
has text: My suggestion allowed you to load the app in another panel, and you did mention you had the index filed to be used, I interpreted it as having the HTML files. I think was not mentioned that you could only load the js file. However, you could possibly set the HTML in your code and load the file there. I'll have to look into and possibly post later.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41608286
comment on: http://stackoverflow.com/q/26486767
has text: @StormRideR My code doesn't work ;)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41437036
comment on: http://stackoverflow.com/a/26391149
has text: Yeah I can't do that. It is on a shared server with preinstalled NPMs
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41403480
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26373423
has text: Have you tried adding quotes for `$page = $_POST[page];` - `$page = $_POST['page'];`? Plus, ` ` is outside your form tags.

http://stackoverflow.com/comment/41776550
type: QuestionComment
comment on: http://stackoverflow.com/q/26410454
score: 0
type: Comment
has text: See: http://stackoverflow.com/q/21953694/594235

http://stackoverflow.com/a/26796660
downvote count: 0
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26482268
has body: I have stated it yet in my question, but to make it more clear I will post it as an answer also: I think the accepted answer on this question is the correct and only way to completely isolate and constrain eval(). It is also secure against these hacks: (new ('hello'.constructor.constructor)('alert("hello from global");'))() (function(){return this;})().alert("hello again from global!"); while(true){} // if no worker --&gt; R.I.P. browser tab Array(5000000000).join("adasdadadasd") // memory --&gt; boom!
has comment: http://stackoverflow.com/comment/42170617

http://stackoverflow.com/comment/41503750
score: 1
has text: Why don't you call function?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26429347

http://stackoverflow.com/comment/41416184
score: 0
comment on: http://stackoverflow.com/a/26379529
type: AnswerComment
type: Comment
has text: Which is exactly what the code in my answer does. Perhaps if you try it you might understand.

http://stackoverflow.com/q/26510593
answer count: 1
has title: BootstrapValidator how to find rules for a field
type: AnsweredQuestion
tagged with: twitter-bootstrap
type: Question
accepted answer: http://stackoverflow.com/a/27076869
has body: How do I find if there are rules specified for a particular field? e.g. conditional zip code validation. I want to apply the validation if it hasn't been applied before, otherwise just enable it. if (zipFieldElements == null) { $(registerForm).bootstrapValidator('addField', m.zipCodeFieldName, m.getZipCodeValidator()); } else { bootstrapValidator.enableFieldValidators(m.zipCodeFieldName, true); }
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27076869

http://stackoverflow.com/q/26500135
answer count: 4
has answer: http://stackoverflow.com/a/26500313
accepted answer: http://stackoverflow.com/a/26500313
type: Question
type: AnsweredQuestion
has title: JavaScript code displaying in browser when form submitted, not the result of the script
has answer: http://stackoverflow.com/a/26500407
tagged with: forms
has answer: http://stackoverflow.com/a/26500404
has answer: http://stackoverflow.com/a/26500331
possible better answer: http://stackoverflow.com/a/26500407
tagged with: javascript
tagged with: dom-events
has body: I'm writing a basic calculator in JavaScript, and when I hit "=" on the html form it is returning the entire calculator.js, not the result. I'm not sure why this is happening, I want it to "alert" the answer variable. How can I get this to display correctly? calculator.html Calculator First Number Second Number: Add Sub Mult Div calculator.js var x = document.getElementById("x").value; var y = document.getElementById("y").value; document.getElementById("x").addEventListener("change", Calculator, false); document.getElementById("y").addEventListener("change", Calculator, false); var answer = 0; document.getElementById(0).addEventListener("click", Calculator, false); document.getElementById(1).addEventListener("click", Calculator, false); document.getElementById(2).addEventListener("click", Calculator, false); document.getElementById(3).addEventListener("click", Calculator, false); function add(){ answer = x+y; } function sub(){ answer = x-y; } function mult(){ answer = x*y; } function div(){ if(y=0){ alert "Cannot divide by zero" } else {answer = x/y} } function Calculator(){ if sign == 0{ add(); } else if sign == 1{ sub(); } else if sign == 2{ mult(); } else if sign == 3{ div(); } alert (answer); }
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41407821
has text: its not using image icon am using css
type: Comment
comment on: http://stackoverflow.com/a/26375464
score: 0
type: AnswerComment

mongodb
tags question: http://stackoverflow.com/q/26395937
tags question: http://stackoverflow.com/q/26470506
tags question: http://stackoverflow.com/q/26406599
tags question: http://stackoverflow.com/q/26415537
tags question: http://stackoverflow.com/q/26402250
tags question: http://stackoverflow.com/q/26429731
tags question: http://stackoverflow.com/q/26506560
tags question: http://stackoverflow.com/q/26405798
tags question: http://stackoverflow.com/q/26399967
tags question: http://stackoverflow.com/q/26360366
tags question: http://stackoverflow.com/q/26440005
tags question: http://stackoverflow.com/q/26384556
tags question: http://stackoverflow.com/q/26399711
tag name: mongodb
tags question: http://stackoverflow.com/q/26395422
tags question: http://stackoverflow.com/q/26399989
tags question: http://stackoverflow.com/q/26408631
type: Tag
tags question: http://stackoverflow.com/q/26374826
tags question: http://stackoverflow.com/q/26367469
tags question: http://stackoverflow.com/q/26432211
tags question: http://stackoverflow.com/q/26501695
tags question: http://stackoverflow.com/q/26474961
tags question: http://stackoverflow.com/q/26494081
tags question: http://stackoverflow.com/q/26445430
tags question: http://stackoverflow.com/q/26406405
tags question: http://stackoverflow.com/q/26422929
tags question: http://stackoverflow.com/q/26465724
tags question: http://stackoverflow.com/q/26473300
tags question: http://stackoverflow.com/q/26404780
tags question: http://stackoverflow.com/q/26420403
tags question: http://stackoverflow.com/q/26455914
tags question: http://stackoverflow.com/q/26402846
tags question: http://stackoverflow.com/q/26481326
tags question: http://stackoverflow.com/q/26414584
tags question: http://stackoverflow.com/q/26491558
tags question: http://stackoverflow.com/q/26435532
tags question: http://stackoverflow.com/q/26378668
tags question: http://stackoverflow.com/q/26364229
tags question: http://stackoverflow.com/q/26468607
tags question: http://stackoverflow.com/q/26450956
tags question: http://stackoverflow.com/q/26485971
tags question: http://stackoverflow.com/q/26480027

http://stackoverflow.com/q/26439098
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41522119
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41522209
has comment: http://stackoverflow.com/comment/41522086
has comment: http://stackoverflow.com/comment/41522171
has comment: http://stackoverflow.com/comment/41522185
has answer: http://stackoverflow.com/a/26439195
has answer: http://stackoverflow.com/a/26439178
accepted answer: http://stackoverflow.com/a/26439178
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41522342
has comment: http://stackoverflow.com/comment/41522148
has comment: http://stackoverflow.com/comment/41522194
type: Question
tagged with: object
has body: I'm new to Javascript and I'm having some issues creating a feature. I have an html form which takes in users name and address. I want to create a function that when the user submits the form that users information is saved into a JavaScript object. Something like this: Var person = { Name : abc, Address: xyz} I was able to save the information into an object but when ever a new person submits the form the old info is overwritten. Is it possible to create a separate object for every user who submits he form. Thank you for the help in advance.
has title: How to save user input from a form into JavaScript objects
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26439195
has comment: http://stackoverflow.com/comment/41522299
score: 0

http://stackoverflow.com/comment/41623594
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26494541
has text: Excellent answer with excellent solution. And also, this must be an excellent reading for me to improve my javascript studying. thank you very much.

css
tags question: http://stackoverflow.com/q/26466133
tags question: http://stackoverflow.com/q/26397017
tags question: http://stackoverflow.com/q/26369940
tags question: http://stackoverflow.com/q/26507154
tags question: http://stackoverflow.com/q/26495163
tags question: http://stackoverflow.com/q/26417181
tags question: http://stackoverflow.com/q/26484887
tags question: http://stackoverflow.com/q/26456153
tags question: http://stackoverflow.com/q/26385104
tags question: http://stackoverflow.com/q/26379767
tags question: http://stackoverflow.com/q/26404414
tags question: http://stackoverflow.com/q/26463951
tags question: http://stackoverflow.com/q/26359883
tags question: http://stackoverflow.com/q/26506803
tags question: http://stackoverflow.com/q/26417340
tags question: http://stackoverflow.com/q/26512784
tags question: http://stackoverflow.com/q/26380234
tags question: http://stackoverflow.com/q/26371653
tags question: http://stackoverflow.com/q/26510087
tags question: http://stackoverflow.com/q/26497346
tags question: http://stackoverflow.com/q/26489405
tags question: http://stackoverflow.com/q/26451184
tags question: http://stackoverflow.com/q/26505313
tags question: http://stackoverflow.com/q/26447747
tags question: http://stackoverflow.com/q/26480660
tags question: http://stackoverflow.com/q/26356050
tags question: http://stackoverflow.com/q/26497287
tags question: http://stackoverflow.com/q/26457215
tags question: http://stackoverflow.com/q/26501057
tags question: http://stackoverflow.com/q/26426792
tags question: http://stackoverflow.com/q/26451905
tags question: http://stackoverflow.com/q/26383272
tags question: http://stackoverflow.com/q/26470707
tags question: http://stackoverflow.com/q/26475117
tags question: http://stackoverflow.com/q/26487910
tags question: http://stackoverflow.com/q/26421056
tags question: http://stackoverflow.com/q/26440859
tags question: http://stackoverflow.com/q/26362699
tags question: http://stackoverflow.com/q/26426802
tags question: http://stackoverflow.com/q/26502599
tags question: http://stackoverflow.com/q/26458006
tags question: http://stackoverflow.com/q/26414824
tags question: http://stackoverflow.com/q/26427541
tags question: http://stackoverflow.com/q/26389338
tags question: http://stackoverflow.com/q/26437404
tags question: http://stackoverflow.com/q/26405178
tags question: http://stackoverflow.com/q/26372672
tags question: http://stackoverflow.com/q/26374507
tags question: http://stackoverflow.com/q/26371850
tags question: http://stackoverflow.com/q/26365213
tags question: http://stackoverflow.com/q/26416987
tags question: http://stackoverflow.com/q/26424869
tags question: http://stackoverflow.com/q/26381324
tags question: http://stackoverflow.com/q/26446498
tags question: http://stackoverflow.com/q/26510181
tags question: http://stackoverflow.com/q/26382950
tags question: http://stackoverflow.com/q/26509802
tags question: http://stackoverflow.com/q/26360530
tags question: http://stackoverflow.com/q/26437614
tags question: http://stackoverflow.com/q/26496583
tags question: http://stackoverflow.com/q/26362666
tags question: http://stackoverflow.com/q/26496151
tags question: http://stackoverflow.com/q/26492135
tags question: http://stackoverflow.com/q/26498459
tags question: http://stackoverflow.com/q/26478582
tags question: http://stackoverflow.com/q/26504850
tags question: http://stackoverflow.com/q/26393212
tags question: http://stackoverflow.com/q/26399239
tags question: http://stackoverflow.com/q/26399396
tags question: http://stackoverflow.com/q/26430308
tags question: http://stackoverflow.com/q/26512402
tags question: http://stackoverflow.com/q/26376800
tags question: http://stackoverflow.com/q/26379687
tags question: http://stackoverflow.com/q/26417764
tags question: http://stackoverflow.com/q/26429414
tags question: http://stackoverflow.com/q/26433634
tags question: http://stackoverflow.com/q/26479420
tags question: http://stackoverflow.com/q/26479404
tags question: http://stackoverflow.com/q/26498944
tags question: http://stackoverflow.com/q/26458712

http://stackoverflow.com/q/26504481
has comment: http://stackoverflow.com/comment/41640618
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41642951
has comment: http://stackoverflow.com/comment/41640809
answer count: 0
has comment: http://stackoverflow.com/comment/41640592
has comment: http://stackoverflow.com/comment/41645964
type: Question
has comment: http://stackoverflow.com/comment/41642861
tagged with: javascript
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/41640387
score: 0
has title: AngularJS - Mapping a date from a range of dates
has body: I have a table that in the header, produces 12 cells start with the current date, then subtracting one month, so: 22 Oct 2014 | 22 Sep 2014 | 22 Aug 2014 etc etc I then have a JSON file with a list of dates. I have an ANgular service that retrieves the dates however, what i am then trying to do, compare the range of dates in the header, then counts how many items from my JSON, fall in between the dates. Here's a Plunker: http://plnkr.co/edit/8nCKlxRAdtosc0EN2swG?p=preview HTML: {{ months }} {{filtered.length}} JS: So, the output would look something like: 22 Oct 2014 | 22 Sep 2014 | 22 Aug 2014 etc etc 2 | 5 | 0 etc etc UPDATE: $scope.DateMapping = function(months) { var curDate = new Date(months); var prevDate = new Date(months); prevDate = new Date(new Date(prevDate.setMonth(prevDate.getMonth() - 1)).setDate(prevDate.getDate() - 1)); //console.log("curDate: " + curDate); //console.log("prevDate: " + prevDate); var jsonEntries = $scope.Dates; for (var i = 0; i < jsonEntries.length; i++) { var jsonDate = jsonEntries[i].Date.substring(6, jsonEntries[i].Date.length - 2); if (jsonDate >= curDate && jsonDate <= prevDate ) { //PERFORM .push } else { } } };
tagged with: jquery
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/41640577

http://stackoverflow.com/a/26375053
score: 3
has body: Change your ID of preview button, like this: Preview And in your JS: $('#preview-btn').on('click', function () { $('#preview').html($('#widget').val()); }); CodePen Demo
has comment: http://stackoverflow.com/comment/41406967
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41407354
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41407037
accepted answer of: http://stackoverflow.com/q/26374979
upvote count: 3
answers question: http://stackoverflow.com/q/26374979
has comment: http://stackoverflow.com/comment/41406821
has comment: http://stackoverflow.com/comment/41407733

http://stackoverflow.com/comment/41455226
score: 0
comment on: http://stackoverflow.com/q/26362622
has text: Which version of MVC?
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26414595
type: Question
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
linked to: http://stackoverflow.com/q/22112763
answer count: 1
upvote count: 4
accepted answer: http://stackoverflow.com/a/26429378
linked to: http://stackoverflow.com/q/12632029
has body: I would like to insert a tag to a specific script into a specific view and nowhere else. This question very nearly captures my problem, but I want to use a script that I have written and wish to put into my public directory on the client side, rather than implementing a script tag with an hfref to an http address elsewhere. I see how the given solution allows you to put a script tag with a unique href in a a specific view, but I don't know where to store the js that I want to insert into the view so that it will be an available asset. I thought at first that any directory I placed inside of '/assets' would be placed inside the public directory on the client-side, but when I tried adding a '/assets/localScripts' directory and placing my script inside it, neither the directory, nor the script showed up. So I thought I'd put the local script inside the 'assets/js' directory, but everything I put in there (even if it's in a sub-directory) is getting added to every view and I don't want this script to be injected into the homepage (or anywhere accept one specific view). I looked at the pipeline.js file in an attempt to modify the grunt tasks. This resolved question on excluding files from grunt tasks suggests that I should be able to tell grunt to ignore the file '/assets/js/localScripts/gameview.js', but I have had no luck. I tried adding to the end of the part of pipeline that selects js files to inject each of the following exceptions (to do the same thing): var jsFilesToInject = [ // Load sails.io before everything else 'js/dependencies/sails.io.js', // Dependencies like jQuery, or Angular are brought in here 'js/dependencies/**/*.js', // All of the rest of your client-side js files // will be injected here in no particular order. 'js/**/*.js', //My attempted exceptions: //I think this should ignore anything in the localScripts directory !'**/localScripts/**', //I think this should ignore any file named gameview.js !'**/gameview.js', //I think this should ignore '/as…
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26429378
tagged with: sails.js
has title: Making js files available assets in a sails app (without injecting them into every view)
tagged with: gruntjs

http://stackoverflow.com/comment/41452926
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26399967
has text: It's correct. MongoDB uses ISODate to save date value. The last character **Z** means zero timezone. After adding your timezone, it's the value you want. So, it's only a different display format.
type: Comment

http://stackoverflow.com/a/26400590
accepted answer of: http://stackoverflow.com/q/26379694
answers question: http://stackoverflow.com/q/26379694
has body: There are problems with reliance on chrome.storage.sync, yes. Hitting quota limit may blacklist your extension in memory until Chrome is restarted. In theory, you can catch a quota error with chrome.storage.set callback, as it will set chrome.runtime.lastError, and implement some kind of backoff/buffering. In practice, there is anecdotal evidence that Chrome (not Google backend) blacklists an extension that breaks limits, and this persists through Chrome session (even if the quota should refresh). This is still not fixed as of 2014-10-16. Has reportedly been fixed. There is no way to wait for / request a sync. Unfortunately, chrome.storage.sync in its current form does not provide an event for remote sync being complete or having an error in case there is no change to local state. As such, if you rely on some value when starting, you can't reliably wait for it. And, as indicated by Chrome devs, that will probably stay this way. There is no state information exposed. Actually, forget events. The API does not even expose if Chrome Sync is enabled. A lot of problems would be solved if it did, and exposed the last known sync timestamp. It does not currently; here's a feature request. Despite all this, chrome.storage.sync is a useful tool. However, when using it, expect it to be unreliable, and always be mindful of the rate limits; possibly implement your own rate limiting. To actually answer your question For debugging chrome.storage.sync, you can look under its hood with chrome://sync-internals page.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/41533872
upvote count: 7

http://stackoverflow.com/q/26400435
tagged with: arrays
tagged with: javascript
type: UnansweredQuestion
has body: My first question here so please accept my apologies if this has been asked before and/or I am making some newbie mistake! I am trying to get my head around EmberJS with a simple exercise. I am trying to create a list of keywords and I have the basic functionality working. I wish to allow the user to enter a comma separated list of keywords to the store, however, alert if the keyword is a duplicate. So I have an ArrayController with an Actions object and within which I have a createKeyword function. createKeyword: function() { // Get the keyword title set by the "New Keyword" text field var entered_value = this.get('newKeyword'); if (!entered_value) { return false; } if (!entered_value.trim()) { return; } var entered_values = entered_value.split(","); for ( var i=0; i&lt;entered_values.length; i++){ var value = entered_values[i]; value = value.replace(/\+|"|'/g," "); if ( ! value.trim() ){ continue; } value = value.toUpperCase(); alert( "Prior addition:" + this.get('length')); // Prevent duplicates being added if ( this.findBy('keyword',value) === undefined ) { // Create the new Keyword model var keyword = this.store.createRecord('keyword', { value: value, weighting: 1, isNew: true }); // Save the new model keyword.save(); alert( "post addition:" + this.get('length') ); } else { alert( "Keyword [" + value + "] already defined"); } } // Clear the "New Keyword" text field this.set('newKeyword', ''); } I have a couple of alerts in there - one to display the array controller's length before I check for the value and subsequently createRecord on the store and one after. So I run this with 3 records, say 'tom','dick','harry' and if I add 'fred' to it, first alert is 3 and second alert is also 3 and fred appears. I am confused as to why the 2nd alert is showing 3 and not 4 - I am assuming (perhaps incorrectly) that the arrayController has not yet been updated with the new record. Secondly, if I restart then try adding fred,dick as an input, both get added, I would have tho…
tagged with: ember.js
type: Question
tagged with: store
has answer: http://stackoverflow.com/a/26403831
score: 0
answer count: 1
has title: EmberJS - Prevent record with duplicate attributes being added to store

http://stackoverflow.com/a/26436505
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26431256
score: 3
answers question: http://stackoverflow.com/q/26431256
upvote count: 3
type: AcceptedAnswer
has body: Try this: First of all, give your iframe an ID, so that the API can find it. Next, make sure that, in the src attribute you append the parameter enablejsapi and set it to 1 (so the API can hook into the existing DOM object's events). Then, set up a binding to the playerState event, so that when the video is playing, it triggers the fade in. Something like this (assuming you've given your iframe the ID of "myplayer"): &lt;script&gt; var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player; function onYouTubeIframeAPIReady() { player = new YT.Player('myplayer', { events: { 'onStateChange': onPlayerStateChange } }); } function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING) { $(".div_popup_overlay").fadeIn(); } else if (event.data == YT.PlayerState.PAUSED || event.data == YT.PlayerState.ENDED) { $(".div_popup_overlay").fadeOut(); } } &lt;/script&gt;
type: Answer

http://stackoverflow.com/comment/41639686
score: 0
type: Comment
type: QuestionComment
has text: Jsfiddle: http://jsfiddle.net/5b0wmdf9/1/ (dropdown doesn't work for some reason, but you get the idea...)
comment on: http://stackoverflow.com/q/26503926

http://stackoverflow.com/q/26449617
has answer: http://stackoverflow.com/a/26449797
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41541216
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41540901
type: Question
tagged with: javascript
has title: Function does not change the position of the element after .click re-event
score: 0
has body: It is my first step in jQuery! So please do not judge strictly and help me) I have to do next. There are some elements in my HTML. &lt;div class="garden"&gt; &lt;div class="point left"&gt;&amp;#9668;&lt;/div&gt; &lt;div class="trees"&gt; &lt;div id="apple"&gt;Apple&lt;/div&gt; &lt;div id="cherry"&gt;Cherry&lt;/div&gt; &lt;div id="pear"&gt;Pear&lt;/div&gt; &lt;div id="oak"&gt;Oak&lt;/div&gt; &lt;div id="fir"&gt;Fir&lt;/div&gt; &lt;/div&gt; &lt;div class="point right"&gt;&amp;#9658;&lt;/div&gt; &lt;/div&gt; I need to change the position of the elements to the left after each clicking "pointLeft". And to the right after each clicking "pointRight". When an item has a position of leftmost and click "pointLeft" this item is deleted, a copy is created and appears on the rightmost position. For example. Image that You clicked on "pointLeft". Than "cherry" takes the position of "apple", "pear" takes the position of "cherry", "oak" takes the position of "pear", "fir" take the position of "oak". The "apple" is removed, copy of "apple" is created and its takes the position of "fir". And so on. Besides I have to use .animate(). So at first I try to realize animation of one element (without usin .clone()). $(document).ready(function() { var trees = ["#apple", "#cherry", "#pear", "#oak", "#fir"]; var treePosition = []; for (var i = 0; i &lt; trees.length; i++) { treePosition.push($(tree[i]).position()); } function changePositionLeft() { if ($("#apple").position()) { $(trees[0]).animate(treePosition[4]); } else if ($("#apple").position() == treePosition[4]) { $("#apple").animate(treePosition[3]); } } $(".point.left").click(function() { changePositionLeft(); }); }); When I click at first, "apple" takes the position of "fir". But when I click second time "apple" don't animate to the position treePosition[4]. Please help me to understand why there is no animation after the second click. And please recommend working code for the implementation of tasks. Thanks!
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/26431663
has comment: http://stackoverflow.com/comment/41656018
downvote count: 0
answer count: 0
tagged with: ember-query-params
has title: Programmatically pass query param name to Ember's link-to component
type: Question
tagged with: javascript
upvote count: 2
favorite count: 0
type: UnansweredQuestion
tagged with: handlebars.js
tagged with: ember.js
has body: I'm trying to create a query param link component. The layout for my component looks something like this: {{#link-to routeName (query-params filter=paramValue)}} {{text}} {{/link-to}} routeName and paramValue are "bound" just fine to my component class. But I'd like my component to also specify the query param name (in this case it's hardcoded as "filter". How can I bind the name of the query param to a value on my component (I want "filter" to be a variable)? Should I just forget this method and send an action up to a route with all the properties needed to do a transitionTo?
score: 2

http://stackoverflow.com/q/26507639
possible better answer: http://stackoverflow.com/a/26507732
accepted answer: http://stackoverflow.com/a/26507760
tagged with: javascript
has comment: http://stackoverflow.com/comment/41646255
score: 0
has comment: http://stackoverflow.com/comment/41646431
answer count: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26507732
has answer: http://stackoverflow.com/a/26507760
has title: Are these statements functionally equivalent?
type: Question
has body: As far as I can tell they function the same, but I wanted to make sure. I would like to use the latter statement as it is less code and seems more efficient. function updateRunningTotals(taxExempt, discType, discAmt){ if (typeof taxExempt === 'undefined') { taxExempt = false; } taxExempt = taxExempt || false; } I have been using the if, but I have seen the latter statement in some open source projects. Do they basically do the same thing? Any performance benefit? EDIT: taxExempt, in this scenario may not always be passed in.

http://stackoverflow.com/a/26447749
has comment: http://stackoverflow.com/comment/41537846
has comment: http://stackoverflow.com/comment/41537711
type: Answer
accepted answer of: http://stackoverflow.com/q/26447660
has body: try this... I think it's what you want. let me know if it's not. http://jsfiddle.net/bpd2Ldy1/ so... what I did was assign the result of the setTimeout function (which returns a specific timeout id) to the variable tm. If it is set (meaning something is fading out after 3 seconds), and the user mouses-over another little box, it will clear and stop the timeout. that allows for it to not conflict with the new mouseover event. if nothing .canDo is moused-over, the timeout will complete uninterrupted after 3 seconds. $(document).ready( function() { $(".canDo img").mouseover( function() { $(".canDo img").removeClass('active').addClass('fade'); $(this).addClass('active').removeClass('fade'); if (typeof(tm) != 'undefined') { clearTimeout(tm); } $(".canDo p:last-child").stop().fadeOut(function() { var msg = $('.canDo img.active').next('span').html() $(".canDo p:last-child").text(msg).stop().fadeIn(); }); }) .mouseout( function() { tm = window.setTimeout(function(){ $(".canDo img").removeClass('active fade') $(".canDo p:last-child").stop().fadeOut("slow"); }, 3000); }); });
has comment: http://stackoverflow.com/comment/41537819
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26447660
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41613024
has text: in response, I can see the JSON (I have 1 method for each of them) but I would like to store the id in an array.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26489477
score: 0

http://stackoverflow.com/a/76222833
has body: If we need to use timezone along with date/time, we can do so as below var momentDateTime = moment.tz("23/10/2017", 'DD/MM/YYYY', "Asia/Kolkata"); var epoch = momentDateTime.valueOf(); var dateString = moment(epoch).tz("Asia/Kolkata").format('DD-MM-YYYY')
answers question: http://stackoverflow.com/q/26392280
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/26434425
score: 2
answers question: http://stackoverflow.com/q/26433421
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: Copy the text into a visibility: hidden div with font styles equal to the textarea and a max-width that won't let it go beyond your number of columns. If the height of the hidden copy of the text exceeds your limit, remove the text that was added. The following is close to what you need. Unfortunately, it doesn't nix the 5th row (after hitting enter on the 4th row) until you type something on it, and it can leave a couple characters on the 5th row (if you wrap to the 5th row from the 4th row). I'm uncertain how to refine the technique further. var $measure = $('#measure'); var $input = $('#input'); var $output = $('#measurement'); var existingText = ''; $input.on('keyup', function(event) { $measure.html($input.val()); $output.val($measure.width() + 'x' + $measure.height() + 'px'); if ($measure.height() &gt; 60) { $input.val(existingText.trim()); $measure.html(existingText.trim()); } existingText = $input.val(); }); #measure { position: absolute; visibility: hidden; height: auto; width: auto; white-space: pre-wrap; /* set font style equal to style of textarea */ font-family: monospace; font-size: 13px; letter-spacing: normal; line-height: normal; word-spacing: 0; word-wrap: break-word; max-width: 221px; border: 1x solid black; margin: 2px; padding: 2px; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;textarea id="input" cols="30" rows="4"&gt;&lt;/textarea&gt; &lt;div id="measure"&gt;&lt;/div&gt; &lt;br&gt; &lt;input type="text" disabled="disabled" id="measurement"/&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/26433421

http://stackoverflow.com/a/26507695
has comment: http://stackoverflow.com/comment/41654242
has comment: http://stackoverflow.com/comment/41678723
has body: I would add any scripts such as jquery either just before or just after the script tag for cordova. This is in index.html located within the app/ directory of the project that running the yeoman generator created. Once you have placed the scripts here they will get called when the app runs, and libraries such as jquery will be available globally throughout the app. I hope this helps.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41662463
upvote count: 8
accepted answer of: http://stackoverflow.com/q/26496451
type: Answer
has comment: http://stackoverflow.com/comment/41659944
score: 8
answers question: http://stackoverflow.com/q/26496451

http://stackoverflow.com/comment/41633643
score: 0
has text: I've seen some song lyric pages that convert all their lyrics to the char-code equivalents.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26500559

http://stackoverflow.com/comment/41512655
comment on: http://stackoverflow.com/a/26415180
has text: @sara.y you got it? And how?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41449404
comment on: http://stackoverflow.com/q/26394771
score: 1
type: Comment
type: QuestionComment
has text: You can do this using the suggestions in the answers you already have, but keep in mind that Referer is just and HTTP header which browsers conveniently set, so it can very easily be spoofed. In addition, if your corporate site uses SSL (hosted under https://...) and your app does not you will not get a referer at all (RFC 2616: "Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.").

http://stackoverflow.com/q/26416271
tagged with: javascript
score: 0
answer count: 2
tagged with: getelementbyid
possible better answer: http://stackoverflow.com/a/26416317
has body: I would like to know if the following line is the correct way to take html and put it into a Javascript var as numeric value? var thePoolHeatingFeeRounded = Number(document.getElementsById("priceDisplayPoolHeating").innerHTML); Nevermind that the variable name has the word 'rounded' in it. The value that I am trying to put into this var is a 2 point float that has already been rounded and it exist as html. Below is the line of HTML code that is referenced by getElementsById... $ 8.00 Any input is greatly appreciated.
has answer: http://stackoverflow.com/a/26416317
has comment: http://stackoverflow.com/comment/41479911
tagged with: var
tagged with: innerhtml
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26416345
type: Question
has title: Text Value From HTML Into Javascript Var?
accepted answer: http://stackoverflow.com/a/26416345

http://stackoverflow.com/comment/41426438
comment on: http://stackoverflow.com/a/26385990
score: 0
type: Comment
has text: And what if the text within the link is different? See above (once "here", and once "over there")
type: AnswerComment

http://stackoverflow.com/comment/41548563
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26453905
has text: If you're still afraid, you could implement [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives), but I hate it, because it's still broken in every single browser that 'supports' it.

http://stackoverflow.com/q/26429332
has comment: http://stackoverflow.com/comment/41504115
type: Question
has body: I am sort of new at this, but I am trying to make write a bit of javascript code and am having some trouble. I have the following code and have checked it over and over again and cannot find the problem. I have run it through jsfiddle, and I cannot figure out where I went wrong. var question = prompt('Who shot Abraham Lincoln?'); if (question == 'john wilkes booth' || question == 'John Booth' || question == 'John Wilkes Booth') { alert("That\'s Right!"); window.location.href = 'q2.html'; } else { alert('Sorry, that\'s not right.'); alert('Please try again'); history.refresh(); }
tagged with: if-statement
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/41503571
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26429391
has comment: http://stackoverflow.com/comment/41503997
answer count: 3
has comment: http://stackoverflow.com/comment/41504048
has comment: http://stackoverflow.com/comment/41503682
favorite count: 0
tagged with: var
has title: If else statement with multiple answers
has comment: http://stackoverflow.com/comment/41503656
has comment: http://stackoverflow.com/comment/41503667
has comment: http://stackoverflow.com/comment/41503862
possible better answer: http://stackoverflow.com/a/26429387
has answer: http://stackoverflow.com/a/26429391
has answer: http://stackoverflow.com/a/26429618
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26429387
has comment: http://stackoverflow.com/comment/41503621
downvote count: 2

http://stackoverflow.com/comment/41650645
type: Comment
score: 1
has text: I have a working jsfiddle http://jsfiddle.net/34ytuj4x/ Also, check your console for posible errors.
type: AnswerComment
comment on: http://stackoverflow.com/a/26492529

http://stackoverflow.com/q/26374458
has answer: http://stackoverflow.com/a/26374499
has answer: http://stackoverflow.com/a/26374533
type: Question
answer count: 2
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41405266
type: UnansweredQuestion
tagged with: php
has title: Adding a global variable to a javascript function so that it can be used on another php page
has body: I have a script that contains the following code: $(function(){ var e=$.cookie("list_grid"); if(e=="g"){ $("#products").addClass("smallGrid"); $("#smallGrid").addClass("disabled") }else if(e=="l"){ $("#products").addClass("largeGrid"); $("#products").removeClass("smallGrid"); $("#largeGrid").addClass("disabled") }else{ $("#products").addClass("listGrid"); $("#products").removeClass("largeGrid"); $("#products").removeClass("smallGrid"); $("#list").addClass("disabled")}}); $(function(){ $("#smallGrid").click(function(){ $("#products").fadeOut(300,function(){ $(this).removeClass("listGrid").fadeIn(300); $(this).addClass("smallGrid").fadeIn(300); $(this).removeClass("largeGrid").fadeIn(300); $.cookie("list_grid","g")}); $(this).addClass("disabled"); $("#list").removeClass("disabled"); $("#largeGrid").removeClass("disabled"); return false}); $("#largeGrid").click(function(){ $("#products").fadeOut(300,function(){ $(this).addClass("largeGrid").fadeIn(300); $(this).removeClass("listGrid").fadeIn(300); $(this).removeClass("smallGrid").fadeIn(300); $.cookie("list_grid","l")}); $(this).addClass("disabled"); $("#smallGrid").removeClass("disabled"); $("#list").removeClass("disabled"); return false}); $("#list").click(function(){ $("#products").fadeOut(300,function(){ $(this).addClass("listGrid").fadeIn(300); $(this).removeClass("smallGrid").fadeIn(300); $(this).removeClass("largeGrid").fadeIn(300); $.cookie("list_grid",null)}); $(this).addClass("disabled"); $("#smallGrid").removeClass("disabled"); $("#largeGrid").removeClass("disabled"); return false}) }) I need to add a var that can be used in some php code on another page. The purpose of this var is to know what listing type was selected so that i can trigger a specific type of output depending on what format the user requests to see the data in. I tried to change $("#smallGrid").click(function(){ to include the var as such $("#smallGrid").click(function(){ var listingStyle="small" but when i echo the contents of $listingStyl…

http://stackoverflow.com/comment/41511191
type: QuestionComment
has text: Troy Gizzi, We can not control the user behavior. If a user decides to add quite a few items to the order, then the form can get quite complex. The worse is that we don't know the ids of those user added elements and have to find a way to retrieve and match them.
comment on: http://stackoverflow.com/q/26431986
score: 0
type: Comment

http://stackoverflow.com/comment/41507444
type: Comment
type: QuestionComment
has text: You could create 'yield region='post_body' ' and render post into this region. Read more here http://www.manuel-schoebel.com/blog/iron-router-tutorial
comment on: http://stackoverflow.com/q/26423673
score: 0

http://stackoverflow.com/a/26395135
has comment: http://stackoverflow.com/comment/41461832
has comment: http://stackoverflow.com/comment/41444074
score: 1
has body: Give your button an ID, for example: id="button" and then the following should work: $('#button').click(function(){ $('body').css('background', 'url(http://tileablepatterns.com/wp-content/uploads/2014/09/Denim.jpg) repeat 0 0'); });
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41442888
has comment: http://stackoverflow.com/comment/41443938
has comment: http://stackoverflow.com/comment/41443114
type: Answer
answers question: http://stackoverflow.com/q/26395057
has comment: http://stackoverflow.com/comment/41442370

http://stackoverflow.com/comment/41573064
has text: or did you forgot to inject Answers in controller?? like angular.module('intquestApp').controller('intquestAppController', ['$scope', '$stateParams','$compile', '$location','Answers' , function($scope, $stateParams, $compile, $location, Answers) { // code
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26432957
score: 0

http://stackoverflow.com/a/26495014
type: Answer
answers question: http://stackoverflow.com/q/26494918
has body: If your question is how to change input width on click event, use jQuery Animate. You will need to change width property on input click event.
score: 0

http://stackoverflow.com/comment/41615912
type: QuestionComment
comment on: http://stackoverflow.com/q/26490003
score: 0
has text: That means that you need another opaque div between clown and the one in front of it that will cover the lower part of clown's face. Right?
type: Comment

http://stackoverflow.com/comment/41586792
has text: Sorry may have misspoke. It would all depend on your ACL permissions. Are you trying to change the currentUser's data, or another users data? By default(No ACL set at all) the PFUser ACL permissions are public:read but not public:write
type: AnswerComment
comment on: http://stackoverflow.com/a/26458232
score: 0
type: Comment

http://stackoverflow.com/comment/41479904
type: Comment
type: QuestionComment
has text: Looks like your first input tag isn't self-closing. Make sure it ends with "/>" and try again. That might be it.
comment on: http://stackoverflow.com/q/26416276
score: 0

node.js
tags question: http://stackoverflow.com/q/26446776
tags question: http://stackoverflow.com/q/26373716
tags question: http://stackoverflow.com/q/26500242
tags question: http://stackoverflow.com/q/26402346
tags question: http://stackoverflow.com/q/26469665
tags question: http://stackoverflow.com/q/26445771
tags question: http://stackoverflow.com/q/26493391
tags question: http://stackoverflow.com/q/26414447
tags question: http://stackoverflow.com/q/26458866
tags question: http://stackoverflow.com/q/26491240
tags question: http://stackoverflow.com/q/26466095
tags question: http://stackoverflow.com/q/26480027
tags question: http://stackoverflow.com/q/26410570
tags question: http://stackoverflow.com/q/26395528
tags question: http://stackoverflow.com/q/26489597
tags question: http://stackoverflow.com/q/26452867
tags question: http://stackoverflow.com/q/26512107
tags question: http://stackoverflow.com/q/26399348
tags question: http://stackoverflow.com/q/26448186
tags question: http://stackoverflow.com/q/26376160
tags question: http://stackoverflow.com/q/26476513
tags question: http://stackoverflow.com/q/26443028
tags question: http://stackoverflow.com/q/26499538
tags question: http://stackoverflow.com/q/26477351
tags question: http://stackoverflow.com/q/26447529
tags question: http://stackoverflow.com/q/26482015
tags question: http://stackoverflow.com/q/26369192
tags question: http://stackoverflow.com/q/26415435
tags question: http://stackoverflow.com/q/26483971
tags question: http://stackoverflow.com/q/26412539
tags question: http://stackoverflow.com/q/26364229
tags question: http://stackoverflow.com/q/26453527
tags question: http://stackoverflow.com/q/26412636
tags question: http://stackoverflow.com/q/26481491
tags question: http://stackoverflow.com/q/26402933
tags question: http://stackoverflow.com/q/26406599
tags question: http://stackoverflow.com/q/26431958
tags question: http://stackoverflow.com/q/26423635
tags question: http://stackoverflow.com/q/26451849
tags question: http://stackoverflow.com/q/26450956
tags question: http://stackoverflow.com/q/26486525
tags question: http://stackoverflow.com/q/26375193
tags question: http://stackoverflow.com/q/26513119
tags question: http://stackoverflow.com/q/26411208
tags question: http://stackoverflow.com/q/26391635
tags question: http://stackoverflow.com/q/26454865
tags question: http://stackoverflow.com/q/26404989
tags question: http://stackoverflow.com/q/26404785
tags question: http://stackoverflow.com/q/26480991
tags question: http://stackoverflow.com/q/26460564
tags question: http://stackoverflow.com/q/26469230
tags question: http://stackoverflow.com/q/26380895
tags question: http://stackoverflow.com/q/26464372
tags question: http://stackoverflow.com/q/26456346
tags question: http://stackoverflow.com/q/26411241
tags question: http://stackoverflow.com/q/26385129
tags question: http://stackoverflow.com/q/26428985
tags question: http://stackoverflow.com/q/26355300
tags question: http://stackoverflow.com/q/26361008
tags question: http://stackoverflow.com/q/26448919
tags question: http://stackoverflow.com/q/26391766
tags question: http://stackoverflow.com/q/26452950
tags question: http://stackoverflow.com/q/26504085
tags question: http://stackoverflow.com/q/26465358
tags question: http://stackoverflow.com/q/26470543
tags question: http://stackoverflow.com/q/26360366
tags question: http://stackoverflow.com/q/26388891
tags question: http://stackoverflow.com/q/26455019
tags question: http://stackoverflow.com/q/26423839
tags question: http://stackoverflow.com/q/26354466
tags question: http://stackoverflow.com/q/26399711
tags question: http://stackoverflow.com/q/26368354
tags question: http://stackoverflow.com/q/26396320
tags question: http://stackoverflow.com/q/26475844
tags question: http://stackoverflow.com/q/26443686
tags question: http://stackoverflow.com/q/26484415
tags question: http://stackoverflow.com/q/26477206
tags question: http://stackoverflow.com/q/26457131
tags question: http://stackoverflow.com/q/26426733
tags question: http://stackoverflow.com/q/26493744

http://stackoverflow.com/comment/41612205
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26480145
has text: You forgot to add elements to left when they go out of right border. Take a look at [updated fiddle](http://jsfiddle.net/CQNTy/30/). Maybe I miscalculate a little bit with borders, but the idea is in written `else if ()`
score: 0

http://stackoverflow.com/comment/41595533
type: Comment
has text: Show your HTML also.
comment on: http://stackoverflow.com/q/26479642
score: 1
type: QuestionComment

http://stackoverflow.com/a/26382598
has comment: http://stackoverflow.com/comment/41419593
accepted answer of: http://stackoverflow.com/q/26382537
answers question: http://stackoverflow.com/q/26382537
has body: Your src should be: var Photoq = "/Images/HomeImages/" + data[i].MediumImage; /Images/HomeImages/.. is an absolute path. This means the resource is searched starting from the server's root. Using /file.jpg means you are searching directly in the server's root. When you are not using a leading slash it means you have a relative path. So starting from current directory in the file system you are following the path. ../ means you are looking in the parent directory.
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
type: Answer

http://stackoverflow.com/a/26438941
score: 1
answers question: http://stackoverflow.com/q/26438717
upvote count: 1
type: Answer
downvote count: 0
has body: Try this: $(function(){ alert($( "#mydiv" ).text()); }); Some Text

state
tag name: state
tags question: http://stackoverflow.com/q/26385627
tags question: http://stackoverflow.com/q/26408388
tags question: http://stackoverflow.com/q/26454769
type: Tag

http://stackoverflow.com/q/26368095
tagged with: jquery
has comment: http://stackoverflow.com/comment/41393821
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26369526
type: UnansweredQuestion
tagged with: php
has body: I am trying to call a PHP script in my main PHP file.Below is the Jquery/Ajax part of the main php file. The display_stationinfo.php is supposed to create the DIVs in the main but it isnt. this is what I tried so far, im new to Jquery and AJAX. thanks in advance! working fiddle: http://jsfiddle.net/52n861ee/ thats what I want to do but when I click on desk_box DIV, the toggle station_info DIV is not being created by my display_stationinfo.php script. When I view source code both DIVs are supposed to be already created but only desk_box is.. what am I doing wrong? JQuery/AJAX part: display_station.php (script that I want to call): <?php include 'db_conn.php'; //query to show workstation/desks information from DB for the DESKS $station_sql = "SELECT coordinate_id, x_coord, y_coord, section_name FROM coordinates"; $station_result = mysqli_query($conn,$station_sql); //see if query is good if ($station_result === false) { die(mysqli_error()); } //Display workstations information in a hidden DIV that is toggled while ($row = mysqli_fetch_assoc($station_result)) { //naming values $id = $row['coordinate_id']; $x_pos = $row['x_coord']; $y_pos = $row['y_coord']; $sec_name = $row['section_name']; //display DIV with the content inside $html = " Hello the id is:".$id." Section:".$sec_name." "; echo $html; }//end while loop for station_result mysqli_close($conn); // <-- DO I NEED TO INCLUDE IT HERE OR IN MY db_conn.php SINCE IM INCLUDING IT AT THE TOP? ?>
has comment: http://stackoverflow.com/comment/41393743
type: Question
has title: DIV not being created from PHP when doing AJAX call
tagged with: javascript

http://stackoverflow.com/q/26365569
tagged with: gulp
favorite count: 0
upvote count: 4
tagged with: node.js
tagged with: build
downvote count: 0
has title: Gulp - recompile a bumped version for tagging
type: Question
type: AnsweredQuestion
tagged with: javascript
score: 4
has body: Regarding an issue I am having with gulp-tag-version, the README there suggests: function inc(importance) { // get all the files to bump version in return gulp.src(['./package.json', './bower.json']) // bump the version number in those files .pipe(bump({type: importance})) // save it back to filesystem .pipe(gulp.dest('./')) /* Recompile the Javascript here */ // commit the changed version number .pipe(git.commit('bumps package version')) // read only one file to get the version number .pipe(filter('package.json')) // **tag it in the repository** .pipe(tag_version()) } gulp.task('patch', function() { return inc('patch'); }) gulp.task('feature', function() { return inc('minor'); }) gulp.task('release', function() { return inc('major'); }) I would like to recompile some Javascript between the version being bumped and git tagging it. I have a task for that, js, but it is not clear how one can call the js task (or otherwise re-order the bump/tag tasks) to accomplish this common and desirable outcome (i.e. having the version in the headers of your compiled code). It is also worth noting that if one had three tasks bump, compile and tag, the bump of the package.json appears to be cached and not re-read by a separate tag task.
has answer: http://stackoverflow.com/a/26454939
answer count: 1
accepted answer: http://stackoverflow.com/a/26454939

http://stackoverflow.com/q/26388671
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/26388749
answer count: 3
has answer: http://stackoverflow.com/a/26388726
downvote count: 0
tagged with: language-agnostic
has comment: http://stackoverflow.com/comment/41430983
favorite count: 0
has answer: http://stackoverflow.com/a/26388777
type: UnansweredQuestion
has body: I have some code like this var a = returnsABoolean(); var b = returnsABoolean(); if (!a || !b) { } else { doStuff(); } How would I invert the test in the if-statement such that I can rewrite this as var a = returnsABoolean(); var b = returnsABoolean(); if (someExpression) { doStuff(); } In other words, what test should I replace someExpression with to preserve the existing behaviour?
tagged with: boolean-expression
has comment: http://stackoverflow.com/comment/41431158
has comment: http://stackoverflow.com/comment/41431052
has title: invert a boolean expression
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41431091

http://stackoverflow.com/a/26427535
score: 1
answers question: http://stackoverflow.com/q/26426991
has body: I would suggest adding moment.js to your project and try something like this: And then the following jQuery: $(document).ready(function () { expiryDate(); }); function expiryDate() { var dbDate = $data["expires"]; var expDate = moment(dbDate).format(); var curDate = moment().format(); var oneb4 = moment(expDate).subtract(1, 'months').format(); if (curDate > oneb4) { $('#expiryDate').show(); } else { $('#expiryDate').hide(); } }
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41500246
downvote count: 0

http://stackoverflow.com/comment/41598460
type: AnswerComment
score: 0
type: Comment
has text: Hm, I keep getting nullreferenceexception, where should I put <asp:HiddenField ID="hdnSelectedField" runat="server" /> If I have many divs and many forms? Like you can see in my example code, that is start of my page
comment on: http://stackoverflow.com/a/26476135

http://stackoverflow.com/comment/41607721
type: Comment
has text: Thanks :) it works. Is there a good tutorial other than the jaggery.org which I can follow?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26486608

http://stackoverflow.com/comment/41567865
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26454152
has text: I've added `console.log($('#main-form').parsley().validate('step'+current));` after `if( next > current )` and every step returns true in console, but 4th step returns false. No idea why this happens.
score: 0

http://stackoverflow.com/comment/41597505
score: 0
type: QuestionComment
type: Comment
has text: You generally need to reinitialize or force a redraw of these sorts of components whenever they go from hidden to visible.
comment on: http://stackoverflow.com/q/26480006

http://stackoverflow.com/comment/41373860
has text: is there any element with name or id as submit in your page
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26357653
score: 0

http://stackoverflow.com/comment/41468479
type: Comment
comment on: http://stackoverflow.com/a/26405357
has text: The call for the header is in there. I'll take a look at the enqueue_script for the functions.php file in a few.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26469397
has comment: http://stackoverflow.com/comment/41601491
has comment: http://stackoverflow.com/comment/41576687
tagged with: datatable
score: 2
type: AnsweredQuestion
upvote count: 2
has title: Sorting date column by DD/MM/YYY in jQuery DataTables 1.10.2
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/26613635
tagged with: date
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I am using DataTables to display some MySQL data that contains a date column. All date data in my table is displayed in the DD/MM/YYYY format, and no matter many different things I try, I cannot get it to sort in any other way than by the first two numbers. I am currently using this method of sorting as I think it suits my data best: http://datatables.net/plug-ins/sorting/date-uk "columns": [ { "data": "Address" }, { "data": "Date_seen", "type" : "date-uk" }, I have also tried to sort using this method, more like the example on the DataTables website: "columnDefs": [ { "type": "date-uk", "targets": 1 } ], I have tried copying in the plug-in code to my JavaScript file, and have also tried referencing the plug-in via the DataTables CDN. I realise there are a lot of similar questions but they all seem to be relevant to older versions of DataTables from a few years ago, and contain the use of older initialisations such as sType, aaSorting and aoColumns. I hope someone can shed some light on why this isn't working, it's driving me mad!
accepted answer: http://stackoverflow.com/a/26613635

http://stackoverflow.com/q/26510850
tagged with: jasmine
tagged with: reactjs-flux
favorite count: 0
type: UnansweredQuestion
score: 6
downvote count: 0
has body: I'm encountering a fun little problem with unit testing and the flux data stores. Since the data stores are singletons that only get instantiated once (when the module is imported) any changes you make in your unit test persist. This can (and is) causing me all sorts of head aches. The solution I'm currently implementing is a reset method on each store which I run within the afterEach but I was wondering / hoping there's a simpler way to go around this?
tagged with: unit-testing
type: Question
has title: Unit tests - flux and data persistency
tagged with: reactjs
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/26512615
answer count: 1

http://stackoverflow.com/comment/41443494
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26385051
has text: Even after removing the statements what you are pointing is also failing. Don't know where it was failing...I am kinda tensed...
score: 0

http://stackoverflow.com/q/26371981
has comment: http://stackoverflow.com/comment/41401365
tagged with: coffeescript
has comment: http://stackoverflow.com/comment/41401187
accepted answer: http://stackoverflow.com/a/26372541
score: 0
has body: Just started using CoffeeScript and have hit a wall. In my code below I construct WebSocketServer with a number as the first argument and a function as the second argument. When the code is ran and the websocket receives a message, @msgHandler is now magically undefined. I tried to work around this by setting a variable handler to @msgHandler but that ended up being undefined as well. If anyone has any ideas I'd love to hear them, thanks! main.coffee #Used to communicate with browser interface webSocketServ = new sio.WebSocketServer Sauce.Server.WebSocketPort, (data, socketId) -&gt; try json = JSON.parse(data) msgType = json.msgType catch error return if (this.isAuthed(socketId)) switch msgType when "auth" else io.websocket 'TODO: ' + cmd else if msgType is 'auth' token = json.token socket.coffee class WebSocketServer constructor: (@port, @msgHandler) -&gt; @webSockets = [] @handlers = {} @test = [] @authedSockes = [] @listen(@port); console.log @msgHandler #msgHandler is defined here as [ Function ] listen: (port) -&gt; @wsServ = engine.listen port @wsServ.on 'connection', @onConnect io.socket "WebServer socket started on port #{port}" onConnect: (client) -&gt; io.websocket 'New connection with id of ' + client.id handler = @msgHandler #@msgHandler is undefined here? client.on 'message', (data) -&gt; handler data, client.id io.websocket '[' + this.id + '] ' + JSON.stringify(data) client.on 'close', -&gt; io.websocket '[' + this.id + '] Disconnect' client.on 'error', (err) -&gt; io.websocket "IO error: " + err compiled socket.coffee WebSocketServer = (function() { function WebSocketServer(port, msgHandler) { this.port = port; this.msgHandler = msgHandler; this.webSockets = []; this.handlers = {}; this.test = []; this.authedSockes = []; this.listen(this.port); console.log(this.msgHandler); } WebSocketServer.prototype.listen = function(port) { this.wsServ = engine.listen(port); this.wsServ.on('connection', this.onConnect); return io.socket("WebServer socket started on…
has comment: http://stackoverflow.com/comment/41400813
answer count: 1
has comment: http://stackoverflow.com/comment/41400824
tagged with: javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41401214
has answer: http://stackoverflow.com/a/26372541
type: Question
has comment: http://stackoverflow.com/comment/41401473
has title: Undefined class variable when defined in constructor
has comment: http://stackoverflow.com/comment/41401384
linked to: http://stackoverflow.com/q/20279484

http://stackoverflow.com/comment/41412320
comment on: http://stackoverflow.com/a/26376925
type: AnswerComment
has text: here user select the page by mouse.I don't know how to do that.. Can u suggest me to achieve this.
score: 0
type: Comment

http://stackoverflow.com/a/26458102
type: AcceptedAnswer
downvote count: 0
has body: Try this: var toppings = 0; for (var i = 0; i &lt; toppingBoxes.length; i++) { if (toppingBoxes[i].checked) { toppings = toppings + 1; foodInfo['toppings' + toppings] = toppingBoxes[i].value; } }
type: Answer
has comment: http://stackoverflow.com/comment/41556437
score: 1
accepted answer of: http://stackoverflow.com/q/26458009
answers question: http://stackoverflow.com/q/26458009
upvote count: 1

http://stackoverflow.com/comment/41805635
type: AnswerComment
has text: The alternative would be to pull the markup for the table itself as an Angular template in the directive, and pass the data into the directive via isolate scope. Doing that, you could take a similar approach with scope.$watch to wait for the data to come in within the directive - this would also make it easier to correctly rerender upon data changes, which my sample directive above isn't set up to handle.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26591312

http://stackoverflow.com/q/26459366
upvote count: 1
has answer: http://stackoverflow.com/a/26459828
type: Question
has body: I'm using a factory to poll a particular web service. This web service is used to update data any the factory. I initiate this factory in the main controller, and populate a scope variable through a factory function. The variable initializes correctly, and I get the right data on the screen, but I'm struggling on getting the data to bind automatically. Edit for additional notes: The reason this code is in a Factory is that I plan on using the factory data across multiple views. Here is what I have so far: App.factory('metrics', function($http, $q, $timeout){ var service; var users = [{laps:[]}]; var updateMetrics = function(){ //updates the users array in the factory }; service.load = function (){ var deferred = $q.defer(); $http.get('http://www.example.com/api/random').success(function(data) { var temp_array = data.split("\n"); updateMetrics(0, temp_array); deferred.resolve({status: 'good'}); $timeout(service.load,3000); }); return deferred.promise; }; service.lastLapInfo = function(){ var lastlap = []; for (var i=0; i&lt;users.length;i++) { var lap = users[i].laps[users[i].laps.length-1]; lastlap.push(lap); } return lastlap; }; return service; }); App.controller('mainController', function($scope, metrics) { metrics.load().then(function(response){ $scope.$watch(function () { return metrics.lastLapInfo() }, function (newVal, oldVal) { if (newVal !=oldVal) { $scope.users=metrics.lastLapInfo(); } }); }); }); When I try the above, I get an error saying '10 $digest() iterations reached'. I don't see how that's possible, asI'm not calling the watch function multiple times. Any suggestions (or other means to accomplish what I'm trying to do?)
has comment: http://stackoverflow.com/comment/41558585
tagged with: javascript
downvote count: 0
answer count: 1
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41558739
tagged with: angularjs
has title: Angular - Update scope when change in Factory data
type: UnansweredQuestion

http://stackoverflow.com/comment/41404253
type: Comment
has text: Apparently, you don't understand how asynchronous code works. You call `.sleep()` and it returns immediately which allows all the rest of your `for` loop to run immediately so you don't get checks at different times. All the checks are one second from start. You have to launch your next check from within the `.then()` handler so they will truly be sequenced or uses promises to chain them all together to sequence them.
comment on: http://stackoverflow.com/q/26373716
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41575863
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26440277
has text: @ApulGupta I just tried this and it did not work.
type: Comment

http://stackoverflow.com/comment/41620445
comment on: http://stackoverflow.com/q/26478673
type: QuestionComment
has text: Wait, I'm confused, you said `Chrome debugger`, if you are using Node, how does Chrome factor into this?
type: Comment
score: 0

http://stackoverflow.com/comment/41451666
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26400290
score: 1
has text: @mocanuga never ever tell anyone to use `eval()` its really bad practice unless you know what you are doing (and OP clearly is not), a better aswer would have been `var json = JSON.parse(output);`

http://stackoverflow.com/comment/41601499
score: 1
comment on: http://stackoverflow.com/q/26482727
has text: That's what the problem was, wasn't wrapped in a ready block.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26498717
has answer: http://stackoverflow.com/a/26512854
accepted answer: http://stackoverflow.com/a/26512854
type: Question
tagged with: charts
tagged with: google-visualization
tagged with: javascript
score: 0
answer count: 1
has body: I have a Google Annotation chart showing values between 0 and 1 as seen here: jsfiddle google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('date', 'Date'); data.addColumn('number', 'Kepler-22b mission'); data.addColumn('string', 'Kepler title'); data.addColumn('string', 'Kepler text'); data.addColumn('number', 'Gliese 163 mission'); data.addColumn('string', 'Gliese title'); data.addColumn('string', 'Gliese text'); data.addRows([ [new Date(2314, 2, 15), 0.12400, undefined, undefined, 0.10645, undefined, undefined], [new Date(2314, 2, 16), 0.24045, 'Lalibertines', 'First encounter', 0.12374, undefined, undefined], [new Date(2314, 2, 17), 0.35022, 'Lalibertines', 'They are very tall', 0.15766, 'Gallantors', 'First Encounter'], [new Date(2314, 2, 18), 0.12284, 'Lalibertines', 'Attack on our crew!', 0.34334, 'Gallantors', 'Statement of shared principles'], [new Date(2314, 2, 19), 0.8476, 'Lalibertines', 'Heavy casualties', 0.66467, 'Gallantors', 'Mysteries revealed'], [new Date(2314, 2, 20), 0, 'Lalibertines', 'All crew lost', 0.79463, 'Gallantors', 'Omniscience achieved'] ]); var chart = new google.visualization.AnnotationChart(document.getElementById('chart_div')); var options = { displayAnnotations: true, scaleFormat: '#' }; chart.draw(data, options); } By default, the vertical axis is formatted as integer, which is not ideal for reading the chart. The documentation has a scaleFormat option (default '#' for integer) but does not give any alternatives. I cannot get any other number format options in the documentation to work. How can I format the Y Axis ticks as numbers with 1 decimal?
has title: Format axis on Google Annotation Chart (ScaleFormat option)
type: AnsweredQuestion

http://stackoverflow.com/comment/41478806
score: 4
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26415640
has text: In a browser or node.js?

http://stackoverflow.com/q/26499712
has answer: http://stackoverflow.com/a/26500323
type: Question
has comment: http://stackoverflow.com/comment/41632420
has comment: http://stackoverflow.com/comment/41633046
tagged with: javascript
score: 0
has body: Greetings I am trying to convert Ruby hashes from the old 1.8 style using AngularJS with a regex { :name =&gt; "james" } to the newer 1.9 syntax { name: 'james' } I am attempting to do this in Angular JS with the following segment $scope.$watch("rubyText", function( newValue ) { var newVal= newValue.replace( new RegExp( "([\w\d_]+)(\s*)=&gt;/\1:", "g" ), newValue ); $scope.rubyTextConverted = newVal; } I have limited JS regex experience and would like some advice on the regular expression Thanks
answer count: 1
has comment: http://stackoverflow.com/comment/41632450
tagged with: regex
tagged with: ruby
tagged with: angularjs
type: UnansweredQuestion
has title: Javascript regex to convert ruby hash syntax from 1.8 to 1.9
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41632445

http://stackoverflow.com/comment/41562255
comment on: http://stackoverflow.com/q/26459182
score: 0
type: Comment
type: QuestionComment
has text: Have you tried using https://rubygems.org/gems/jquery-turbolinks ? It brings the default events back.

http://stackoverflow.com/comment/41595864
has text: you can use [moment.js](http://momentjs.com)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26479747
score: 0

http://stackoverflow.com/comment/41613649
has text: @Paulie_D I don't even know how JS could do this exactly... it COULD maybe possibly almost likely be able to be done through a crazy regex, but I sadly am unable to think of a simple regex that could do it even remotely close.
comment on: http://stackoverflow.com/q/26489625
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41605392
comment on: http://stackoverflow.com/q/26485383
has text: @Archer, Thanks I learned something today
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/q/26427511
has answer: http://stackoverflow.com/a/26427670
type: Question
tagged with: javascript
tagged with: sorting
score: 0
answer count: 3
has body: I have problem with JSON sorting by increase. Now it looked: var array = { "2014\/2015":{ "gamesPlayed":17,"goals":2,"assists":8,"points":10 }, "2013\/2014":{ "gamesPlayed":52,"goals":18,"assists":16,"points":34 }, "2012\/2013":{ "gamesPlayed":39,"goals":12,"assists":15,"points":27 } }; I need to sort item by year and get objects like this 2012/2013:{...}, 2013/2014:{...}, 2014/2015:{...} I try to sort it by: var sorted = array.sort(function(a,b){ return a - b; }); but it show misstake in console.
has title: Sorting two layers array by underscore .sortBy or javascript .sort function
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26427540
has answer: http://stackoverflow.com/a/26427674

http://stackoverflow.com/a/26360221
has comment: http://stackoverflow.com/comment/41379585
has comment: http://stackoverflow.com/comment/41379249
downvote count: 2
has comment: http://stackoverflow.com/comment/41380336
has comment: http://stackoverflow.com/comment/41379629
upvote count: 1
has comment: http://stackoverflow.com/comment/41379561
has comment: http://stackoverflow.com/comment/41379147
type: Answer
has comment: http://stackoverflow.com/comment/41379240
has comment: http://stackoverflow.com/comment/41379170
has comment: http://stackoverflow.com/comment/41379878
has comment: http://stackoverflow.com/comment/41378485
has comment: http://stackoverflow.com/comment/41379722
has comment: http://stackoverflow.com/comment/41379325
has comment: http://stackoverflow.com/comment/41379928
has comment: http://stackoverflow.com/comment/41379053
answers question: http://stackoverflow.com/q/26360175
score: -1
has body: You can shuffle the array like this: function shuffle(o){ for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }; usage: var myArray = []; for(var i = 1; i &lt;= 2000; i++) { myArray.push(i); } var randomArray = shuffle(myArray).splice(0, 10); // an array with 10 random numbers varrying from 1-2000 source: How can I shuffle an array?
has comment: http://stackoverflow.com/comment/41379108
has comment: http://stackoverflow.com/comment/41379521

http://stackoverflow.com/comment/41574719
comment on: http://stackoverflow.com/q/26433188
score: 1
has text: i don't think he's asking how to fix it... he wants to know why it happens. Is it simply that when the form submits, it cancels the location.href change and instead submits the form?
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26454093
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has title: AngularJS ng-view not loading js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26461619
tagged with: twitter-bootstrap
upvote count: 1
accepted answer: http://stackoverflow.com/a/26461619
type: Question
has body: I have a problem with my AngularJS app. I'm trying to use a JavaScript of a bootstrap template inside of a ng-view, but is not working. When I use this JavaScript in my index works great, but not inside of any view. This is a part of my index.html: When I use some of the features of any of the form related scripts inside of a ng-view don't work. How can I use this scripts inside my ng-views?? I've tried to load the scripts inside the ng-views but still doesn't work.
score: 1
has comment: http://stackoverflow.com/comment/41558307
answer count: 1

http://stackoverflow.com/a/26492928
type: Answer
has body: You can do it as follows: function function2() { var prop2a = 5; var prop2b = 10; function1({prop2a, prop2b}); } and you need to call function2 where you need it.
answers question: http://stackoverflow.com/q/26492308
score: 0

http://stackoverflow.com/q/26440553
tagged with: recursion
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41526268
has comment: http://stackoverflow.com/comment/41524663
type: Question
has comment: http://stackoverflow.com/comment/41526135
tagged with: function
accepted answer: http://stackoverflow.com/a/26440576
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41541695
favorite count: 0
has title: Javascript Recursive function not calling itself
score: 0
has comment: http://stackoverflow.com/comment/41526281
has body: I want to have a live update on how many seconds have I started working on something. So I used recursive function to call itself. But however when I run, there seems to be an error as it is not updating. Following is my code: getDiff(); function getDiff(){ var date1 = new Date("04/06/2011"); var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var date2 = new Date($.now());; var timeDiff = Math.abs(date2.getTime() - date1.getTime()); var diffDays = 0; // seconds $("#webSeconds").html(Math.ceil(timeDiff / (1000))+" seconds"); setInterval(getDiff(),5000); } As you can see, I am using setInterval but nothing is happening, any advice?
upvote count: 1
has answer: http://stackoverflow.com/a/26440576
downvote count: 1

http://stackoverflow.com/comment/41557579
has text: This is completely backwards. You have the data in javascript object form where you can directly access all the parts. You do NOT want to stringify it and turn it into an easter egg hunt to find what you want. Show us what the JSON data looks like and point out exactly what you want out of the data.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26458866

http://stackoverflow.com/q/26385597
downvote count: 1
type: Question
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26385855
favorite count: 0
tagged with: promise
has comment: http://stackoverflow.com/comment/41425689
has answer: http://stackoverflow.com/a/26385855
has comment: http://stackoverflow.com/comment/41425509
type: AnsweredQuestion
tagged with: bluebird
linked to: http://stackoverflow.com/q/4616202
has title: Passing return value of one promise as a parameter for another
has body: Probably a very simple question, but here goes: I'm using Bluebird promises, but I want to pass the value returned from one promise into another one as a parameter. My current code is thus: Promise.props reports: @app.Reports.getReports() years: @app.Years.getYears() .then (promised) =&gt; console.log promised But really I want to be able to use promised.years as the first parameter for getReports, so it would be something like reports: @app.Reports.getReports(promised.years) I tried nesting promises but it exploded. I tried getting the years promise from inside the reports definition, but it exploded. Any ideas? Thanks!
upvote count: 1

http://stackoverflow.com/comment/41536407
has text: I didn't design it so it's checkboxes for now, although radio buttons makes more sense to me too
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26447030

http://stackoverflow.com/a/26370316
has comment: http://stackoverflow.com/comment/41399769
has comment: http://stackoverflow.com/comment/41398138
score: 0
has comment: http://stackoverflow.com/comment/41398040
has body: Let's start with your database connection, which should be on a separate secure page. connect.php: &lt;?php function db(){ return new mysqli('host', 'username', 'password', 'database'); } ?&gt; Obviously, your host will not be 'host'. Now main.php: &lt;?php // only use for PHP on this page for initial page load - target other pages with AJAX ?&gt; &lt;!DOCTYPE html&gt; &lt;html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'&gt; &lt;head&gt; &lt;meta http-equiv='content-type' content='text/html;charset=utf-8' /&gt; &lt;title&gt;This is Where Your Title Goes&lt;/title&gt; &lt;script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'&gt;&lt;/script&gt; &lt;script type='text/javascript' src='main.js'&gt;&lt;/script&gt; &lt;link rel='stylesheet' type='text/css' href='main.css' /&gt; &lt;/head&gt; &lt;body&gt; &lt;div id='map_container'&gt; &lt;div id='map_size'&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; Now for main.js: //&lt;![CDATA[ $(function(){ var ms = $('#map_size'); $.post('main_init.php', {init:'1'}, function(d){ for(var i in d){ var di = d[i], x = di.x, y = di.y; var sti = $("&lt;div class='station_info_' id='station_info_"+i+"'&gt;&lt;/div&gt;").css({ left:x, top:y }); // HTML id, class, and name attributes cannot start with a number $("&lt;div class='desk_box' data='"+i+"'&gt;id&amp;#058;"+i+'&lt;/div&gt;').css({ left:x, top:y }).appendTo(ms).append(sti).click(function(){ var info = $(this).next(); $.post('live_info.php', {station_id:info.attr('id').replace(/^station_info_/, '')}, function(r){ // do stuff with r info.html('love:'+r.love+'&lt;br /&gt;hate:'+r.hate).toggle(); }, 'json'); }); } }, 'json'); }); // use CSS to do `.desk_box,.station_info_{position:absolute;}` //]]&gt; Now for main_init.php: &lt;?php if(isset($_POST['init']) &amp;&amp; $_POST['init'] === '1'){ include_once 'connect.php'; $db = db(); $json = array(); $q = $db-&gt;query("SELECT * FROM table WHERE"); // example only if($q…
answers question: http://stackoverflow.com/q/26369957
type: Answer
has comment: http://stackoverflow.com/comment/41398348

http://stackoverflow.com/q/26486186
has body: I am using GeckoFX 29 as well as xulrunner. string text = " function hi(){ return 1;}"; GeckoElement script = geckoWebBrowser.Document.CreateElement("script"); script.SetAttribute("type", "text/javascript"); script.SetAttribute("language", "javascript"); GeckoTextNode popText = geckoWebBrowser.Document.CreateTextNode(text); script.AppendChild(popText); geckoWebBrowser.Document.Head.AppendChild(script); later on i am calling this function like this. using (AutoJSContext context = new AutoJSContext(geckoWebBrowser.Window.JSContext)) { context.EvaluateScript(" hi();" , out result); } i am not getting the value return by function hi result is empty evaluate script is returning false. what is wrong with this any help ? thanks
type: AnsweredQuestion
type: Question
tagged with: c#
score: 0
has answer: http://stackoverflow.com/a/26497840
has title: how to inject javascript function and call it later using gecofx
tagged with: geckofx
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26497840

http://stackoverflow.com/q/26513621
has comment: http://stackoverflow.com/comment/41657341
has comment: http://stackoverflow.com/comment/41657268
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41657135
has answer: http://stackoverflow.com/a/26514107
tagged with: settimeout
type: Question
answer count: 2
has title: Make a div move using jquery
has comment: http://stackoverflow.com/comment/41657247
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41657098
has body: I'm trying to make a div move of 50px from left to right every 500 milliseconds with the following jquery code: #obj{ background-color:red; width:100px; height:100px; border-radius:10px 10px 10px 10px; -moz-border-radius:10px 10px 10px 10px; -webkit-border-radius:10px 10px 10px 10px; margin-left:0px; } ... Test But that's not working. When I launch it with Firefox or Internet Explorer, the box gets immediately to a huge distance from the margin (much bigger than the width of the screen), and now I noticed that if I run it with stackoverflow's snippet function the box does not move. What could be the problem?
possible better answer: http://stackoverflow.com/a/26514107
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26513717
accepted answer: http://stackoverflow.com/a/26513717

http://stackoverflow.com/a/26358234
has comment: http://stackoverflow.com/comment/41375725
type: Answer
score: 2
has body: It may have to do with resetting the call stack and caching. Here's an interesting talk about the way call stacks work in javascript. The link to an SO-answer @Jiving gave in the comments to your question is also very useful. If you want to measure pure calcalation time, running it in a web worker may be viable. I moved your scripting to it, see this jsFiddle. Furthermore, replace for (i = 0; i &lt; 100; ++i) // and for (e = 0; e &lt; 50000; ++e) into for (var i = 0; i &lt; 100; ++i) //and for (var e = 0; e &lt; 50000; ++e) to prevent polluting the global scope.
upvote count: 2
answers question: http://stackoverflow.com/q/26357225
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26357225

http://stackoverflow.com/q/26482265
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26482367
has body: I have a bubble chart, where nodes are declared as below and I append for each circle a class which is decided by a array ("category") which decides its category, the variable color is d3.scale.category10() .domain(d3.range(number of elements in "category" array));. var node = svg.selectAll("circle") .data(nodes) .enter().append("circle") .attr("class", function(d) {return category[d.cluster];}) .text(function(d) { return d.text; }) .filter(function(d){ return d.count &gt;= 1; }) .style("fill", function(d) { return color(d.cluster); }) .call(force.drag); Next, I make a legend which depends on the categories of each of the circles with their color (as shown above). For this, I do the following var legend = svg.selectAll(".legend") .data(color.domain()) .enter().append("g") .attr("class", "legend") .attr("transform", function(d, i) { return "translate(0," + i * 20 + ")"; }); legend.append("rect") .attr("x", width - 18) .attr("width", 18) .attr("height", 18) .style("fill", color) legend.append("text") .attr("x", width - 24) .attr("y", 9) .attr("dy", ".35em") .style("text-anchor", "end") .text(function(d) { return category[d]; }) Now, what I want is that when the user clicks the legend text, then the bubbles corresponding to the category of the legend be hidden. So I add the following to the legend, text object. .on("click", function(d){ node.selectAll('.'+category[d]).style("visibility", "hidden"); }); But, this does not hide the nodes. Please help.
has comment: http://stackoverflow.com/comment/41600171
tagged with: d3.js
type: AnsweredQuestion
score: 0
type: Question
has title: D3 change visibilty of nodes on click based on class
has answer: http://stackoverflow.com/a/26482367

http://stackoverflow.com/a/26513710
has body: Try onchange instead of onclick: Name: Phone: Address: and then remove all of your timeouts.
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26513548
answers question: http://stackoverflow.com/q/26513548
type: AcceptedAnswer

http://stackoverflow.com/q/26373322
tagged with: mutation-observers
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/2937975
linked to: http://stackoverflow.com/q/14561676
has comment: http://stackoverflow.com/comment/41500141
type: Question
linked to: http://stackoverflow.com/q/1391278
tagged with: 2-way-object-databinding
has comment: http://stackoverflow.com/comment/41417266
has answer: http://stackoverflow.com/a/26428010
linked to: http://stackoverflow.com/q/4767848
downvote count: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/15108602
has comment: http://stackoverflow.com/comment/41500912
has comment: http://stackoverflow.com/comment/41412303
has body: I want to have a collection like: var array = [{innerText: "I was with ", index:0},{obj: "Mary", id: 1, index:1}, {innerText: " and ", index:2},{obj: "John", id: 2, index:3}]; and a content editable div that will have all those up there but bound to the the array so that when I change either the innerText or the inputs that represent the objects the array will be updated accordingly. For example the div would look something like that without the angularJS stuff: I was with and This should work with backspace in the div and also new inputs to be inserted or text to be typed, updating the array accordingly. I know that possibly I have to use Mutation Observers but I don't know how in this complicated example. I hoped for AngularJs to have some more automated integration with mutation observers :/ My primitive approach was: I made a directive for the whole collection, a directive for the innerText and a directive for the objects. The binding of the inputs with the object names works of course but not when the internal DOM of contenteditable is mutated. Also having {{innerText}} as a template for innerText and using it in contenteditable wasn't guaranteethat someone will actually type in it so the binding will work (and not before or after it) Edit: If it makes it easier a collection like that with the same contenteditable is still very useful var array = [{obj: "Mary", id: 1, index:1}, {obj: "John", id: 2, index:3}, {innerText: "I was with @ and @"]; Edit2: Reopened the question. The previously accepted answer approach was really good but today I realized it is not real 2-way binding. It is actually 1-way binding. Going from the view to the model. The bounty will be awarded if an updated version of the provided code (from the previously accepted answer) is used to get a model like modelValue": [ { "innerText": "abc", "index": 0 }, { "obj": "abc", "index": 1 }, { "innerText": "abc", "index": 2 } ] and this will make the view: "viewValue": "\n abc\n \n abc\n " The soluti…
accepted answer: http://stackoverflow.com/a/26428010
favorite count: 0
tagged with: contenteditable
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41500961
has comment: http://stackoverflow.com/comment/41499858
upvote count: 1
has comment: http://stackoverflow.com/comment/41499886
has title: how to do AngularJS 2-way binding of multiple objects in contenteditable including surrounding text

http://stackoverflow.com/q/26428902
possible better answer: http://stackoverflow.com/a/26429001
type: AnsweredQuestion
tagged with: jquery-ui-spinner
has body: Currently I have a an input text field that may or may not have a timespinner tied to that particular element. In some cases, I need to remove the timespinner functionality altogether (as opposed to disabling it), to display it properly on the page. Currently, I have code to check if the timespinner exists on the element as follows: if ($("#ElementOfInterest").timespinner !== undefined){ $("#ElementOfInterest").timespinner("destroy"); } This works fine when the page is first loaded, however, this throws the following exception: cannot call methods on timespinner prior to initialization; attempted to call method 'destroy' For some reason, the check for undefined passes and tries to a timespinner on the element that doesn't exist. So the only way for my UI to run properly at the moment is to wrap it in a try/catch block like this: if ($("#ElementOfInterest").timespinner !== undefined) { try { $("#ElementOfInterest").timespinner("destroy"); } catch (error) { } } This works, but it is rather sloppy. I would rather have the check be successful and remove the try/catch block from the code. Am I missing some special check or something? What's going on here? Update I tried the following code suggested by @GlenSwift: if (typeof $("#ElementOfInterest").spinner("instance") !== 'undefined') { $("#ElementOfInterest").timespinner("destroy"); } This however, gave me this exception: cannot call methods on spinner prior to initialization; attempted to call method 'instance' I also tried timespinner("instance") but I simply got back: undefined is not a method So it looks like checking for an instance of a timespinner was not implemented.
has comment: http://stackoverflow.com/comment/41502819
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26429001
has comment: http://stackoverflow.com/comment/41502904
accepted answer: http://stackoverflow.com/a/26433425
score: 0
answer count: 2
tagged with: spinner
has answer: http://stackoverflow.com/a/26433425
has title: TimeSpinner Check If Undefined Not Working

http://stackoverflow.com/q/26365676
has title: Make hidden input field visible HTML Javascript
score: 1
has comment: http://stackoverflow.com/comment/41390113
has comment: http://stackoverflow.com/comment/41389869
tagged with: javascript
has answer: http://stackoverflow.com/a/26366175
has answer: http://stackoverflow.com/a/26366584
has body: Html input field is inside anchor tag like so .. Anchor Title Javascript uses set attribute ACTUAL RESULTS Anchor title is cleared on click But, the input field is still hidden Wanting To Achieve Anchor title cleared on click Input text field appears User inputs text Text from input becomes anchor title Input field becomes hidden again
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41390302
favorite count: 0
has comment: http://stackoverflow.com/comment/41388925
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41389740
has comment: http://stackoverflow.com/comment/41389596
has comment: http://stackoverflow.com/comment/41389442
upvote count: 1
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41389005
type: Question

http://stackoverflow.com/comment/41608477
score: 0
has text: @epascarello I'm not sure, I'm a bit lost. would u be able to help?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26487062

http://stackoverflow.com/q/26424230
has comment: http://stackoverflow.com/comment/41493667
tagged with: node.js
favorite count: 0
upvote count: 2
downvote count: 2
has body: I have this piece of code responsible to query a database and output the information as JSON format: connectionpool.getConnection(function(err, connection) { if (err) { console.error('CONNECTION error: ',err); res.statusCode = 503; res.send({ result: 'error', err: err.code }); } else { connection.query(query, function(err, rows) { if (err) { console.error(err); res.statusCode = 500; res.send({ result: 'error', err: err.code }); } else { res.send({ json: rows }); } connection.release(); }); } }); The output is the following: {"json":[{"id":39937,"transcript_alias":"AC148152.3_FGT007","expression":0,"tissue":"Leaf","conditions":"No-stress"},{"id":39941,"transcript_alias":"AC155352.2_FGT012","expression":0.217,"tissue":"Leaf","conditions":"No-stress"}]} but I'd like to have this output: {"json":[ {"id":39937, "transcript_alias":"AC148152.3_FGT007", "expression":0, "tissue":"Leaf", "conditions":"No-stress"}, {"id":39941, "transcript_alias":"AC155352.2_FGT012", "expression":0.217, "tissue":"Leaf", "conditions":"No-stress" } ]} with break lines, making it more visible and understandable. Is that possible?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26424317
has title: Formatting JSON output in NodeJS
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41493535
linked to: http://stackoverflow.com/q/5693999
type: Question
duplicate of: http://stackoverflow.com/q/5693999
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26424317

http://stackoverflow.com/comment/41485679
type: Comment
comment on: http://stackoverflow.com/a/26415480
has text: Joe - New Nine, I tried your suggestion but I'm still not getting the response back in the js. In the console I get the error 'Uncaught SyntaxError: Unexpected token < '
score: 0
type: AnswerComment

http://stackoverflow.com/q/26451377
favorite count: 0
accepted answer: http://stackoverflow.com/a/26451886
tagged with: google-chrome-extension
upvote count: 2
tagged with: google-chrome
has body: I am making a Chrome extension and i need to get PHPSESSID from cookies. When I type document.cookie in console I get the cookies of the page but not PHPSESSID but when i open EditThisCookie the PHPSESSID is shown: How can I get the PHPSESSID value? I tried function getPHPSESSID() { var url = tab.url; chrome.cookies.get({"url": url, "name": 'PHPSESSID'}, function(cookie) { alert(cookie.value); }); }
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26451886
tagged with: cookies
has title: Get cookies with javascript
score: 2
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/26455274
has body: As simple solution I suggest to use var newWords = data.match(/[\w\xc0-\xd6\xd8-\xf6\xf8-\xff]+/g); This matches strings consisting only of letters A-Z in any case as well as all letters with code value 192 to 255 in code page ISO/IEC 8859-1 which is similar to Windows-1252 with the exception of the multiplication sign and the obelus as long as the data string contains just North American and Western European text. With the expression var newWords = data.match(/[\w\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff]+/g); the Unicode values of the special language specific letters in ISO/IEC 8859-1 respectively Windows-1252 are explicitly specified and therefore other letters of other languages like Eastern European languages are ignored by the expression.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26453939
upvote count: 2
answers question: http://stackoverflow.com/q/26453939

http://stackoverflow.com/a/26494769
has comment: http://stackoverflow.com/comment/41623562
has comment: http://stackoverflow.com/comment/41622934
upvote count: 6
has comment: http://stackoverflow.com/comment/41624476
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26494723
has body: Try: var startDate = moment("10/1/2014"); var nf = moment("10/1/2014").day("Friday"); alert(startDate); alert(nf); You can also do (as you asked) var nf = moment(startDate).day("Friday"); You are setting the day of startDate which is changing it, you need to make a separate object if you want to be able to have two different values. If your diff gives the wrong answer, it's because you set it before changing the dates. It won't dynamically update for you, you need to re assign its value
has comment: http://stackoverflow.com/comment/41623290
answers question: http://stackoverflow.com/q/26494723
score: 6
type: Answer
has comment: http://stackoverflow.com/comment/41624488
has comment: http://stackoverflow.com/comment/41624420
downvote count: 0
has comment: http://stackoverflow.com/comment/41624227

http://stackoverflow.com/comment/41636370
comment on: http://stackoverflow.com/q/26502320
type: Comment
score: 2
has text: crate a function and execute it..
type: QuestionComment

http://stackoverflow.com/q/26392398
score: 0
has answer: http://stackoverflow.com/a/26423859
has body: I have been trying to plot parallel coordinates with two axes. One being the IP addresses and other the number of requests sent by an IP address in a single day, using D3.js. I used the direct implementation from http://syntagmatic.github.io/parallel-coordinates/. When the number of discrete IP addresses increases above 1000, the IP address axis stops showing up. Just to test, I tried integer values instead of IP addresses, with even more than 10,000 unique values it worked fine. I also tried string with only one '.' in them instead of 4 which are in IP addresses, and it worked fine. But for IP addresses it doesn't. Any specific this I might be looking into ?
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41439753
tagged with: parallel-coordinates
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41438290
has title: Plotting IP addresses on axis
accepted answer: http://stackoverflow.com/a/26423859
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/26498273
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26496151
accepted answer of: http://stackoverflow.com/q/26496151
has body: This worked for me $(document).on('click', '#navpanel .mainnav a[href^="/#"]', function(e){ if($(this).parent('li').hasClass('expanded')) { $(this).siblings('ul').css('display', 'block').slideDown('linear', function(){ $(this).toggleClass('expanded'); $('ul.tier1').css('height', '50px'); }); } else { $(this).siblings('ul').css('display', 'none').slideUp('linear', function(){ $(this).toggleClass('expanded'); $('ul.tier1').css('height','auto'); }); } e.preventDefault(); });

http://stackoverflow.com/comment/41559273
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26459300
has text: really? i just tried it on ie11 and no tooltip is showing for an empty title attribute.
score: 0

http://stackoverflow.com/comment/41654253
type: QuestionComment
has text: Hi @meetamit, thanks so much for your explanation. It's clear that was some kind of classic mistake. However, it still does not work now that I've made the changes. (you can check the same web page quoted up there)...
score: 0
comment on: http://stackoverflow.com/q/26509520
type: Comment

http://stackoverflow.com/q/26512710
tagged with: css
has answer: http://stackoverflow.com/a/26512957
has body: When I hover the mouse over first div,the image changes. But when I hover the mouse over second div then also the image from the first div changes. Does anyone know how to do it only in javascript?
score: 0
accepted answer: http://stackoverflow.com/a/26512852
has title: How to use onmousehover event on multiple elements?
has answer: http://stackoverflow.com/a/26512980
has comment: http://stackoverflow.com/comment/41655813
tagged with: javascript
answer count: 3
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26512852
type: Question
has comment: http://stackoverflow.com/comment/41655642
possible better answer: http://stackoverflow.com/a/26512957

http://stackoverflow.com/a/26476370
has body: You can detect a click event within an iframe only if it is on the same domain. See @Tim Down's answer at JavaScript: Detection of a link click inside an iframe If the iframe is on another domain, you can take advantage of the fact that a blur event will occur on the document when you click the iframe. You'll need to set a tabIndex on the body element for this to work: document.body.tabIndex= 0; document.addEventListener('blur', function (event) { t.innerHTML += 'outside &lt;br&gt;'; }, true); Note that multiple clicks within the iframe will trigger only one blur event. Fiddle: http://jsfiddle.net/zrgrt9pf/13/
has comment: http://stackoverflow.com/comment/41592786
accepted answer of: http://stackoverflow.com/q/26475422
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26475422
type: Answer
score: 3
downvote count: 0

http://stackoverflow.com/comment/41547854
comment on: http://stackoverflow.com/q/26452386
type: QuestionComment
type: Comment
has text: Yes @bebraw, that is correct. But only certain properties from a particular item from an ng-repeat list.
score: 0

http://stackoverflow.com/comment/41621001
score: 0
type: Comment
has text: You did not do what I asked you. Again, I made the form with Ajax captcha and send the results of captcha by ajax to the php script that validates the data. And found no problems. Show how you do it.
type: QuestionComment
comment on: http://stackoverflow.com/q/26457538

http://stackoverflow.com/a/26505572
has comment: http://stackoverflow.com/comment/134817557
has body: Assuming that the range of integers in Java is actually "–2147483648 &lt;= n &lt;= 2147483647", the expression ((+a)|0) == a will work as specified. +a evaluates the expression a as a number; |0 converts the number to 32-bit integer The comparison will fail, when a is not exactly representable by an 32-bit integer.
upvote count: 7
score: 7
has comment: http://stackoverflow.com/comment/134835671
downvote count: 0
has comment: http://stackoverflow.com/comment/41672580
answers question: http://stackoverflow.com/q/26504604
type: Answer

http://stackoverflow.com/comment/41640041
type: QuestionComment
has text: Yes, simply use captcha... The JS validation is client side, PHP will validate the posted data (server-side)
comment on: http://stackoverflow.com/q/26504303
score: 0
type: Comment

http://stackoverflow.com/q/26431257
has comment: http://stackoverflow.com/comment/41507336
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/49171752
has body: I am attempting to create a minimal example where I can accomplish what I describe above. For this purpose, here is my attempt for a minimal example, where in the end I would like to see in the output negative of 1 is -1 plus one of 2 is 3 Here is my code. var async = require('async'); var i, args = [1, 2]; var names = ["negative", "plusOne"]; var funcArray = [ function negative(number, callback) { var neg = 0 - number; console.log("negative of " + number + " is " + neg); callback(null, neg); }, function plusOne(number, callback) { setTimeout(function(number, callback) { var onemore = number + 1 console.log("plus one of " + number + " is " + onemore); callback(null, onemore); }, 3000); }]; var funcCalls = {}; for (i = 0; i < 2; i++) { funcCalls[names[i]] = function() { funcArray[i].apply(this, args[i]); }; } async.parallel(funcCalls, function(error, results) { console.log("Parallel ended with error " + error); console.log("Results: " + JSON.stringify(results)); }); Note that I am passing a named object to async.parallel as well. Passing an array (and forgetting entirely about the names) would also work as an answer for me, but I am more interested in passing such an object. Any ideas on achieving my goal?
accepted answer: http://stackoverflow.com/a/26431357
upvote count: 6
has answer: http://stackoverflow.com/a/49171752
tagged with: javascript
has comment: http://stackoverflow.com/comment/41507441
has answer: http://stackoverflow.com/a/26431357
tagged with: asynchronous
favorite count: 0
score: 6
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41507319
downvote count: 0
has title: Passing arguments to async.parallel in node.js

http://stackoverflow.com/a/26474451
has body: The solution was this, although any "math guy" or gal would probably be able to simplify this some, I feel like I am over complicating it but I get what I need reliably. If you simplify it please offer some explanation. Math.acos returns a floating point from -180 to 180 with zero facing right/east (if viewing as a compass) and 0 to -180 covering the top half of the circumference of the circle. 0 through +180 goes from the right to the left covering the bottom half circumference of the circle (180 being half of 360). That is probably normal for folks that do math once in a while (0 being to the right and counter clockwise increases the number). Since I start with 2 x/y points and I know I want 0 to face up/north I can auto-create the third point in the function and just require 2 points as arguments. So with 3 points, one always facing up/north on the 2d plane, I get the radians from Math.acos as described above. I then get the result of Math.atan2 which gives me what appears like radians again (0-180 and 0- -180) but instead of 0 facing east/right it faces up/north and so with this additional information (as well as it being signed [+-]) I can derive which quadrant the original number was in (the unsigned 0-180) and than I just correct the degree variable by subtracting from 360 if the point was in either top or bottom left side quadrants. Convoluted, yes, functional yes, elegant, notta. Marking as answered to not take up resources for others but a more sound explanation would be welcomed. findBearingOfTwoPoints: function(p1, p2, forceInt){ var degrees = 0; try{ var a1 = Math.sqrt(Math.pow(p1.x - p1.x, 2) + Math.pow(p1.y - (p1.y - 10), 2)); var a2 = Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); var a3 = Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - (p1.y - 10), 2)); // this is probably better to be called radians degrees = (180 * (Math.acos((a2 * a2 + a1 * a1 - a3 * a3)/(2 * a2 * a1))) / Math.PI); var angle = 0; var deltaY = p2.y - p1.y; va…
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26470944

http://stackoverflow.com/comment/41559292
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26459101
type: AnswerComment
has text: Sorry again! I meant for that css rule to be `.box > p:first`

http://stackoverflow.com/q/26493090
tagged with: handlebars.js
has answer: http://stackoverflow.com/a/26493158
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26493138
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26493138
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26493158
favorite count: 0
has title: Enabling a button when value is entered in input box
has comment: http://stackoverflow.com/comment/41619950
upvote count: 2
score: 0
has body: i have an input box(createBIAInput) that enables a save button(saveBtn) when a value has been entered into it. however it doesnt recognize when a value has been pasted into it with a mouse so save button(saveBtn) does get enabled. So i need to know how to enable the save button even when a value as been copied and pasted with a mouse. FYI it works if you type in the value or you use "control V" to enter value.
downvote count: 2

http://stackoverflow.com/q/26417155
has comment: http://stackoverflow.com/comment/41481523
has body: I'm trying to collect data entered inside textboxes wrapped in div within a form.I'm using session to gather an array of data passed by the submit button. However it only captures the very first row of data. I believe data entered in textboxes created by javascript not recognised? HTML Entry 1 &lt;input type="text" name="myInputs_d[]" size='5' style='margin:4px;'&gt;D(mm) &lt;input type="text" name="myInputs_d1[]" size='5' style='margin:4px;'&gt;D1(mm) &lt;input type="text" name="myInputs_bags[]" size='5' style='margin:4px;'&gt;Bags &lt;input type="text" name="myInputs_carton[]" size='5' style='margin:4px;'&gt;Cartons &lt;/div&gt; &lt;input type="submit" value="submit" name="submit"&gt; &lt;/form&gt; &lt;input type="button" value="Add another text input" onClick="addInput('dynamicInput');"&gt; javascript to create multiple textboxes &lt;script&gt; var counter = 1; var limit = 10; function addInput(divName){ if (counter == limit) { alert("You have reached the limit of adding " + counter + " inputs"); } else { var newdiv = document.createElement('div'); newdiv.innerHTML = "Entry " + (counter + 1) + " &lt;input type='text' name='myInputs_d[]' size='5' style='margin:5px;'&gt;D(mm)&lt;input type='text' name='myInputs_d1[]' size='5' style='margin:5px;'&gt;D1(mm)&lt;input type='text' name='myInputs_bags[]' size='5' style='margin:5px;'&gt;Bags&lt;input type='text' name='myInputs_carton[]' size='5' style='margin:5px;'&gt;Cartons"; document.getElementById(divName).appendChild(newdiv); counter++; } } &lt;/script&gt; Php to echo all the data entered $_SESSION['myInputs_all'][]=array($_POST["myInputs_d"],$_POST["myInputs_d1"],$_POST["myInputs_bags"],$_POST["myInputs_carton"]); print_r($_SESSION['myInputs_all']); foreach ($myInputs_all as $eachInput) { echo $eachInput . "&lt;br&gt;"; } I might have entered three sets of records ,but when I print_r($_SESSION['myInputs_all']);..... it only shows the first record like this. Array ( [0] =&gt; Array ( [0] =&gt; 10 ) [1] =&gt; Array ( …
type: Question
has answer: http://stackoverflow.com/a/26417349
answer count: 2
has comment: http://stackoverflow.com/comment/41482081
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41481865
score: 0
has title: Unable to collect data from additional textbox created by javascript
has comment: http://stackoverflow.com/comment/41481469
accepted answer: http://stackoverflow.com/a/26417349
has comment: http://stackoverflow.com/comment/41482658
has comment: http://stackoverflow.com/comment/41481403
has answer: http://stackoverflow.com/a/26417442
has comment: http://stackoverflow.com/comment/41481655
tagged with: php
has comment: http://stackoverflow.com/comment/41481648
possible better answer: http://stackoverflow.com/a/26417442
type: AnsweredQuestion

http://stackoverflow.com/a/26372631
answers question: http://stackoverflow.com/q/26366147
has comment: http://stackoverflow.com/comment/41560416
score: 0
has body: The problem, as commented by shaunhusain is the fixed pane where particular elements will be drawn. It's correct that you need to use a custom overlay, but you must use it to draw the marker, not the infobubble. The reason: infobubble is an implementation of a custom overlay, it will be drawn inside the floatPane. To put the marker on top the infobubble must be drawn into a pane with a zIndex equal or lower than the zIndex of the pane where the marker will be drawn. But here comes the problem: all these panes do not receive mouse-events, you wouldn't be able to interact with the infobubble(select tabs, select text, click links, close the infobubble). Therefore you must use a custom overlay to draw the markers, and you must put these overlays into the floatPane(it's the pane with the highest zIndex)
type: Answer

http://stackoverflow.com/comment/41576115
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26469185
has text: Genius! I am trying my best at programming but somehow i just can't think of things like this by myself... I always try it too difficult or too easy.. your help is much appreciated!

http://stackoverflow.com/q/26417359
score: 5
has title: How does one use "prompt" and "alert" javascript commands in webstorm?
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: webstorm
favorite count: 0
has comment: http://stackoverflow.com/comment/41498038
has answer: http://stackoverflow.com/a/26426350
has comment: http://stackoverflow.com/comment/41481963
has body: When i try to use prompt or alert to get user input in webstorm, I get an error: answers[i] = prompt(allQuestions[i].question) ^ ReferenceError: prompt is not defined As far as I know, prompt and alert are fine functions in javascript. Could it be because I am running the code in the console? If so, how do I set variables to user inputted strings (i.e. prompt function)? If not, what's going wrong and how do I fix it?
accepted answer: http://stackoverflow.com/a/26426350
type: AnsweredQuestion
type: Question
upvote count: 5

http://stackoverflow.com/comment/41508662
comment on: http://stackoverflow.com/q/26431845
score: 0
type: QuestionComment
has text: Did you make sure the textarea is not inside a label tag with a for attribute for the radio button?
type: Comment

http://stackoverflow.com/comment/41374888
type: Comment
has text: The language attribute has been deprecated for a decade or more (https://developer.mozilla.org/en/docs/Web/HTML/Element/script) so you might also want to check with a more recent source for your code.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26358157

http://stackoverflow.com/a/26548391
has body: With Skalár Wag help, I made hexagonal with 3 rectangles, put border radius and put image on top. All is contained in a "fa-container-surface" to manage only one event click by hexagonal. Below is the code I used : <fa-image-surface fa-image-url="{{hexagon.img}}" fa-size="[60, 40]" class="hexagon-tile-img"/> {{hexagon.text}} And in my controller : /////////////////////////////// // Define constants $scope.csts = { hexagonTileHeight: 75, hexagonTileWidth: 80, hexagonTileMargin: 5, }; /////////////////////////////// // Define Hexagonal definition // Math.PI / 3 = 60° $scope.rects = [ {idx: 0, rotateZ: 0}, {idx: 1, rotateZ: Math.PI / 3}, {idx: 2, rotateZ: -Math.PI / 3} ]; /////////////////////////////// // Define hexagonal list $scope.hexagonList = [ {idx: 0, column: 0, line: 0, color: "#43D0FA", opacity: 1, img: './img/1.png', text:'1'}, {idx: 1, column: 1, line: 0, color: "#14AF59", opacity: 1, img: './img/2.png', text:'2'}, {idx: 2, column: 0, line: 1, color: "#E1553E", opacity: 1, img: './img/3.png', text:'3'} ]; /////////////////////////////// // Hexagon tile events $scope.onClickHexagonTile = function($hexagonTileIdx) { console.log('Click on hexagon tile : ' + $hexagonTileIdx); };
accepted answer of: http://stackoverflow.com/q/26467692
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26467692
type: AcceptedAnswer

http://stackoverflow.com/comment/41524154
has text: There are certain things, which you've to do to achieve what you want. AFAIK, that is not possible (`c.name()`)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26440306

http://stackoverflow.com/comment/41509213
score: 1
has text: What do you mean by "add milliseconds"? setInterval takes in a number of milliseconds before it fires off your function.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26432305

http://stackoverflow.com/a/26474397
has body: Use javascript:void(0); instead of # as follows: foo Using the void operator in the href attribute of the anchor tag ensures that the browser will still display it the same way as any other anchor tag (depending on your CSS settings, this is generally a blue underlined text that changes the cursor when hovered over... etc), prevents the page redirecting to a URL that's just effectively the same page but with the added hash character (#) at the end of the address line, while also makes your onclick event to fire.
upvote count: 35
accepted answer of: http://stackoverflow.com/q/26474292
score: 34
answers question: http://stackoverflow.com/q/26474292
type: AcceptedAnswer
downvote count: 1
type: Answer

http://stackoverflow.com/comment/41625308
type: Comment
comment on: http://stackoverflow.com/q/26495967
has text: Possible duplicate : http://stackoverflow.com/questions/41948/how-do-i-get-the-difference-between-two-dates-in-javascript
score: 0
type: QuestionComment

http://stackoverflow.com/q/26414295
has body: I am going through a book to learn ajax and I am stuck as my Servlet response (just text) is not showing up in my JavaScript in an alert. When the button is clicked it calls a JavaScript function and then an http request get sent asynchronously. I don't understand why the String is not showing in the response. Thanks for any light anyone can shed on this. EDIT: Also, I get a status code of 200 after sending the "get" request. When I look at firebug under console I see the Get request with 200 status code. There a 3 tabs - Params, Headers, and XML. Under Params I see my dummy parameter that I send in the request. Under Headers there are 2 nodes - Response Headers and Request Headers. When I expand the Response Header node I see a thing called content-length with a 0 after it. Does that mean there is nothing in my response??? Here is my HTML Boards 'R' Us Boards 'R' Us :: How Much Butt We're Kicking Snowboards Sold 1672 What I Sell 'em For $249.95 What it Costs Me $84.22 Boots Sold 312 What I Sell 'em For $175.47 What it Costs Me $54.23 Bindings Sold 82 What I Sell 'em For $146.92 What it Costs Me $98.03 Cash for the Slopes: $318936.42 and my JavaScript function getNewTotals() { console.log("Getting new totals"); var url = "boards.do"; url = url + "?dummy=" + new Date().getTime(); request.open("GET", url, true); request.onreadystatechange = updatePage; request.send(null); } function updatePage() { if (request.readyState == 4) { if (request.status == 200) { var reply = request.responseText; alert("returned: " + reply); } else { alert("Error! Request status = " + request.status); } } } and my Servlet import java.io.IOException; import java.io.PrintWriter; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.gmail.gmjord.controller.Board…
tagged with: servlets
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41477678
tagged with: ajax
upvote count: 2
has answer: http://stackoverflow.com/a/26414418
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41476651
has comment: http://stackoverflow.com/comment/41500366
has title: Why is servlet response not showing in my JavaScript
score: 2
downvote count: 0
tagged with: java
has comment: http://stackoverflow.com/comment/41492988

http://stackoverflow.com/comment/41474297
has text: also pretty sure jqxGrid isn't a knockout bindable... do you mean to use data-bind="attr: {"jqxGrid": {....}} "http://knockoutjs.com/documentation/attr-binding.html
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26412032

http://stackoverflow.com/comment/41508288
has text: Note [`isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN) does NOT "detect whether something is `NaN`". Instead, it checks if something coerced to number is `NaN`. To detect whether something is `NaN`, ES6 [`Number.isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) can be used instead.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26426444

http://stackoverflow.com/a/26473953
score: 3
downvote count: 0
has body: Here you are a working example http://jsfiddle.net/vy9kf0w5/3/ You need to include Vimeo's Froogaloop script in your page in order to get events from Vimeo videos. Then it is very simple, on their supported events just do what you want :) The only other thing you need to do is to add ?api=1&player_id=video to the url :) iframe The CODE var iframe = $('#video')[0], player = $f(iframe); player.addEvent('ready', function() { player.addEvent('finish', onFinish); }); function onFinish(id) { alert('video has ended'); console.log('video has ended'); $('#vimeoembed').addClass('finished'); } Read more about Vimeos javaScript API here
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26473555
answers question: http://stackoverflow.com/q/26473555
type: Answer

http://stackoverflow.com/comment/41424016
type: AnswerComment
comment on: http://stackoverflow.com/a/26384940
type: Comment
has text: removed Kindly check this fiddle http://jsfiddle.net/ssgexu1y/ in the clears function i have removed all the code except this.model.clear();// But same error :(
score: 0

focus
tags question: http://stackoverflow.com/q/26381763
tags question: http://stackoverflow.com/q/26372468
tags question: http://stackoverflow.com/q/26439258
tags question: http://stackoverflow.com/q/26406718
type: Tag
tag name: focus

http://stackoverflow.com/comment/41545294
score: 0
type: Comment
type: QuestionComment
has text: @thecodethinker Ok. I tried this : 'res.redirect("http://www.google.fr");' and google send me a 400 Bad request. Is res a delete request ? [my postman screen](http://s29.postimg.org/ef0zdixk7/Capture.png)
comment on: http://stackoverflow.com/q/26434532

http://stackoverflow.com/a/26500313
answers question: http://stackoverflow.com/q/26500135
type: Answer
accepted answer of: http://stackoverflow.com/q/26500135
has body: This is happening because you've defined your form action as "calculator.js". You only need to include at the end of the HTML code, as you did. There's no need to set a form or form method since you won't post/get it, only process it via javascript. Also, the following lines will execute Calculator() whenever you change the value of x or y. I believe that is not what you intend... document.getElementById("x").addEventListener("change", Calculator, false); document.getElementById("y").addEventListener("change", Calculator, false); On time: sign is undefined and alert should be alert(answer). I'll edit my answer with a suggestion for your javascript. Suggestion: http://jsfiddle.net/xzkqvywf/
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0

orchardcms-1.8
tags question: http://stackoverflow.com/q/26418509
type: Tag
tag name: orchardcms-1.8

http://stackoverflow.com/q/26371152
answer count: 1
has comment: http://stackoverflow.com/comment/41399438
tagged with: javascript
tagged with: jquery
has body: Im trying to create some sort of temporary alert messages using jQuery so a alert message appears (a div with some style and a message ) and then after X seconds dissapear. If the user clicks again the alert will appear again... Currently my script is not even removing the alerts. Removing the temp_alert_X name to temp_alert will make them dissapear after X seconds but then if the user clicks again on the button the alert wont come out again until refresh.. function createFarm(){ $.ajax({ url: "ajax/new_farm.php", context: document.body }).done(function(data) { data = jQuery.parseJSON(data); if(data.error == 1){ $('.sidebar_frame').append("&lt;p&gt;&lt;div id='alert_error' class='temp_alert_" + new_farm_error + "'&gt; " + data.log + "&lt;/div&gt;&lt;/p&gt;") setTimeout(function() { $('.temp_alert_' + new_farm_error + '').remove() }, 200) new_farm_error++; }else{} }).fail(function() { alert( "Error while creating new farm 404." ); }); } Note: new_Farm_error = 0
has answer: http://stackoverflow.com/a/26371660
tagged with: http://stackoverflow.com/tag/html
has title: jQuery temporary alert messages
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41399402
has comment: http://stackoverflow.com/comment/41399509
has comment: http://stackoverflow.com/comment/41399454
score: 0

http://stackoverflow.com/a/26444232
type: Answer
answers question: http://stackoverflow.com/q/26443464
upvote count: 1
has body: The simplest fix is to use stop(true,true). This will stop the current animation, and with the 2 arguments true, remove it from animation queue and jump the current animation to it's end. $('.z_project_container').hover(function(){ $(this).children('.z_project_title').stop(true,true).fadeIn(200).animate({ bottom: "250px" }, 650); }); DEMO
score: 1
accepted answer of: http://stackoverflow.com/q/26443464
has comment: http://stackoverflow.com/comment/41531291
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41435356
score: 1
has text: Yeah same here man, click on "Crab Ball". http://jsfiddle.net/seano666/cgswo3nf/
comment on: http://stackoverflow.com/q/26390827
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41573891
type: AnswerComment
comment on: http://stackoverflow.com/a/26467891
score: 0
type: Comment
has text: The values have to be displayed in a flot chart like any charts. flot chart working for me when I use static data like numbers for example var data = [ [0, 454], [1, 87], [2, 343], [3, 43], [4, 3] ];. but when I try to echo my php variabes in the var data doesn't display anything I also noticed that my php variables working great with charts.js but not working when I use flot charts.

safari
tags question: http://stackoverflow.com/q/26479314
tags question: http://stackoverflow.com/q/26360854
tags question: http://stackoverflow.com/q/26374421
tags question: http://stackoverflow.com/q/26371878
tags question: http://stackoverflow.com/q/26507846
tags question: http://stackoverflow.com/q/26501221
tags question: http://stackoverflow.com/q/26401447
tags question: http://stackoverflow.com/q/26471526
type: Tag
tags question: http://stackoverflow.com/q/26396073
tags question: http://stackoverflow.com/q/26412336
tags question: http://stackoverflow.com/q/26472533
tags question: http://stackoverflow.com/q/26418164
tags question: http://stackoverflow.com/q/26390594
tags question: http://stackoverflow.com/q/26438178
tags question: http://stackoverflow.com/q/26392561
tags question: http://stackoverflow.com/q/26423193
tags question: http://stackoverflow.com/q/26489405
tags question: http://stackoverflow.com/q/26356050
tags question: http://stackoverflow.com/q/26489037
tag name: safari

http://stackoverflow.com/q/26451905
accepted answer: http://stackoverflow.com/a/26451960
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26452179
favorite count: 0
has title: Make CSS code change whilst viewing page
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/26451960
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26451958
score: 1
has comment: http://stackoverflow.com/comment/41545666
possible better answer: http://stackoverflow.com/a/26451958
type: Question
has body: I have a website and for Halloween I was thinking about adding a button that would change the site to halloween themed. This would be a hidden button therefore I would prefer it not be regularly in the CSS code. What i've been trying to do is make CSS code appear when you click the button via a Javascript function. Unfortunately, CSS is CSS and will just render it's code whether you hide it or not. In short I am looking for a way to change a page's layout via CSS through a function or any other method.
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41541578
type: Comment
comment on: http://stackoverflow.com/a/26449770
has text: I've given up, I can't get it to work and I know that your reply is correct so there's nothing more that I can do.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26384301
answers question: http://stackoverflow.com/q/26384184
accepted answer of: http://stackoverflow.com/q/26384184
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: You can do this with JS/jQuery var isAtleastOneSelected = false; $('#parentDiv').find('input[type="radio"]').each(function(){ if($(this).is(":checked")){ isAtleastOneSelected = true; break; } }); if(isAtleastOneSelected) { // Atleast one radio btn is selected and continue your work } Hope this helps
type: AcceptedAnswer

http://stackoverflow.com/comment/41605753
has text: you said that you wanted it to match even if foo:// was the protocol, if you dont want that then you'll need edit the first silent group to be: (https?:\/\/) instead of (?:[a-z]*?:\/\/) then it will only match http/s://
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26485139

http://stackoverflow.com/a/26446565
upvote count: 1
answers question: http://stackoverflow.com/q/26446522
has comment: http://stackoverflow.com/comment/41537665
has comment: http://stackoverflow.com/comment/41535658
accepted answer of: http://stackoverflow.com/q/26446522
type: AcceptedAnswer
downvote count: 0
has body: .concat() returns a new array so you have to assign the result back to your instance variable. So this: this.items.concat(newItems); needs to be changed to this: this.items = this.items.concat(newItems); or, you could actually use this to append to the array directly: this.items.push.apply(this.items, newItems); Because .push() can take more than one argument. Then, in your .removeItem() function, you need to remove the item you actually found by changing this: this.items.splice(2,1); to this: this.items.splice(i,1);
type: Answer
score: 1

http://stackoverflow.com/comment/41857864
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26459182
score: 0
has text: @User089247 any more ideas?

http://stackoverflow.com/comment/45158448
comment on: http://stackoverflow.com/a/26512907
score: 0
type: Comment
has text: Thanks @PaulFerrett, you're right. I embarrassed to think of the number of times I've impatiently explained the difference to non-technical family members and colleagues, and that I missed this blunder despite re-reading the question several times. Thanks for pointing out a significant error in my answer.
type: AnswerComment

http://stackoverflow.com/q/26492308
has comment: http://stackoverflow.com/comment/41618529
has comment: http://stackoverflow.com/comment/41618349
type: UnansweredQuestion
tagged with: javascript-objects
has title: reconstituting variables to create an object , in javascript
has comment: http://stackoverflow.com/comment/41618395
has body: I have a function like so: function1 (arg1) { do something with arg1.prop1a and arg1.prop1b } Thus, this function accepts an object as an argument, and does something with 2 properties of this object. I want to call function1 from function2 and function2 looks like so: function2(){ prop2a = 5; prop2b = 10; ...... function1(arg2) } How can I reconstitute prop2a and prop2b into the object arg2 so that arg2.prop2a = 5 and arg2.prop2b=10 ? I've tried the following and they don't seem to be working: var arg2 = {prop2a:5 , prop2b:10}; var arg2 {prop2a:5 , prop2b:10};
has answer: http://stackoverflow.com/a/26492349
type: Question
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26492928

http://stackoverflow.com/comment/41482838
has text: Wow, perfect thank you. I thought I was going crazy.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26417947

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/26478267
tags question: http://stackoverflow.com/q/26471142
tags question: http://stackoverflow.com/q/26499849
type: Tag
tags question: http://stackoverflow.com/q/26442064
tags question: http://stackoverflow.com/q/26496820

http://stackoverflow.com/a/26375370
downvote count: 0
answers question: http://stackoverflow.com/q/26374826
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26374826
type: AcceptedAnswer
score: 6
type: Answer
has body: The aggregation framework itself if not going to dynamically name keys the way you have presented as a proposed output, and that probably is a good thing really. But you can probably just do a query like this: db.collection.aggregate([ // Match documents that contain the elements { "$match": { "field.subDoc": { "$in": [123,234,345] } }}, // De-normalize the array field content { "$unwind": "$field" }, // Match just the elements you want { "$match": { "field.subDoc": { "$in": [123,234,345] } }}, // Count by the element as a key { "$group": { "_id": "$field.subDoc", "count": { "$sum": 1 } }} ]) That gives you output like this: { "_id" : 345, "count" : 2 } { "_id" : 234, "count" : 2 } { "_id" : 123, "count" : 2 } But if you really want to go nuts on this, you are specifying the "keys" that you want as part of your query, so you could form a pipeline like this: db.collection.aggregate([ { "$match": { "field.subDoc": { "$in": [123,234,345] } }}, { "$unwind": "$field" }, { "$match": { "field.subDoc": { "$in": [123,234,345] } }}, { "$group": { "_id": "$field.subDoc", "count": { "$sum": 1 } }}, { "$group": { "_id": null, "123": { "$max": { "$cond": [ { "$eq": [ "$_id", 123 ] }, "$count", 0 ] } }, "234": { "$max": { "$cond": [ { "$eq": [ "$_id", 234 ] }, "$count", 0 ] } }, "345": { "$max": { "$cond": [ { "$eq": [ "$_id", 345 ] }, "$count", 0 ] } } }} ]) Which is a relatively simple thing to construct that last stage in code by just processing the list of arguments: var list = [123,234,345]; var group2 = { "$group": { "_id": null } }; list.forEach(function(id) { group2["$group"][id] = { "$max": { "$cond": [ { "$eq": [ "$_id", id ] }, "$count", 0 ] } }; }); And that comes out more or less how you want it. { "_id" : null, "123" : 2, "234" : 2, "345" : 2 }

http://stackoverflow.com/q/26365868
has comment: http://stackoverflow.com/comment/41389445
has comment: http://stackoverflow.com/comment/41390001
tagged with: iframe
type: Question
has answer: http://stackoverflow.com/a/26366384
tagged with: javascript
has body: I am appending an external script to a div with Jquery/JS. I cannot include the external script in the head. I need to append it to a div which is being created with Jquery. The external script loads asynchronously, uses document.write and I have no control over that script. What I want ultimately is to load the external script and append it to the div dynamically. I'm creating this div on the fly with JavaScript. So this has to be done only in js, not in html. If I place the external script in html statically it would work, but will not render content inside the div container. However when I place it dynamically it won't work. Here's what I tried. But I cannot see the script nor the object getting appended inside div. I need to put in the script inside div so that it renders content inside it. // this is the external code // the externalscript.js takes in the value of externalprop1 &amp; renders an iframe inside "div2" so externalobject has to be defined before the externalscript.js is called. var externalobject = { externalprop1 = "prop1" }; var newscript = document.createElement("script") newscript.type = "text/javascript" newscript.src = "externalscript.js" // end of external code dynamic_content = '&lt;li&gt;'; dynamic_content += '&lt;div class=" div1"&gt;'; dynamic_content += '&lt;div class="div2" id= "div2here"&gt;&lt;/div&gt;'; dynamic_content += '&lt;/div&gt;'; dynamic_content += '&lt;/li&gt;'; I have appended dynamic_content to the body &amp; then I am doing: $('#div2here').append(newscript);
tagged with: dom
has comment: http://stackoverflow.com/comment/41391594
has title: Dynamically calling asynchronous script inside a div container
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26366566
has comment: http://stackoverflow.com/comment/41389427
has comment: http://stackoverflow.com/comment/41389489
tagged with: jquery
has comment: http://stackoverflow.com/comment/41389969
has comment: http://stackoverflow.com/comment/41389345
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26366732

http://stackoverflow.com/q/26361486
has comment: http://stackoverflow.com/comment/41393795
has comment: http://stackoverflow.com/comment/41381225
has answer: http://stackoverflow.com/a/27423649
has answer: http://stackoverflow.com/a/26362572
downvote count: 0
has comment: http://stackoverflow.com/comment/41380899
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41381315
has body: I am running jQuery version 1.10.X( Yes! I am a little slow! ) and facing this weird issue where doneFilter and failFilter passed inside .then() do not work if I have a success block in the ajax call. This, however, seems to me like an issue with my own codebase. Proof(..or maybe not..)? I tried a simple example. Things work in the example and as I would expect, the success and doneFilter have been queued and executed. Now in my codebase, which is absolutely similar as the example above, the .then() part does not execute if I have a success block which is strange. Removing the success block enables .then() and the doneFilter / failFilter gets executed. Strangely, In my same codebase, they both play nice if I have jQuery - 1.7.X. Could it be an issue because of the changes the ajax framework has gone through in 1.8 and above? If not, any hints about how to figure out what the issue is? I have checked the methods used as doneFilter and failFilter. No syntax errors. They are merely anon. functions containing console statements. CODE : function getMonster (){ var theMonster = $.ajax({ url : "http://codepen.io/chriscoyier/pen/difoC.html", success : function(data){ console.log("Monster Succeeded inside 'success' block"); } }); return theMonster; } var theMonster = getMonster(); theMonster.then (function(){ console.log("Moster Succeeded outside"); }, function(){ console.log("Monster Failed :("); }); EDIT : I am doing an ajaxSetup as follows. $.ajaxSetup({ beforeSend: function(jqXHR) { if ($.cookie("mycookie") == null) { console.info("Expired Session"); AppModule.timeout(); return false; } } }); EDIT 2 : Has anyone ever faced an issue like this before or am I the only one seeing the monster fail? There's not a single exception thrown which is making it even harder to find out what is wrong.
answer count: 2
possible better answer: http://stackoverflow.com/a/26362572
has comment: http://stackoverflow.com/comment/41380930
has comment: http://stackoverflow.com/comment/41380956
favorite count: 0
tagged with: ajax
tagged with: promise
accepted answer: http://stackoverflow.com/a/27423649
upvote count: 2
has comment: http://stackoverflow.com/comment/41381105
linked to: http://stackoverflow.com/q/10507079
type: AnsweredQuestion
score: 2
has title: jQuery .then() and success block do not work together?
type: Question

http://stackoverflow.com/comment/41473117
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26412348
score: 0
has text: I want to use GET paramater to create custom links .so create links like website.com/individual using GET parameter

http://stackoverflow.com/comment/41506616
has text: Yes I have, but I'm not exactly sure I understand. I edited my post.
comment on: http://stackoverflow.com/q/26430670
score: 0
type: Comment
type: QuestionComment

dom-events
tags question: http://stackoverflow.com/q/26481675
tags question: http://stackoverflow.com/q/26500135
tags question: http://stackoverflow.com/q/26380500
tags question: http://stackoverflow.com/q/26494521
tags question: http://stackoverflow.com/q/26452264
tags question: http://stackoverflow.com/q/26477504
tags question: http://stackoverflow.com/q/26365538
tags question: http://stackoverflow.com/q/26435656
tags question: http://stackoverflow.com/q/26431845
tags question: http://stackoverflow.com/q/26496176
tags question: http://stackoverflow.com/q/26402033
tags question: http://stackoverflow.com/q/26441730
tags question: http://stackoverflow.com/q/26380086
tags question: http://stackoverflow.com/q/26445531
tags question: http://stackoverflow.com/q/26433188
tags question: http://stackoverflow.com/q/26355943
tags question: http://stackoverflow.com/q/26501577
tags question: http://stackoverflow.com/q/26446608
type: Tag
tags question: http://stackoverflow.com/q/26376406
tags question: http://stackoverflow.com/q/26462101
tags question: http://stackoverflow.com/q/26367953
tags question: http://stackoverflow.com/q/26389405
tags question: http://stackoverflow.com/q/26362136
tags question: http://stackoverflow.com/q/26513543
tag name: dom-events
tags question: http://stackoverflow.com/q/26499641
tags question: http://stackoverflow.com/q/26506063
tags question: http://stackoverflow.com/q/26400072
tags question: http://stackoverflow.com/q/26417428
tags question: http://stackoverflow.com/q/26394226
tags question: http://stackoverflow.com/q/26442041
tags question: http://stackoverflow.com/q/26408469
tags question: http://stackoverflow.com/q/26399606

http://stackoverflow.com/q/26500534
has title: Input validation on bootstrap html form with javascript addevent listener
type: UnansweredQuestion
tagged with: input
linked to: http://stackoverflow.com/q/13798313
type: Question
tagged with: validation
tagged with: javascript
has body: i'm having difficulties with validating the value of a text box element in the html with the addeventlistener in my javascript. It does not properly validate my input in the following ways : 1)Showing "field is empty" even when I have values in that textbox. 2)Only validates when i click submit. <-- (how do i perform the validation as the user clicks out of the text box? ) The following is the relevant html code (with bootstrap classes): First Name The following is the relevant javascript code to valdiate that the First name text box field is not empty and if it is it should return a custom validation error window.addEventListener('load',init); function init() { var firstname = document.getElementById("inputfirstName"); firstname.addEventListener('onmouseclick',validateFirstname(firstname)); } function validateFirstname(e){ var checker = e.value; if (checker == ""){ e.setCustomValidity("This field must not be blank !"); } }
score: 0
answer count: 1
tagged with: twitter-bootstrap
linked to: http://stackoverflow.com/q/11866910
has answer: http://stackoverflow.com/a/31908158

http://stackoverflow.com/comment/41543056
comment on: http://stackoverflow.com/q/26450006
has text: You need to rebind the event on the specific element as well so that it calls your version rather than the old one.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26470543
answer count: 1
has body: when I try "npm install -g jshint", I get the following readout. user-MacBook-Pro:~ davidgoldberg$ npm install -g jshint npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/jshint' npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/jshint'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/usr/local/lib/node_modules/jshint', npm ERR! fstream_type: 'Directory', npm ERR! fstream_path: '/usr/local/lib/node_modules/jshint', npm ERR! fstream_class: 'DirWriter', npm ERR! fstream_stack: npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23', npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53', npm ERR! 'Object.oncomplete (fs.js:107:15)' ] } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Darwin 13.3.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "jshint" npm ERR! cwd /Users/davidgoldberg npm ERR! node -v v0.10.32 npm ERR! npm -v 1.4.28 npm ERR! path /usr/local/lib/node_modules/jshint npm ERR! fstream_path /usr/local/lib/node_modules/jshint npm ERR! fstream_type Directory npm ERR! fstream_class DirWriter npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/jshint' npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23 npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/davidgoldberg/npm-debug.log npm ERR! not ok code 0 I'd love to get error sorted out. "npm install jshint" works fine, by the way. ultimately, I need help downloading jshint for use in "sublimelint-jshint" on sublime tex 3.
tagged with: sublimetext3
tagged with: sublime-text-plugin
has answer: http://stackoverflow.com/a/26471676
accepted answer: http://stackoverflow.com/a/26471676
has title: how do you globally install a file as the root/administrator?
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41578766
type: Question
tagged with: sublimetext
tagged with: javascript
has comment: http://stackoverflow.com/comment/41578689
has comment: http://stackoverflow.com/comment/41578698
score: 0

http://stackoverflow.com/comment/41616086
score: 0
type: AnswerComment
has text: Hello Ward, thank you for taking your time to show an example. I still have a weird order of execution. In my case, after the first em.fetchEntityByKey, it returns to the controller for the UI where the function was called, but for some reason it says that the "then" function is undefined. (datacontext.getSite(siteId).then(function (data) { vm.site = data;}) After that, it goes to firstQuerySuccess. Do you have any suggestion on why?? (I am using john papa's hot towel template)
type: Comment
comment on: http://stackoverflow.com/a/26445623

http://stackoverflow.com/comment/118858616
type: AnswerComment
comment on: http://stackoverflow.com/a/26485902
type: Comment
has text: best solution .. simple and elegant
score: 1

http://stackoverflow.com/a/26355503
upvote count: 1
score: 1
downvote count: 0
has body: There is a typo here: document.getElementByid should be document.getElementById Working example here.
answers question: http://stackoverflow.com/q/26355465
type: Answer

http://stackoverflow.com/comment/41372217
comment on: http://stackoverflow.com/q/26356645
has text: possible duplicate of [Get variable value from code behind and use in aspx page control](http://stackoverflow.com/questions/8883262/get-variable-value-from-code-behind-and-use-in-aspx-page-control)
type: Comment
type: QuestionComment
score: 0

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/26488569
type: Tag

http://stackoverflow.com/q/26425301
type: Question
has title: Making a div always visible while scrolling through another specific div
tagged with: javascript
tagged with: jquery
has body: I've created an image upload widget in my webApp, I want this widget to be visible while filling a specific div being apart of of huge form ( in this div I need to enter some image URLs provided by my widget ), here is the scenario : To achieve this I did the following : $().ready(function() { var $scrollingDiv = $("#scrollingDiv"); $(window).scroll(function(){ $scrollingDiv .stop() .animate({"marginTop": ($(window).scrollTop() + 30) + "px"}, "slow" ); }); }); Assuming that scrollingDiv is the Id of my widget ( DIV3 ). The problem I'm facing is that when I scroll over the DIV1, the scrollingDiv keeps pushing the bottom, so I can't see the end of my form because of this : My question is : How can I disable the scrolling tracking when the DIV3 collapses with the bottom of my DIV2 ? Edit : Analogous case Click Here PS : This is My first question on JQuery ... Please don't close the post and give me the chance o improve it if needed ...
has comment: http://stackoverflow.com/comment/41496663
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/41495882
favorite count: 0
has comment: http://stackoverflow.com/comment/41496156
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41497138
tagged with: css
has comment: http://stackoverflow.com/comment/41495823
answer count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41497442
has comment: http://stackoverflow.com/comment/41495628

http://stackoverflow.com/q/26420567
type: Question
tagged with: dropbox
tagged with: javascript
tagged with: dropbox-api
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26428410
type: UnansweredQuestion
has title: Dropbox drop ins redraw/reinitialize Save to Dropbox button
has body: I'm using javascript client side routing/ajax. So when the page loads and Dropbox's drop-in api scans the page for buttons like this: The DOM for the a has not yet been drawn. Is there a way to get the Drop-in API to rescan the page after the page has loaded correctly so that the button can appear?

http://stackoverflow.com/a/51606855
type: Answer
answers question: http://stackoverflow.com/q/26355536
has body: {{opt.Name}}
score: 0

http://stackoverflow.com/a/26388846
upvote count: 2
answers question: http://stackoverflow.com/q/26388667
accepted answer of: http://stackoverflow.com/q/26388667
score: 2
has body: Without modifying your obj structure, you could do: var sortedKeys=[]; for(var i in obj){ sortedKeys.push({key:i, value:obj[i]}) // push key and value to array } sortedKeys.sort(function(a,b){ // sort array by value return a.value &lt; b.value }) for(var i=0;i&lt;sortedKeys.length;i++){ // you can either use now sortedKeys or keep using obj console.log(obj[sortedKeys[i].key]) console.log(sortedKeys[i].value) }
type: AcceptedAnswer
downvote count: 0
type: Answer

cross-language
tags question: http://stackoverflow.com/q/26448152
tag name: cross-language
type: Tag

http://stackoverflow.com/a/28122171
type: Answer
has body: Looks like gulp-mocha isn't totally set up to be a true through stream, in fact it looks like it just pipes the source into a Mocha instance and lets Mocha do it's thing. The first thing that comes to my head just to do a simple redirect in bash... $ gulp test | grep -Ev "^\[[0-9:]{0,8}\]" &gt; ./test.lcov Of course this assumes all the output that is gulp related will start with [00:00:00] (with the 00 being the current system time). If this isn't the case you may end up with gulp output at the top and bottom of your file. If you're looking for a more universal answer (read: using nodejs) you can do a rewrite of process.stdout.write. This is probably :( upon by most but it would work. The trick is that you can't overwrite process.stdout as another stream because it is written as a getter internally. You can however rewrite the stdout.write function. As a matter of fact I just did this for a project I'm working on so I can review gulp logs of other developers in case they have issues with the build system. I chose to go with a not so async solution because unlike most everything else in nodejs, stdout and stderr are both blocking streams and don't act like the asynchronous code you're used to. Using this technique your task would end up looking something like this: gulp.task('test', function () { // clear out old coverage file fs.writeFileSync('./test.lcov', ''); // if you still want to see output in the console // you need a copy of the original write function var ogWrite = process.stdout.write; process.stdout.write = function( chunk ){ fs.appendFile( './test.lcov', chunk ); // this will write the output to the console ogWrite.apply( this, arguments ); }; return gulp.src('./assets/js/test/test.js', {read: false}) .pipe(mocha({reporter: 'mocha-lcov-reporter'})); });
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26396947
upvote count: 3

http://stackoverflow.com/a/26488473
type: Answer
has body: That should work, you can specify the property where you want the filter to be applied ({{person.id}}) - {{person.name}})
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26488032
answers question: http://stackoverflow.com/q/26488032

http://stackoverflow.com/q/26507406
tagged with: jquery
has title: Issue with return statement when sending ajax request
score: 0
tagged with: asynchronous
linked to: http://stackoverflow.com/q/14220321
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26507428
type: Question
has body: I've written the script below. It's used to communicate with a backend service. The problem arises when I call the 'heartbeat' method. The problem is probably caused by JavaScript being asynchronous. I've used the 'done' promise, so the request should be done before I return true or false. As of now the 'heartbeat' is just undefined when evaluated. /** * This module is used to communicate with the backend. */ var Backend = (function() { /** * Default settings for the Backend module. * @type {[Object]} */ var settings = { api: 'https://www.domain.tld/api' }; /** * This is used to create a request against the backend. * @param {[String]} method The HTTP method to be used. * @param {[String]} endpoint Endpoint to target. * @return {[Object]} Returns the XHR request. */ var request = function(method, endpoint) { req = $.ajax({ url: settings.api + endpoint, type: method }); return req; }; return { /** * Check the backend status. * @return {[Bool]} Returns true or false - depending on the status. */ heartbeat: function() { var req = request('get', '/heartbeat'); req.done(function(data) { if(data.status == 'alive') { return true; } else { return false; } }); } } })(); I'm doing the following to call the method: var backend = Backend(); var heartbeat = backend.heartbeat(); heartbeat 'undefined' What is the reason to the 'heartbeat' variable being undefined? Is it because of the asynchronous way JavaScript works, and is there maybe a way to solve this?
duplicate of: http://stackoverflow.com/q/14220321
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/26431211
type: Answer
accepted answer of: http://stackoverflow.com/q/26431109
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26431109
has body: You can't disable client browsers' native functionality like Back, Forward, Stop, Refresh, etc. It's a good thing, too, because people would write web pages from which you couldn't navigate - or close the window - and you'd have to open task manager to kill the process every time.
upvote count: 2
type: AcceptedAnswer

memoization
type: Tag
tags question: http://stackoverflow.com/q/26485662
tag name: memoization

http://stackoverflow.com/comment/41436002
has text: it works, just library is not set in jsfiddle for jquery
comment on: http://stackoverflow.com/q/26391436
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/26485915
answers question: http://stackoverflow.com/q/26485367
type: Answer
score: 0
has body: I think it is related to 2. Bindings are now refreshed independently Now you should use selectedChoice move out from options binding, e.g.
has comment: http://stackoverflow.com/comment/41608962
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26485367

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/26388667
type: Tag

http://stackoverflow.com/a/26361637
accepted answer of: http://stackoverflow.com/q/26361547
type: Answer
upvote count: 1
downvote count: 1
score: 0
has body: Try this Test
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26361547

http://stackoverflow.com/q/26496823
type: Question
tagged with: shopify
has title: Color swatch on collections page I Shopify
tagged with: javascript
has body: I have a shopify store and I added a color swatch palette to my shopify collections page . How do I display only the colors that are in stock? http://gloria22x.myshopify.com/collections/alle-produkte?sort_by=manual Thanks, Alex {% for option in product.options %} {% if option == 'Color' %} {% assign index = forloop.index0 %} {% assign colorlist = '' %} {% assign color = '' %} {% for variant in product.variants %} {% capture color %} {{ variant.options[index] }} {% endcapture %} {% unless colorlist contains color %} &lt;img class="colorpalette" src="" title="" alt="" width="16" height="16"/&gt; {% capture tempList %} {% endcapture %} {% assign colorlist = tempList %} {% endunless %} {% endfor %} {% endif %} {% endfor %}
score: 0
has answer: http://stackoverflow.com/a/26498152
answer count: 1
tagged with: liquid
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/26406157
has comment: http://stackoverflow.com/comment/41461081
score: 0
has comment: http://stackoverflow.com/comment/41462930
type: Answer
has comment: http://stackoverflow.com/comment/41462063
has body: Try changing this part: var articles = new Bloodhound( { datumTokenizer: Bloodhound.tokenizers.whitespace('title'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url: remoteUrl, wildcard: 'WILDCARD' }, //prefetch: prefetchUrl }); And enable prefetch with the whole json to see if the autosuggest base works before doing the dynamic request to the symfony controller.
answers question: http://stackoverflow.com/q/26405394
has comment: http://stackoverflow.com/comment/41462581
has comment: http://stackoverflow.com/comment/41463260

http://stackoverflow.com/comment/41550375
has text: Thanks Lars. This is sufficient for an answer if you'd like.
comment on: http://stackoverflow.com/q/26453769
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41429634
comment on: http://stackoverflow.com/q/26387892
score: 0
type: Comment
type: QuestionComment
has text: anchor element has a click event it called like that

http://stackoverflow.com/comment/41404856
type: QuestionComment
comment on: http://stackoverflow.com/q/26374090
has text: Are there any special reason why you want to insert a comment inside the HTML tag? If no then you should stick to inserting a comment outside the HTML tag.
score: 0
type: Comment

kendo-combobox
tag name: kendo-combobox
tags question: http://stackoverflow.com/q/26419297
type: Tag
tags question: http://stackoverflow.com/q/26513543

http://stackoverflow.com/comment/41609536
has text: I'm confused. Why/how do you expect `Person` to change? The prototype object only effects the objects *created* by the constructor function, not the function itself. Mutating the prototype object does not magically change the constructor function. Maybe this helps: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript . FYI `function Person` does not create an object (like you mean it). It creates a constuctor function which lets you create objects.
comment on: http://stackoverflow.com/q/26487480
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26363068
has comment: http://stackoverflow.com/comment/41385544
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26362699
has body: Before you stop propagation of events, take some time to spin up on why you shouldn't do so. From css-tricks.com, "The Dangers of Stopping Event Propagation", very briefly: "Modifying a single, fleeting event might seem harmless at first, but it comes with risks. When you alter the behavior that people expect and that other code depends on, you're going to have bugs. It's just a matter of time." "A much better solution is to have a single event handler whose logic is fully encapsulated and whose sole responsibility is to determine whether or not the menu should be hidden for the given event." With that being said, you could do something like $('#sidebar').on('click', function( e ) { var $target = $(e.target).closest('li'); if ( $target.hasClass('parent') ) { $target.toggleClass('active'); } }); Working example: http://jsfiddle.net/g6a496Lf/1/
upvote count: 1
has comment: http://stackoverflow.com/comment/41385615
type: Answer

http://stackoverflow.com/comment/41410823
comment on: http://stackoverflow.com/a/26377672
type: AnswerComment
score: 0
type: Comment
has text: Just be aware that this will clear out any HTML tags within the paragraph, that is, all existing formatting and structure.

http://stackoverflow.com/q/26477504
tagged with: javascript
tagged with: dom-events
score: 0
type: UnansweredQuestion
answer count: 0
has body: How can setTimeout save and load data for select form inputs? I tried to get it working with event listeners. I checked the capture and bubble which I am still trying to wrap my head around. I need it to set or get values assigned it to respective elements from the input field depending if there is changes such as focus or blur on the fields. Is there a feature or step I missed and where should I start looking? answers = document.getElementsByName('answers[]'); for(var i = 0; i < answers.length; i++) { nodeIndex = 'answer' + i; if(answers[i] == ''){ answers[i].addEventListener('blur', function(){ localStorage.setItem(nodeIndex, answers[i].value); }); } else { answers[i].addEventListener('focus', function(){ answers[i].value = localStorage.getItem(nodeIndex); localStorage.setItem(nodeIndex, answers[i].value); }); answers[i].addEventListener('blur', function(){ localStorage.setItem(nodeIndex, answers[i].value); answers[i].value = localStorage.getItem(nodeIndex); }); } // end if } // end forloop REVISED I noticed only the last element is affected. When I enter text in answers[0] to answers[14], their values are saved and set/copied to only the last element. How am I using this incorrectly? I read up and seem to follow the rules... function processAnswers(i, answers) { setTimeout(function() { nodeIndex = 'answer' + i; if(localStorage.getItem(nodeIndex) === null) { answers[i].addEventListener('blur', function(){ localStorage.setItem(nodeIndex, answers[i].value); }); } // end if else { answers[i].addEventListener('focus', function(){ answers[i].value = localStorage.getItem(nodeIndex); localStorage.setItem(nodeIndex, answers[i].value); }); answers[i].addEventListener('blur', function(){ localStorage.setItem(nodeIndex, answers[i].value); answers[i].value = localStorage.getItem(nodeIndex); }); } // end else }, 100); // end setTimeout() } // end processAnswers(); answers = document.getElementsByName('answers[]'); for(var i = 0; i < answers.length; i++) { processAnswers(i, ans…
tagged with: forms
tagged with: dom
has comment: http://stackoverflow.com/comment/41592079
type: Question
has comment: http://stackoverflow.com/comment/41616114
has title: How can setTimeout save and load data back to form inputs if browser crashes, and I visit that same page again?

http://stackoverflow.com/comment/41434439
has text: Looks like the `onchange` handler should work fine, but the `if (i === 1) { SetSelected(element.id); }` can't work if you want to use `this`. It should be `SetSelected.call(element);` then.
comment on: http://stackoverflow.com/q/26390251
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26427672
has body: This is about data validation. It is not necessary to do data validation on client side since client data is usually not reliable. The correct data must be validated on server. I would recommend you to do the validation in controller instead of other modules. Let's have a look at your example: var create = function(req, res) { var user = req.body.user; var imageName = req.body.imageName; var description = req.body.description; //more validation here? Answer: Yes. Think about if user is existed or has permission, description has at least 10 chars, contains illegal chars etc. if (!user) { return ApiResponse(req, res, new Error('no user')); } else if (!imageName) { return ApiResponse(req, res, new Error('no image name')); } else if (!description) { return ApiResponse(req, res, new Error('no description')); } //Btw, here is kind of validation right? //but it looks like that you only want to check if user is posted, //then imageName and description will be ignored. //There may be some logic error here. At last, I also suggest you to create a module specially for data validation.
type: Answer
answers question: http://stackoverflow.com/q/26427054
has comment: http://stackoverflow.com/comment/41501456
has comment: http://stackoverflow.com/comment/41513998
score: 0

http://stackoverflow.com/q/26454227
tagged with: css
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/41554185
has comment: http://stackoverflow.com/comment/41549882
linked to: http://stackoverflow.com/q/26259665
has body: Does anybody know a way to display custom text instead of cursor on image hover? ideally this would be a title or alt attribute form image. If not is there any way to display the text under the cursor? I simply need a thing close to normal title attribute behavior, I just need it to display instantly and with my styliong. note: I know about this way: a[title]:hover:after { content: attr(title); padding: 4px 8px; color: #333; position: absolute;... unfortunately it displays title after the image, and i need it over the image, as the cursor moves :) any help would be appreciated thanx!!
has answer: http://stackoverflow.com/a/26454512
tagged with: cursor
has comment: http://stackoverflow.com/comment/41554081
type: Question
has title: Display text instead of cursor on image hover
has comment: http://stackoverflow.com/comment/41554091
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26395377
accepted answer: http://stackoverflow.com/a/26395399
has comment: http://stackoverflow.com/comment/41442634
tagged with: javascript
has body: I have two nested for loops; basically what I'm trying to do is inserting some rows inside an array that contains lines of text; I look for the placeholder '// &lt;&lt;&lt;PERMISSIONS TREE&gt;&gt;&gt;' and insert some lines just after it; before doing this, I check if some lines are already there after the above placeholder and before '// &lt;&lt;&lt;END PERMISSIONS TREE&gt;&gt;&gt;' In this case I need first to delete these rows and then insert the new ones for(i = 0; i &lt; lines.length; i++) { if (lines[i].indexOf('// &lt;&lt;&lt;PERMISSIONS TREE&gt;&gt;&gt;') &gt;= 0) { i++; var j = i; console.log(lines[j]); //here lines[j] is defined and printed on screen correctly console.log(lines[j].indexOf('// &lt;&lt;&lt;END PERMISSIONS TREE&gt;&gt;&gt;')); //this also works //start delete loop - the following line doesn't work while ((lines[j].indexOf('// &lt;&lt;&lt;END PERMISSIONS TREE&gt;&gt;&gt;') &lt; 0) &amp;&amp; (j &lt; lines.length)) { lines.splice(j, 1); j++; } lines.splice(i , 0, result); // insert result in the correct place, this works break; } } In the line where I start the while loop, I get the error: Cannot call method 'indexOf' of undefined but the two lines above (the logs) works; I just can't understand why... This code runs in nodejs, don't know if this does matter;
score: 0
answer count: 2
has title: JS - undefined object (but the object is defined)
favorite count: 0
has answer: http://stackoverflow.com/a/26395399
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41442647
possible better answer: http://stackoverflow.com/a/26395407
has answer: http://stackoverflow.com/a/26395407
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41443124

http://stackoverflow.com/comment/41539758
score: 0
type: Comment
type: AnswerComment
has text: Actually I cannot delete inline onclick. This example is very simplified.
comment on: http://stackoverflow.com/a/26448920

http://stackoverflow.com/a/26564709
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26464080
has body: If you're a beginner to WebRTC, maybe the PeerJS library might be something for you. It's pretty easy to use and brings a lot of possibilities with it. Transferring multimedia streams is supported and explained in the docs as well. The onlything really to implement is handling of multimedia streams what I can't explain to you since I'm only using Firefox.

http://stackoverflow.com/q/26431986
tagged with: javascript
has title: How to perform multiplication in JavaScript for dynamically added field on HTML?
upvote count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/41509341
has body: Here is HTML source code for one pair of dynamically added elements unit_price and qty. Whenever there is change in any unit_price, then we can do: // find ids that match this pattern: order_order_items_attributes_xxxxxxxxxxxxx_unit_price var orderItemRegex = /^order_order_items_\d+_unit_price$/; $("[id^='order_order_items_']").filter(function(index) { return orderItemRegex.test(this.id); }).change(function() { //here is what needs to be done. There may be more than one pair of unit price and qty on the form. For each pair of unit price & qty do { total += unit_price * qty } //update total $('order_total').val(total); }); The same process could be repeated again for qty whenever there is qty change in any qty field. We are looking for solution which iterates through the list and retrieves each of the id of unit price and qty.
has comment: http://stackoverflow.com/comment/41511191
answer count: 1
has comment: http://stackoverflow.com/comment/41508778
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41508842
linked to: http://stackoverflow.com/q/26429673
has comment: http://stackoverflow.com/comment/41508715
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41510372
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41509020
has answer: http://stackoverflow.com/a/26432842
accepted answer: http://stackoverflow.com/a/26432842
type: Question
score: -2

http://stackoverflow.com/q/26427000
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/30711014
has title: How to reload data in a Fuel UX repeater
tagged with: javascript
tagged with: fuelux
answer count: 2
has body: I am using the newly released Fuel UX 3.1 in a web application. I managed to set up a Repeater widget with data coming from the backend, however I can only render it once. $('#myRepeater').repeater({ dataSource: dataSource }); So this block of code renders the repeater, however I cannot change the dataSource after this and render it again with the new values.
has answer: http://stackoverflow.com/a/26439435
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26439435
has answer: http://stackoverflow.com/a/30711014

http://stackoverflow.com/a/26371999
answers question: http://stackoverflow.com/q/26371921
score: 0
has comment: http://stackoverflow.com/comment/41400882
has body: If you would like the current date shown when you load the page, you will need to manually initialize the datepicker after the datepicker loads.
type: Answer

http://stackoverflow.com/comment/41589692
comment on: http://stackoverflow.com/a/26450186
has text: That worked. Thank you so much David Knipe for your help and patience and for sticking with my question for days. Your help is appreciated much more than the SO points I can award to you. Thanks again.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/139094589
type: AnswerComment
score: 0
has text: Very very nice answer. Thanks a lot. I think there is a very small typo : The line `if(hash.substr(0,3) == "#zx"){ ` should be `if(hash.substr(0,2) == "#zx"){ `
comment on: http://stackoverflow.com/a/29931389
type: Comment

http://stackoverflow.com/a/26435870
score: 0
has body: ⌘-Click on EKEventStoreRequestAccessCompletionHandler (or any unknown type), and Xcode will jump to its definition: typealias EKEventStoreRequestAccessCompletionHandler = (Bool, NSError!) -&gt; Void
answers question: http://stackoverflow.com/q/26431672
type: Answer

http://stackoverflow.com/q/26398916
has comment: http://stackoverflow.com/comment/41483862
has body: I want to traverse all the way up to mbm class, I do like this $('.mtm ._5cq3').prevUntil('.mbm') but it target nothing. I tried parents and closest, I'm confused now.
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has title: DOM traverse up across more than 1 parent
has comment: http://stackoverflow.com/comment/41448727
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26399249
has comment: http://stackoverflow.com/comment/41448943
type: Question

http://stackoverflow.com/comment/41581395
has text: @Mohamadshiralizadeh — `data` is not a string. That's the problem.
comment on: http://stackoverflow.com/a/26471912
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41650951
type: Comment
comment on: http://stackoverflow.com/q/26509720
score: 4
has text: That's a lot of code for a lack of specific questions.
type: QuestionComment

http://stackoverflow.com/a/26448859
answers question: http://stackoverflow.com/q/26448724
downvote count: 4
upvote count: 0
type: Answer
has body: You can have a look at https://www.npmjs.org/package/async It's a node module which can be used in browser too.
score: -4
has comment: http://stackoverflow.com/comment/41540045

http://stackoverflow.com/comment/41572353
has text: More important is the layout of the parent container where all the grids and the panel are included. The layout of the panel is not important
comment on: http://stackoverflow.com/q/26466157
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26406143
downvote count: 0
score: 4
type: Answer
has body: You need to iterate the keys of the sprite object, and push the array values at index 1: var values = []; for (var key in sound.sprite) { values.push(sound.sprite[key][1]); }
answers question: http://stackoverflow.com/q/26406078
has comment: http://stackoverflow.com/comment/41460934
upvote count: 4

http://stackoverflow.com/q/26434265
has comment: http://stackoverflow.com/comment/41513583
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41513440
has comment: http://stackoverflow.com/comment/41513472
tagged with: ios
type: Question
tagged with: android
has answer: http://stackoverflow.com/a/26435126
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41513898
tagged with: css
has title: Confusion with making a dropdown menu clickable for mobile users
has body: Hey i'm having some trouble getting my drop down menu clickable. Everything is working fine in the hover state but i want it to be clickable for mobile users. Please see my code any help would be greatly appreciated. I want to keep the hover state for people using a PC but also want the click to be working for mobiles. Many thanks Sam $(document).ready(function() { $('.topnav').click(function() { $('.sub-nav').toggleClass('visible'); }); }); .subnav ul.sub-nav{ display: none; } .subnav ul.visible { display: block; } #headernav .tile:hover a{ background-color:#fff; border-radius: 0 0 5px 5px; -webkit-box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); -moz-box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); -webkit-transition:0.5s ease-in; -moz-transition:0.5s ease-in; -o-transition:0.5s ease-in; } #headernav .abouttile { width:13%; float: left; margin:0 3%; transition:0.5s ease-out; -webkit-transition:0.5s ease-out; -moz-transition:0.5s ease-out; -o-transition:0.5s ease-out; } #headernav .abouttile:hover{ background-color:#fff; border-radius: 0 0 5px 5px; padding-bottom:10%; -webkit-box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); -moz-box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); -webkit-transition:0.5s ease-in; -moz-transition:0.5s ease-in; -o-transition:0.5s ease-in; } #headernav .projecttile { width:13%; float: left; margin:0 3%; transition:0.5s ease-out; -webkit-transition:0.5s ease-out; -moz-transition:0.5s ease-out; -o-transition:0.5s ease-out; } #headernav .projecttile:hover{ background-color:#fff; border-radius: 0 0 5px 5px; padding-bottom:16%; -webkit-box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); -moz-box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); box-shadow: -1px -1px 4px 2px rgba(0,0,0,0.51); -webkit-transition:0.5s ease-in; -moz-transition:0.5s ease-in; -o-transition:0.5s ease-in; } #headernav .subnav ul{ display:none; position: absolute; border-radius: 0 0 5px 5…
score: 0
answer count: 1

http://stackoverflow.com/q/26504874
answer count: 1
has body: Am I missing something wholly obvious here? Html &lt;input class="datepicker" min="2014-10-22" name="start_date" type="text" value="2014-11-22" id="start_date"&gt; Javascript $(function() { $(".datepicker").datepicker({ minDate: $(this).attr('min'), // minDate: '2014-10-22', dateFormat: 'yy-mm-dd', onSelect: function() { console.log($(this).attr('min')); } }); }); onSelect shows it's getting the min attribute correctly. But minDate seems to be ignoring it. If I hardcode it then it works, but if I use minDate: $(this).attr('min'), then no minDate is set.
upvote count: 2
has answer: http://stackoverflow.com/a/26504941
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26504941
type: Question
has comment: http://stackoverflow.com/comment/41640848
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: jQuery Datepicker not getting minDate from this min attribute
has comment: http://stackoverflow.com/comment/41640803
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41600575
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63394/discussion-between-mysticmagic-and-andrew-alexander).
comment on: http://stackoverflow.com/a/26479851
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41538541
type: Comment
type: QuestionComment
score: 0
has text: To work in this way with external libraries you need to write wrappers with your promise realization. No, examples is not necessary.
comment on: http://stackoverflow.com/q/26448186

ajax
tags question: http://stackoverflow.com/q/26353839
tags question: http://stackoverflow.com/q/26435291
tags question: http://stackoverflow.com/q/26427923
tags question: http://stackoverflow.com/q/26476653
tags question: http://stackoverflow.com/q/26432635
tags question: http://stackoverflow.com/q/26442084
tags question: http://stackoverflow.com/q/26403173
tags question: http://stackoverflow.com/q/26473002
tags question: http://stackoverflow.com/q/26369674
tags question: http://stackoverflow.com/q/26373734
tags question: http://stackoverflow.com/q/26456433
tags question: http://stackoverflow.com/q/26391300
tags question: http://stackoverflow.com/q/26403264
tags question: http://stackoverflow.com/q/26363123
tags question: http://stackoverflow.com/q/26455405
tags question: http://stackoverflow.com/q/26362954
tags question: http://stackoverflow.com/q/26477597
tags question: http://stackoverflow.com/q/26417705
tags question: http://stackoverflow.com/q/26489655
tags question: http://stackoverflow.com/q/26355440
tags question: http://stackoverflow.com/q/26416431
tags question: http://stackoverflow.com/q/26500589
tags question: http://stackoverflow.com/q/26488690
tags question: http://stackoverflow.com/q/26366058
tags question: http://stackoverflow.com/q/26398426
tags question: http://stackoverflow.com/q/26423442
tags question: http://stackoverflow.com/q/26500748
tags question: http://stackoverflow.com/q/26407148
tags question: http://stackoverflow.com/q/26447335
tags question: http://stackoverflow.com/q/26436037
tags question: http://stackoverflow.com/q/26463053
tags question: http://stackoverflow.com/q/26475746
tags question: http://stackoverflow.com/q/26481000
tags question: http://stackoverflow.com/q/26386404
tags question: http://stackoverflow.com/q/26472976
tags question: http://stackoverflow.com/q/26477924
tags question: http://stackoverflow.com/q/26485380
tags question: http://stackoverflow.com/q/26478448
tags question: http://stackoverflow.com/q/26368095
tags question: http://stackoverflow.com/q/26470751
tags question: http://stackoverflow.com/q/26465335
tags question: http://stackoverflow.com/q/26412885
tags question: http://stackoverflow.com/q/26439305
tags question: http://stackoverflow.com/q/26383247
tags question: http://stackoverflow.com/q/26361486
tags question: http://stackoverflow.com/q/26495851
tags question: http://stackoverflow.com/q/26467491
tags question: http://stackoverflow.com/q/26455509
tags question: http://stackoverflow.com/q/26396924
tags question: http://stackoverflow.com/q/26428728
tags question: http://stackoverflow.com/q/26489636
tags question: http://stackoverflow.com/q/26460468
tags question: http://stackoverflow.com/q/26440157
tags question: http://stackoverflow.com/q/26404948
tags question: http://stackoverflow.com/q/26425881
tags question: http://stackoverflow.com/q/26406112
type: Tag
tags question: http://stackoverflow.com/q/26495880
tags question: http://stackoverflow.com/q/26386540
tags question: http://stackoverflow.com/q/26461083
tags question: http://stackoverflow.com/q/26403860
tags question: http://stackoverflow.com/q/26503649
tags question: http://stackoverflow.com/q/26496325
tags question: http://stackoverflow.com/q/26425650
tags question: http://stackoverflow.com/q/26420648
tags question: http://stackoverflow.com/q/26435033
tags question: http://stackoverflow.com/q/26414295
tags question: http://stackoverflow.com/q/26387653
tags question: http://stackoverflow.com/q/26469996
tags question: http://stackoverflow.com/q/26394961
tags question: http://stackoverflow.com/q/26466788
tags question: http://stackoverflow.com/q/26433522
tags question: http://stackoverflow.com/q/26374556
tags question: http://stackoverflow.com/q/26403112
tags question: http://stackoverflow.com/q/26379057
tags question: http://stackoverflow.com/q/26433528
tags question: http://stackoverflow.com/q/26499184
tags question: http://stackoverflow.com/q/26510645
tags question: http://stackoverflow.com/q/26508473
tags question: http://stackoverflow.com/q/26480434

http://stackoverflow.com/comment/41470230
has text: Thank you for answer! Exactly not, I just want to use template method pattern http://en.wikipedia.org/wiki/Template_method_pattern
type: AnswerComment
comment on: http://stackoverflow.com/a/26410960
score: 0
type: Comment

http://stackoverflow.com/comment/41462137
type: Comment
comment on: http://stackoverflow.com/q/26406575
score: 0
type: QuestionComment
has text: why he using this ? what is inside this link ? so ...

http://stackoverflow.com/q/26404816
type: Question
has body: var div = document.createElement('div'); div.setAttribute('class', 'asd'); parent.appendChild(div); This code basically creates a div and appends it inside the parent element. $(".asd").hover(function(){ alert("hey");}; This one is a function when hovering the created div. But it doesn't work. Any solution?
has comment: http://stackoverflow.com/comment/41458534
tagged with: javascript
has answer: http://stackoverflow.com/a/26404934
tagged with: jquery
has answer: http://stackoverflow.com/a/26405163
has answer: http://stackoverflow.com/a/26404901
has answer: http://stackoverflow.com/a/26404885
has title: Is it impossible to create a function for a created element through coding?
answer count: 5
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26404889

arrays
tags question: http://stackoverflow.com/q/26366211
tags question: http://stackoverflow.com/q/26456789
tags question: http://stackoverflow.com/q/26476287
tags question: http://stackoverflow.com/q/26410064
tags question: http://stackoverflow.com/q/26497205
tags question: http://stackoverflow.com/q/26408631
tags question: http://stackoverflow.com/q/26449582
tags question: http://stackoverflow.com/q/26428728
tags question: http://stackoverflow.com/q/26454655
tags question: http://stackoverflow.com/q/26442704
type: Tag
tags question: http://stackoverflow.com/q/26367002
tags question: http://stackoverflow.com/q/26371101
tags question: http://stackoverflow.com/q/26372842
tags question: http://stackoverflow.com/q/26374154
tags question: http://stackoverflow.com/q/26366387
tags question: http://stackoverflow.com/q/26449956
tags question: http://stackoverflow.com/q/26505993
tags question: http://stackoverflow.com/q/26424389
tags question: http://stackoverflow.com/q/26393471
tags question: http://stackoverflow.com/q/26415181
tags question: http://stackoverflow.com/q/26414514
tags question: http://stackoverflow.com/q/26381247
tags question: http://stackoverflow.com/q/26387837
tags question: http://stackoverflow.com/q/26440870
tags question: http://stackoverflow.com/q/26457311
tags question: http://stackoverflow.com/q/26463492
tags question: http://stackoverflow.com/q/26484554
tags question: http://stackoverflow.com/q/26453839
tags question: http://stackoverflow.com/q/26387188
tags question: http://stackoverflow.com/q/26355560
tags question: http://stackoverflow.com/q/26439799
tags question: http://stackoverflow.com/q/26437276
tags question: http://stackoverflow.com/q/26394061
tags question: http://stackoverflow.com/q/26500584
tags question: http://stackoverflow.com/q/26456454
tags question: http://stackoverflow.com/q/26496609
tags question: http://stackoverflow.com/q/26491909
tags question: http://stackoverflow.com/q/26443825
tags question: http://stackoverflow.com/q/26419711
tags question: http://stackoverflow.com/q/26369535
tags question: http://stackoverflow.com/q/26385869
tags question: http://stackoverflow.com/q/26405699
tags question: http://stackoverflow.com/q/26444792
tags question: http://stackoverflow.com/q/26466876
tags question: http://stackoverflow.com/q/26472649
tags question: http://stackoverflow.com/q/26462014
tags question: http://stackoverflow.com/q/26481488
tags question: http://stackoverflow.com/q/26399741
tags question: http://stackoverflow.com/q/26509525
tags question: http://stackoverflow.com/q/26407592
tags question: http://stackoverflow.com/q/26395013
tags question: http://stackoverflow.com/q/26468557
tags question: http://stackoverflow.com/q/26496029
tags question: http://stackoverflow.com/q/26504601
tags question: http://stackoverflow.com/q/26383138
tags question: http://stackoverflow.com/q/26431690
tags question: http://stackoverflow.com/q/26497415
tags question: http://stackoverflow.com/q/26495679
tags question: http://stackoverflow.com/q/26503605
tags question: http://stackoverflow.com/q/26456514
tags question: http://stackoverflow.com/q/26429720
tags question: http://stackoverflow.com/q/26450956
tags question: http://stackoverflow.com/q/26397279
tags question: http://stackoverflow.com/q/26370695
tags question: http://stackoverflow.com/q/26455931
tags question: http://stackoverflow.com/q/26361513
tags question: http://stackoverflow.com/q/26506429
tags question: http://stackoverflow.com/q/26508887
tags question: http://stackoverflow.com/q/26400336
tags question: http://stackoverflow.com/q/26399534
tags question: http://stackoverflow.com/q/26366243
tags question: http://stackoverflow.com/q/26418897
tags question: http://stackoverflow.com/q/26355017
tag name: arrays
tags question: http://stackoverflow.com/q/26493285
tags question: http://stackoverflow.com/q/26400181
tags question: http://stackoverflow.com/q/26502895
tags question: http://stackoverflow.com/q/26511686
tags question: http://stackoverflow.com/q/26485588

http://stackoverflow.com/comment/41420820
comment on: http://stackoverflow.com/q/26381639
type: Comment
has text: There are several things I think you should take a look first. Why are you defining SO MANY `script` tags? Why don't just put all your code inside one tag? And your `saveComment` function, it doesn't have the curly braces. You sure that is working as you expect?
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41379494
has text: I am seeing third question within 10 min that is containing incorrect `java` tag in it.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26360785
type: Comment

http://stackoverflow.com/q/26466083
has comment: http://stackoverflow.com/comment/41578103
tagged with: node.js
has comment: http://stackoverflow.com/comment/41579135
has answer: http://stackoverflow.com/a/26472967
upvote count: 1
type: Question
has body: Consider the following: $ cat example.js function f () { return 1; } exports.F = f; $ browserify example.js &gt; exampleBundle.js $ jshint --verbose example.js $ jshint --verbose exampleBundle.js exampleBundle.js: line 1, col 187, Missing semicolon. (W033) exampleBundle.js: line 1, col 279, Missing semicolon. (W033) exampleBundle.js: line 1, col 301, Missing semicolon. (W033) exampleBundle.js: line 1, col 321, Missing semicolon. (W033) exampleBundle.js: line 1, col 407, Missing semicolon. (W033) exampleBundle.js: line 5, col 15, Missing semicolon. (W033) 6 errors $ Also, for what it's worth, jquery-1.11.1.min.js does not pass jshint validation. Moreover, I am using version 4.2.1 of browserify and 2.5.6 of jshint: $ browserify --v 4.2.1 $ jshint --v jshint v2.5.6 $ Finally, if I modify the .jshintrc file to include a statement of the form (taken from here): $ cat .jshintrc { "browserify": true } $ the errors still remain. First version of the post (BEGIN) In the first version of the post I was getting an error that the option was not supported: example.js: line 0, col 0, Bad option: 'browserify'. (E001) However, as it was pointed out I was running a version of jshint before 2.5.3 (in particular 2.5.2). First version of the post (END) Regardless though, the question still remains: Is this expected? It looks like browserify is generating code that can not be validated by jshint.
linked to: http://stackoverflow.com/q/21418940
has title: Are browserified files expected not to pass jshint validation?
score: 1
tagged with: jshint
has comment: http://stackoverflow.com/comment/41578895
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41579077
tagged with: browserify
type: UnansweredQuestion

http://stackoverflow.com/a/26482805
type: Answer
accepted answer of: http://stackoverflow.com/q/26482227
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26482227
has body: Do not split into two base html. That is not good design for Angularjs apps and it will be creating problem while running test cases (unit or end-2end test cases). Please look the below code. Here "userLoggedIn" is a $rootscope variable for loading necessary block based on authentication. > After authentication, you can set boolean flag or object to that variable. $rootScope.userLoggedIn= true (or) $rootScope.userLoggedIn= {"name":"john smith", "settings":[{}]} In logout controller, you can set false for hiding authentication containers and redirect to login page. $rootScope.userLoggedIn= false;
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26680939
answers question: http://stackoverflow.com/q/26356050
score: 2
downvote count: 0
upvote count: 2
type: Answer
has body: Try -webkit-touch-callout: none http://css-infos.net/property/-webkit-touch-callout

http://stackoverflow.com/comment/41394299
type: AnswerComment
has text: I don't think you would be screwed, because to log in someone would still need a valid access token. They wouldn't be logging in with the Facebook user ID.
score: 0
comment on: http://stackoverflow.com/a/26368079
type: Comment

http://stackoverflow.com/comment/41516611
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26435958
has text: I did that and it was an inaccurate representation of an iphone. When I delopyed my page and viewed it in my iphone it simply did not look the way it did in the browser tools.

http://stackoverflow.com/q/26472578
has answer: http://stackoverflow.com/a/26474018
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has title: Cookie staying around after I delete it and refresh
type: Question
accepted answer: http://stackoverflow.com/a/26474018
tagged with: cookiestore
tagged with: cookies
has body: I'm trying to remove the user's authentication cookie by using $cookieStore.remove('.ASPXAUTH'), but if I refresh the page afterwards, the cookie still exists and the page is still available instead of the user being redirected to the login page as I would expect. Why is the user still able to view the page after I delete the authentication cookie and refresh the page?
answer count: 1
tagged with: javascript
score: 0
tagged with: angularjs

http://stackoverflow.com/comment/41575833
has text: Easiest (and best) solution - don't use multiple jQuery libraries - only use one.
type: Comment
comment on: http://stackoverflow.com/q/26469067
type: QuestionComment
score: 8

http://stackoverflow.com/q/26480006
has body: Using Visual Studio 2012 with JQuery, Bootstrap, and Flot. My screen shows multiple items. When an item is selected, a Modal popup with tabs appears which contains a Flot graph on the first tab. (Actually there is a getJSON call to get the graphing data, so the graph does not appear until after the tab is populated). This all works fine when selecting a unique item. However, when an item that was previously selected is clicked the Flot graph does not appear. This is what the HTML for the Flot looks like: &lt;div id="rightside-@Model.Room.RoomId" class="rightside"&gt; &lt;div id="placeholder-@Model.Room.RoomId-container" style="width:460px;height:300px;margin-bottom:28px"&gt; &lt;div id="placeholder-@Model.Room.RoomId" style="width:460px;height:250px;margin-bottom:20px"&gt;&lt;/div&gt; &lt;input type="text" name="from" class="input-medium" value="#startDate" /&gt; to &lt;input type="text" name="to" class="input-medium" value="#endDate"/&gt; &lt;input type="button" class="btn" data-function="refine-date" data-value="change_graph_dattes" value="Change dates" style="float:right"/&gt; &lt;/div&gt; &lt;div&gt; In stepping through the code I set a breakpoint right before the $.plot statement and I see that the plot space (placeholder-nn), it's parent container (placeholder-nn-container), and the container above that (rightside-nn) all have 0 height, width, left, right, bottom, and top. However, the rest of the tab and elements within the container (inputs) are appearing properly. Any suggestions?
has comment: http://stackoverflow.com/comment/41617762
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26556243
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41596456
has title: JQuery flot within Modal Popup with Tabs does not appear after selecting another modal popup
score: 2
has comment: http://stackoverflow.com/comment/41597505
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/41615915
tagged with: flot
has comment: http://stackoverflow.com/comment/41629858
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41664131

http://stackoverflow.com/q/26410012
possible better answer: http://stackoverflow.com/a/26410049
has comment: http://stackoverflow.com/comment/41468381
has answer: http://stackoverflow.com/a/26410044
has comment: http://stackoverflow.com/comment/41468463
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26410104
type: Question
accepted answer: http://stackoverflow.com/a/26410044
has title: how to convert month name october to 10 in javascript
has body: In java script given a month like "October" how do I convert to a month to number format? Output should be "10", for example. i have variable called monthName it is giving value as "october", now how can i convert monthName value as 10
linked to: http://stackoverflow.com/q/13566552
tagged with: javascript
duplicate of: http://stackoverflow.com/q/13566552
score: 0
has answer: http://stackoverflow.com/a/26410049
answer count: 3

http://stackoverflow.com/q/26398234
has comment: http://stackoverflow.com/comment/41448567
score: 0
has body: I am using get property value in JavaScript by this way $(document).ready(function () { var itemList = [{ id: 1, name: 'shohel' }, { id: 2, name: 'rana' }, { id: 3, name: 'shipon' }]; //step 1 : get property value for (var i = 0; i &lt; itemList.length; i++) { var id = itemList[i].id; } //step 2 : get property value for (var i = 0; i &lt; itemList.length; i++) { var id = itemList[i]['id']; } //which is better? }); I can not understand which is better syntax for get property value in javaScript? Thanks.
accepted answer: http://stackoverflow.com/a/26398379
has title: Get Object Property Value in JavaScript
answer count: 1
favorite count: 0
upvote count: 1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4968406
has answer: http://stackoverflow.com/a/26398379
downvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/26434304
has comment: http://stackoverflow.com/comment/41516684
has comment: http://stackoverflow.com/comment/41513500
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26435864
has body: I'm using js to replace SVGs as images with inline SVG. loadInlineSvg: function(className) { var svgImgs = [].slice.call(document.getElementsByClassName(className)); svgImgs.forEach(function(img) { var svg = document.createElement('svg'), src = img.getAttribute('src'), req = new XMLHttpRequest(); req.addEventListener('readystatechange', function(evt) { if(req.readyState === 4) { if(req.status === 200) { svgXML = req.responseXML.getElementsByTagName('svg')[0]; for(var j = 0; j &lt; svgXML.children.length; j++) { svg.appendChild(svgXML.children[j]); } for(var i = 0; i &lt; svgXML.attributes.length; i++) { svg.setAttribute(svgXML.attributes[i].name, svgXML.attributes[i].value); } svg.setAttribute('width', img.getAttribute('width')); svg.setAttribute('height', img.getAttribute('height')); img.parentNode.replaceChild(svg, img); } } }); req.open('POST', src, true); req.send(); }); } The resulting XML response from the ajax request is exactly as expected: &lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100" viewbox="0 0 145 160" version="1.1"&gt;&lt;g id="compass" fill="#ffffff"&gt; &lt;path d="M77.804878,14.0915556 L77.804878,10.6666667 L82.2256098,10.6666667 L82.2256098,2.81288889 C82.2256098,2.81288889 79.9896037,0.0244444444 72.7572866,0.0244444444 C65.5245274,0.0244444444 63.6585366,2.81288889 63.6585366,2.81288889 L63.6585366,10.6666667 L68.0792683,10.6666667 L68.0792683,14.008 C30.0609756,16.2248889 0.0477439024,47.9373333 0.0477439024,86.7386667 C0.0477439024,126.977333 32.5843293,159.597333 72.6083079,159.597333 C112.632287,159.597333 144.894345,126.977333 144.894345,86.7386667 C144.894345,48.3822222 115.381098,16.9488889 77.804878,14.0915556 L77.804878,14.0915556 Z M72.6984909,151.152889 C37.313628,151.152889 8.62794207,122.313778 8.62794207,86.7386667 C8.62794207,51.1635556 37.313628,22.3244444 72.6984909,22.3244444 C108.083796,22.3244444 136.769482,51.1635556 136.769482,86.7386667 C136.769482,122.313778 …
linked to: http://stackoverflow.com/q/16488884
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7981100
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/41513882
has comment: http://stackoverflow.com/comment/41513468
accepted answer: http://stackoverflow.com/a/26435864
upvote count: 1
has comment: http://stackoverflow.com/comment/41516445
has comment: http://stackoverflow.com/comment/41514050
has title: This inline svg won't display
type: Question
score: 1

http://stackoverflow.com/q/26493611
has comment: http://stackoverflow.com/comment/41622100
has comment: http://stackoverflow.com/comment/41621069
type: UnansweredQuestion
tagged with: facebook
answer count: 0
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/56246374
score: 1
has title: FB graph api does not return all the data?
downvote count: 0
tagged with: javascript
tagged with: facebook-graph-api
favorite count: 0
has comment: http://stackoverflow.com/comment/41621356
has body: I am trying to use Facebook's graph api to return all the users in a particular closed group. I have access to the group, and can see all the members on facebook. But when I try the graph api, I get only a subset of the users. This is what I am trying (in javascript): FB.api( '/some-group-id/members?limit=10000&amp;offset=0' , somecallback(){}); On Facebook, the total members are listed as 11000. But the above query returns only 4500 records, though I have mentioned a limit of 10000. Also the next paging url returns an empty data set. Same issue when I use Facebook's graph explorer tool. Is there a restriction on the amount of data Facebook returns? There is a similar issue when I query the feed of the group.

http://stackoverflow.com/comment/41391609
has text: please use jsfiddle.net to make a sample showing the issue. it's likely due to some other code
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26367168

canvas
tags question: http://stackoverflow.com/q/26495262
tags question: http://stackoverflow.com/q/26431002
tags question: http://stackoverflow.com/q/26508213
tags question: http://stackoverflow.com/q/26478816
tags question: http://stackoverflow.com/q/26490938
tags question: http://stackoverflow.com/q/26389966
tags question: http://stackoverflow.com/q/26396562
tags question: http://stackoverflow.com/q/26387795
tags question: http://stackoverflow.com/q/26472210
tags question: http://stackoverflow.com/q/26388096
tags question: http://stackoverflow.com/q/26383067
tags question: http://stackoverflow.com/q/26421603
tags question: http://stackoverflow.com/q/26430188
tags question: http://stackoverflow.com/q/26376966
tags question: http://stackoverflow.com/q/26400222
tags question: http://stackoverflow.com/q/26458570
tags question: http://stackoverflow.com/q/26489987
tags question: http://stackoverflow.com/q/26494189
tags question: http://stackoverflow.com/q/26422288
tags question: http://stackoverflow.com/q/26460520
tags question: http://stackoverflow.com/q/26364873
tags question: http://stackoverflow.com/q/26457117
tags question: http://stackoverflow.com/q/26403204
tags question: http://stackoverflow.com/q/26460884
tags question: http://stackoverflow.com/q/26355296
tags question: http://stackoverflow.com/q/26491164
tags question: http://stackoverflow.com/q/26427233
tags question: http://stackoverflow.com/q/26408628
tags question: http://stackoverflow.com/q/26497270
tag name: canvas
tags question: http://stackoverflow.com/q/26401248
tags question: http://stackoverflow.com/q/26512077
tags question: http://stackoverflow.com/q/26358784
tags question: http://stackoverflow.com/q/26393131
tags question: http://stackoverflow.com/q/26437176
tags question: http://stackoverflow.com/q/26424765
tags question: http://stackoverflow.com/q/26405405
type: Tag
tags question: http://stackoverflow.com/q/26503052
tags question: http://stackoverflow.com/q/26468695
tags question: http://stackoverflow.com/q/26376633
tags question: http://stackoverflow.com/q/26412540
tags question: http://stackoverflow.com/q/26402060
tags question: http://stackoverflow.com/q/26412567
tags question: http://stackoverflow.com/q/26402789
tags question: http://stackoverflow.com/q/26372010
tags question: http://stackoverflow.com/q/26502979
tags question: http://stackoverflow.com/q/26368179
tags question: http://stackoverflow.com/q/26425128
tags question: http://stackoverflow.com/q/26392442
tags question: http://stackoverflow.com/q/26376409
tags question: http://stackoverflow.com/q/26478112
tags question: http://stackoverflow.com/q/26421083
tags question: http://stackoverflow.com/q/26422281
tags question: http://stackoverflow.com/q/26513089
tags question: http://stackoverflow.com/q/26486783
tags question: http://stackoverflow.com/q/26490917

http://stackoverflow.com/q/26361798
type: Question
has comment: http://stackoverflow.com/comment/41399604
has comment: http://stackoverflow.com/comment/41412862
has comment: http://stackoverflow.com/comment/41391158
has comment: http://stackoverflow.com/comment/46924479
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/41387570
tagged with: google-maps
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41754741
has comment: http://stackoverflow.com/comment/41386633
has title: Make transit stations clickable
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41386125
has body: How do I make transit stations clickable on a default implementation of Maps? Quite like this one: https://developers.google.com/maps/documentation/javascript/examples/map-simple One would expect stations to be clickable, as they are on Google Maps, the website itself. Why aren't they when embedded via the API, and how do I make it work anyway? It's gotta be a flag or something, somewhere, but I have no idea where to look for something like, what it's called, or how to supply it to the API... ~~~EDIT~~~ Here's a test I made: http://home.thany.nl/apps/MYMaps/test2.html It's using the Places API to find train stations and mark them clickable. Works somewhat. It's still horrible, as the Places API doesn't know which language of a train station POI to return (so it returns both English and Japanese for some) and it doesn't know about the map zoom level, so it happily skips train stations that have icons visible on the map, and vice versa. So all in all, Places API is not a great way of working around this problem. I need what Google Maps has, or at least have train/subway stations be clickable.
has comment: http://stackoverflow.com/comment/41457013
has comment: http://stackoverflow.com/comment/41456989

http://stackoverflow.com/comment/41590257
comment on: http://stackoverflow.com/q/26476450
has text: @Mr.Polywhirl the OP hasn't mention anything about jsFiddle. I already knew that, if you check my jsFiddle example I'm already doing that.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41455303
score: 0
type: Comment
has text: I'm not sure how this works... how do I control where it uploads to?
type: AnswerComment
comment on: http://stackoverflow.com/a/26402684

http://stackoverflow.com/q/26410330
tagged with: jquery
type: UnansweredQuestion
score: 0
has body: I try to remove the default features of Datatables as I don't need some of them. I have created a table and gave a id. After that I use API method to handle the table. I can see there is search box and page initions for the table now. But I really need to remove them. Here is the code. $(document).ready(function() { $('#ticketstable2').dataTable({ "paging": false, "searching": false, }); } API Above code doesn't work. How to remove the page initiations?
type: Question
has answer: http://stackoverflow.com/a/26435244
has title: How to disable pag initiation from Datatables
tagged with: javascript
tagged with: datatables
answer count: 1

http://stackoverflow.com/comment/41534285
comment on: http://stackoverflow.com/a/26445844
has text: And there is no possibility to change CSS>
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26495966
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41625760
score: 0
has comment: http://stackoverflow.com/comment/41625711
type: Question
tagged with: javascript
has body: I found some code that displays a group of circles. I slightly modified the code to allow the user to click on any of the circles to change its radius. The problem is that that enlarged circle overlaps the other other circle. I want the other circles to move so that the larger circle doesn't overlap any of the adjacent circles. Here is the code I have: &lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;body&gt; &lt;script src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt; &lt;script&gt; var width = 960, height = 500; var nodes = d3.range(200).map(function() { return {radius: Math.random() * 12 + 4}; }), root = nodes[0], color = d3.scale.category10(); root.radius = 0; root.fixed = true; var force = d3.layout.force() .gravity(0.05) .charge(function(d, i) { return i ? 0 : -2000; }) .nodes(nodes) .size([width, height]); force.start(); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); svg.selectAll("circle") .data(nodes.slice(1)) .enter().append("circle") .attr("r", function(d) { return d.radius; }) .style("fill", function(d, i) { return color(i % 3); }) .on("click", function (d) { d3.select(this).attr("r", 30); force.start(); }); force.on("tick", function(e) { var q = d3.geom.quadtree(nodes), i = 0, n = nodes.length; while (++i &lt; n) q.visit(collide(nodes[i])); svg.selectAll("circle") .attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }); }); function collide(node) { var r = node.radius + 16, nx1 = node.x - r, nx2 = node.x + r, ny1 = node.y - r, ny2 = node.y + r; return function(quad, x1, y1, x2, y2) { if (quad.point &amp;&amp; (quad.point !== node)) { var x = node.x - quad.point.x, y = node.y - quad.point.y, l = Math.sqrt(x * x + y * y), r = node.radius + quad.point.radius; if (l &lt; r) { l = (l - r) / l * .5; node.x -= x *= l; node.y -= y *= l; quad.point.x += x; quad.point.y += y; } } return x1 &gt; nx2 || x2 &lt; nx1 || y1 &gt; ny2 || y2 &lt; ny1; }; } &lt;/script&gt;
has title: How can I force surrounding elements to move in response to a change in size of one of the elements?

http://stackoverflow.com/q/26373592
answer count: 1
downvote count: 0
has title: node-webkit Right Click a Link and Open in Default Browser
score: 1
favorite count: 0
tagged with: node-webkit
accepted answer: http://stackoverflow.com/a/26441482
tagged with: node.js
type: AnsweredQuestion
upvote count: 1
type: Question
has body: I have an iframe in my node-webkit application. I'd like the user to be able to right click links ( tags) in the iframe and be able to select an "Open in Browser" option to open the link using their system's default browser. Is this possible?
tagged with: javascript
has answer: http://stackoverflow.com/a/26441482

http://stackoverflow.com/a/26399896
has comment: http://stackoverflow.com/comment/41454167
score: 0
answers question: http://stackoverflow.com/q/26399638
has body: you can use this code: function checkUpdate() { jQuery.ajax({ type: "POST", url: "your.php", data: "name=currentUser&amp;", //our any other data you want to check success: function(msg){ if(msg.indexOf('no Updates') !== -1 ) { alert( "You have an update" ); } }); } You can use the above code to call and get response from your.php and will alert when the response doesnt contain "no Updates." I suggest you to do this periodically by this code every 2 minute: window.setInterval("checkUpdate()", 2*60*1000); // our any other period you want
has comment: http://stackoverflow.com/comment/41461147
type: Answer
has comment: http://stackoverflow.com/comment/41458587

http://stackoverflow.com/comment/42492185
score: 1
type: AnswerComment
type: Comment
has text: The following code works: `var user = <%- JSON.stringify(user) %>; angular.module('PreloadedData', []) .constant('User', user);`
comment on: http://stackoverflow.com/a/26453994

http://stackoverflow.com/q/26452941
has answer: http://stackoverflow.com/a/26950924
tagged with: google-maps
has comment: http://stackoverflow.com/comment/41555371
has body: I'm want to call fitBounds() on a google map so that a user can see their own location relative to a selected marker/location. Here is my function which handles this: var fitMapToShowResult = function(index){ var hereLatLng = new google.maps.LatLng (lat,lng); //location of the user defined outside this func var firstResultLatLng = new google.maps.LatLng( $scope.searchResults[index].geometry.location.k, $scope.searchResults[0].geometry.location.B ); var latlngList = new Array( hereLatLng, firstResultLatLng ); // latlng: an array of instances of GLatLng var latlngbounds = new google.maps.LatLngBounds(); for (var i=0;i&lt;latlngList.length;i++){ latlngbounds.extend(latlngList[i]); console.log('latlngbounds',latlngbounds); } //$scope.map.setCenter(latlngbounds.getCenter()); $scope.map.fitBounds(latlngbounds); }; It works perfectly about 80% of the time. But roughly 1 in 5 times the marker is completely out of view and the zoom is way too high for the two points to ever be visible at the same time. What am I doing wrong? It may be relevant that my map uses custom markers. To assist with debugging, I added this code to draw the bounds on the map... rect = new google.maps.Rectangle( {bounds: latlngbounds, map: $scope.map} ); It always looks perfect for the first couple results: But often it's incorrect: Notice that in each of the cases where it's incorrect, it appears that one of the dimensions of the rectangle (height/width) is correct, but the other is not. My gut tells me this is relevant. Roundup of similar questions I know this is a popular question, but I've reviewed all of the others and my issue does not seem to be a duplicate of any of them. Hopefully this stockpile will be useful to future troubleshooters, but none of these solved my issue. google maps V3 fitBounds not accurate Useless question with no code and no answers Google Maps API v3 - fitBounds centers only one marker User was re-defining the inside a loop without realizing it. Using setZoom() after using…
possible better answer: http://stackoverflow.com/a/29395439
linked to: http://stackoverflow.com/q/11640356
tagged with: javascript
linked to: http://stackoverflow.com/q/10676140
has answer: http://stackoverflow.com/a/29395439
accepted answer: http://stackoverflow.com/a/26950924
tagged with: google-maps-api-3
linked to: http://stackoverflow.com/q/11061273
linked to: http://stackoverflow.com/q/19013015
has comment: http://stackoverflow.com/comment/48058506
linked to: http://stackoverflow.com/q/15299113
linked to: http://stackoverflow.com/q/4523023
has title: Google maps API V3 fitBounds() not working
has comment: http://stackoverflow.com/comment/41574159
linked to: http://stackoverflow.com/q/8565539
favorite count: 0
has comment: http://stackoverflow.com/comment/41549537
score: 6
linked to: http://stackoverflow.com/q/8421196
linked to: http://stackoverflow.com/q/11264762
downvote count: 1
has comment: http://stackoverflow.com/comment/41550208
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41575700
linked to: http://stackoverflow.com/q/3251774
linked to: http://stackoverflow.com/q/10268033
upvote count: 7
has comment: http://stackoverflow.com/comment/41576698
type: Question
answer count: 2

http://stackoverflow.com/comment/41544809
comment on: http://stackoverflow.com/a/26451222
score: 0
type: AnswerComment
type: Comment
has text: Could You pleas provide some example of usage? ui-utils is quite robust library.

http://stackoverflow.com/comment/41890568
comment on: http://stackoverflow.com/a/26398793
has text: There is a different problem in current plunk - if we click on Field 1 - it will show us 384 rows (use back button in the page) but then if we click on Field 6 - it should just show 3 rows. But it will show all rows. In my real project after some clicks the sort also stops working I could not figure out why. I will try to post new question.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26469160
has body: You cannot get the whole thing in an array! Instead you need to do it differently. It takes only the mail one as that's the last one in the list. So, you can do something like this: x = []; x.push(document.forms["reg"]["username"].value); x.push(document.forms["reg"]["password"].value); x.push(document.forms["reg"]["first_name"].value); x.push(document.forms["reg"]["last_name"].value); x.push(document.forms["reg"]["age"].value); x.push(document.forms["reg"]["mail"].value); And that you have built that array, you need to check for "" and 0 values in them. You need to write a function like in_array() of PHP to JavaScript to check for empty and 0 values. Instead of all these hassles, you can happily use a jQuery form validator plugin, and it does the work well.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26468995

http://stackoverflow.com/comment/41418824
has text: No, you can't use `arguments`. **JSLint will give you a `Use a named parameter.` error.**
comment on: http://stackoverflow.com/a/26380667
score: 1
type: AnswerComment
type: Comment

google-chrome
tags question: http://stackoverflow.com/q/26415778
tags question: http://stackoverflow.com/q/26452517
tags question: http://stackoverflow.com/q/26369085
tags question: http://stackoverflow.com/q/26411500
tags question: http://stackoverflow.com/q/26368874
tags question: http://stackoverflow.com/q/26473420
tags question: http://stackoverflow.com/q/26491072
tags question: http://stackoverflow.com/q/26438178
tags question: http://stackoverflow.com/q/26366119
tags question: http://stackoverflow.com/q/26497968
tags question: http://stackoverflow.com/q/26355003
tags question: http://stackoverflow.com/q/26494403
tags question: http://stackoverflow.com/q/26412095
tags question: http://stackoverflow.com/q/26469550
tags question: http://stackoverflow.com/q/26368562
tags question: http://stackoverflow.com/q/26423193
tags question: http://stackoverflow.com/q/26380267
tags question: http://stackoverflow.com/q/26390322
tags question: http://stackoverflow.com/q/26428625
tags question: http://stackoverflow.com/q/26483541
tags question: http://stackoverflow.com/q/26452133
tags question: http://stackoverflow.com/q/26422256
tags question: http://stackoverflow.com/q/26479386
tags question: http://stackoverflow.com/q/26424366
tags question: http://stackoverflow.com/q/26459594
tags question: http://stackoverflow.com/q/26433634
tags question: http://stackoverflow.com/q/26381943
tags question: http://stackoverflow.com/q/26420511
tags question: http://stackoverflow.com/q/26470556
tags question: http://stackoverflow.com/q/26400630
tags question: http://stackoverflow.com/q/26397933
tags question: http://stackoverflow.com/q/26384241
tags question: http://stackoverflow.com/q/26371076
tags question: http://stackoverflow.com/q/26442007
tags question: http://stackoverflow.com/q/26458140
tags question: http://stackoverflow.com/q/26388096
tags question: http://stackoverflow.com/q/26456453
tags question: http://stackoverflow.com/q/26495197
tags question: http://stackoverflow.com/q/26382261
tags question: http://stackoverflow.com/q/26385683
tags question: http://stackoverflow.com/q/26407977
tags question: http://stackoverflow.com/q/26442475
tags question: http://stackoverflow.com/q/26414956
tags question: http://stackoverflow.com/q/26370439
tags question: http://stackoverflow.com/q/26373925
tags question: http://stackoverflow.com/q/26397714
tags question: http://stackoverflow.com/q/26447999
tags question: http://stackoverflow.com/q/26404117
tags question: http://stackoverflow.com/q/26392052
tags question: http://stackoverflow.com/q/26494606
tags question: http://stackoverflow.com/q/26412169
tags question: http://stackoverflow.com/q/26358245
tags question: http://stackoverflow.com/q/26472732
tags question: http://stackoverflow.com/q/26495914
type: Tag
tags question: http://stackoverflow.com/q/26376001
tags question: http://stackoverflow.com/q/26439227
tags question: http://stackoverflow.com/q/26456104
tags question: http://stackoverflow.com/q/26502320
tags question: http://stackoverflow.com/q/26387536
tag name: google-chrome
tags question: http://stackoverflow.com/q/26491196
tags question: http://stackoverflow.com/q/26423993
tags question: http://stackoverflow.com/q/26472273
tags question: http://stackoverflow.com/q/26468023
tags question: http://stackoverflow.com/q/26387035
tags question: http://stackoverflow.com/q/26451377
tags question: http://stackoverflow.com/q/26379694
tags question: http://stackoverflow.com/q/26491360
tags question: http://stackoverflow.com/q/26433216
tags question: http://stackoverflow.com/q/26359206
tags question: http://stackoverflow.com/q/26422807
tags question: http://stackoverflow.com/q/26441725
tags question: http://stackoverflow.com/q/26481474
tags question: http://stackoverflow.com/q/26498682
tags question: http://stackoverflow.com/q/26368863
tags question: http://stackoverflow.com/q/26373197
tags question: http://stackoverflow.com/q/26410464
tags question: http://stackoverflow.com/q/26508237
tags question: http://stackoverflow.com/q/26406985

http://stackoverflow.com/a/26516336
has comment: http://stackoverflow.com/comment/41685728
answers question: http://stackoverflow.com/q/26513543
type: Answer
has body: I have provided a possible solution in this jsbin for you http://jsbin.com/vupagekizu/1/ Hopefully I have understood what it is you are after. Basically all I have done is added a Select event onto the combobox for you that checks to see if the index of the selected item is greater than -1 i.e. an item in the list and if it is then the system stores it in a global variable for you to access. In order to get all the properties of the item I have selected the dataItem associated with the selected item. var selectedValue = null; select: function(e) { if(e.item.index() &gt; -1) { selectedValue = this.dataItem(e.item.index()); alert(selectedValue); } else { //do nothing. } }
score: 0

http://stackoverflow.com/q/26454916
answer count: 4
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26585678
has answer: http://stackoverflow.com/a/26454968
linked to: http://stackoverflow.com/q/9354099
tagged with: download
linked to: http://stackoverflow.com/q/16375365
possible better answer: http://stackoverflow.com/a/26627866
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26627866
linked to: http://stackoverflow.com/q/2244272
tagged with: java
tagged with: scroll
upvote count: 1
has title: Download the entire webpage
has comment: http://stackoverflow.com/comment/41735789
accepted answer: http://stackoverflow.com/a/26585678
has answer: http://stackoverflow.com/a/26600925
tagged with: javascript
has body: There are ways to download an entire webpage, using HTMLEditorKit. However, I need to download an entire webpage which needs scrolling in order to load its entire content. This technology is achieved most commonly through JavaScript bundled with Ajax. Q.: Is there a way to trick the destined webpage, using only Java code, in order to download its full content? Q.2: If this is not possible only with Java, then is it possible in combination with JavaScript? Simple notice, what I wrote: public class PageDownload { public static void main(String[] args) throws Exception { String webUrl = "..."; URL url = new URL(webUrl); URLConnection connection = url.openConnection(); InputStream is = connection.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); HTMLEditorKit htmlKit = new HTMLEditorKit(); HTMLDocument htmlDoc = (HTMLDocument) htmlKit.createDefaultDocument(); HTMLEditorKit.Parser parser = new ParserDelegator(); HTMLEditorKit.ParserCallback callback = htmlDoc.getReader(0); parser.parse(br, callback, true); for (HTMLDocument.Iterator iterator = htmlDoc.getIterator(HTML.Tag.IMG); iterator.isValid(); iterator.next()) { AttributeSet attributes = iterator.getAttributes(); String imgSrc = (String) attributes.getAttribute(HTML.Attribute.SRC); if (imgSrc != null &amp;&amp; (imgSrc.endsWith(".jpg") || (imgSrc.endsWith(".jpeg")) || (imgSrc.endsWith(".png")) || (imgSrc.endsWith(".ico")) || (imgSrc.endsWith(".bmp")))) { try { downloadImage(webUrl, imgSrc); } catch (IOException ex) { System.out.println(ex.getMessage()); } } } } private static void downloadImage(String url, String imgSrc) throws IOException { BufferedImage image = null; try { if (!(imgSrc.startsWith("http"))) { url = url + imgSrc; } else { url = imgSrc; } imgSrc = imgSrc.substring(imgSrc.lastIndexOf("/") + 1); String imageFormat = null; imageFormat = imgSrc.substring(imgSrc.lastIndexOf(".") + 1); String imgPath = null; imgPath = "..." + imgSrc + ""; URL i…

multi-select
tags question: http://stackoverflow.com/q/26468662
type: Tag
tags question: http://stackoverflow.com/q/26483803
tag name: multi-select

http://stackoverflow.com/comment/41533887
type: QuestionComment
comment on: http://stackoverflow.com/q/26445248
type: Comment
score: 0
has text: `(obj === null || obj === undefined)` is the same as `obj == null`. Out of curiosity, is there a reason you are using the more verbose form?

http://stackoverflow.com/a/26371354
accepted answer of: http://stackoverflow.com/q/26371166
answers question: http://stackoverflow.com/q/26371166
type: Answer
score: 2
downvote count: 0
upvote count: 2
has body: You can construct an &lt;img&gt; object, and in a for loop, clone it and append to your element of interest: $(function() { var $img = $('&lt;img /&gt;', { 'src': 'http://placehold.it/100x100' }); for(var i=0; i&lt;5; i++) { $img.clone().appendTo('#imagePlace'); } }); If you don't .clone() the jQuery object, you will end up moving it instead of making copies of it. See proof-of-concept fiddle here: http://jsfiddle.net/teddyrised/Lmvnunq9/
type: AcceptedAnswer

http://stackoverflow.com/comment/41575781
score: 0
has text: @George Well, it does. I can leave all the previous fields empty and i get an alert message everytime. Except for the mail field. It doesn't give me a alert message if i leave that one empty or only fill in the mail field.
comment on: http://stackoverflow.com/q/26468995
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41575477
comment on: http://stackoverflow.com/q/26467658
has text: How do I do that? I'm still a newb to d3.js.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26499304
type: AnsweredQuestion
tagged with: angular-ui-router
has title: Nest URIs but not controllers or views in AngularUI Router
downvote count: 0
answer count: 1
tagged with: angular-ui
has comment: http://stackoverflow.com/comment/41656592
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26520536
tagged with: angularjs
score: 2
has comment: http://stackoverflow.com/comment/41631809
upvote count: 2
accepted answer: http://stackoverflow.com/a/26520536
type: Question
has body: Using AngularUI Router I want to nest some URIs but not their views or controller actions. For example, I would like these URIs: /things - lists the recent things. /things/:x - shows the details of thing with id x. If I use the "Nested States &amp; Views" from the wiki then I have to actually nest the "list of things" and "show single thing" views, which happen to be unrelated. Moreover, the "show single thing" scope will have the "list of things" even though it will not need them. If I use the "Nested States &amp; Views" from the README then I've got a separate /things/list URI instead of plain old /things like I want. It seems like I want a separate "list" (or "index") state that resolves to the base URL for an otherwise nested state but without passing on the view and actions to child states. Is this possible?

http://stackoverflow.com/comment/41615291
has text: you can't execute js on a page from another domain, https://www.google.com.au/search?q=same+origin+policy
comment on: http://stackoverflow.com/q/26488799
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26481682
answers question: http://stackoverflow.com/q/26469037
type: Answer
has body: You can do it using if statements, like this: http://jsfiddle.net/nwbxexeu/3/ div&gt; &lt;ul data-bind="foreach: messages"&gt; &lt;!-- ko if: $data.received == true --&gt; &lt;li class="left clearfix"&gt; &lt;!-- Received HTML here --&gt; &lt;/li&gt; &lt;!-- /ko --&gt; &lt;!-- ko ifnot: $data.received == true --&gt; &lt;li class="right clearfix"&gt; &lt;!-- Sent HTML here --&gt; &lt;/li&gt; &lt;!-- /ko --&gt; &lt;/ul&gt; &lt;/div&gt; In my fiddle I'm not using the template binding. I don't think it adds anything in the fiddle itself, because there's no obvious reason why you'd need to reuse the template elsewhere? However, you might like to use the template bindings in your app, in which case you'll need to attach it to the li element.
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26469037
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26512925
accepted answer of: http://stackoverflow.com/q/26512821
answers question: http://stackoverflow.com/q/26512821
upvote count: 4
has body: Characters in a string are - just like elements in an array - zero-indexed. You will need to use .charAt(length-1), or you're getting the character after the end of the string (which yields the empty string). This should do it: function countVowels(str) { var length = str.length; if (length == 0) { return 0; } if (isVowel(str.charAt(length - 1)) == false) { return countVowels(str.substring(0, length - 1)); } return 1 + countVowels(str.substring(0, length - 1)); } However, you could simplify this by not calling the recursive part twice, and counting from the front: function countVowels(str) { if (str.length == 0) return 0; return (isVowel(str.charAt(0)) ? 1 : 0) + countVowels(str.slice(1)); }
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer

http://stackoverflow.com/comment/41509264
type: QuestionComment
comment on: http://stackoverflow.com/q/26432349
has text: Are you trying to make this be something like a game? I would look into Canvas instead of HTML elements
score: 0
type: Comment

http://stackoverflow.com/comment/41389134
score: 0
comment on: http://stackoverflow.com/q/26365757
type: QuestionComment
has text: Is there maybe any other kind of pattern instead of regular expressions that allows such (nearly) limited operations?
type: Comment

http://stackoverflow.com/comment/41398878
type: Comment
type: AnswerComment
has text: It doesn't work for the opposite way. Moreover, the transition starts from 75% bottom and not from 50px height.
comment on: http://stackoverflow.com/a/26370850
score: 0

http://stackoverflow.com/q/26446498
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: animating search bar with jquery animate
tagged with: animation
has body: firstly here's the fiddle I'm trying to animate a search form, right now it starts from left to right, I want it to start from right to left. I also want to add a nice easing to the animation. HTML Code: JS code: $("i.fa.fa-search").click(function () { $(".search-toggle").animate({width: 'toggle'});; }); Any help would be appreciated.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26446559
accepted answer: http://stackoverflow.com/a/26446559

http://stackoverflow.com/comment/41644499
has text: @Billy already all coding done so can not changed..
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26506765
type: QuestionComment

http://stackoverflow.com/comment/41418995
has text: what about using event.preventDefault() ???
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26381943
type: Comment

http://stackoverflow.com/q/26417247
type: Question
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/26417464
upvote count: 4
has body: I mean code like this: function MyObject(x, y, z) { this.init(x, y, z); } MyObject.prototype = { constructor: MyObject, init: function(x, y, z) { // actually use x, y, z }, other methods }; Why not just not have an init method and do all the initialization in the constructor?
answer count: 2
downvote count: 0
linked to: http://stackoverflow.com/q/12463040
linked to: http://stackoverflow.com/q/12592913
has answer: http://stackoverflow.com/a/26417913
favorite count: 0
type: UnansweredQuestion
has title: What are the advantages of having a separate init function on objects?

http://stackoverflow.com/a/28468580
answers question: http://stackoverflow.com/q/26477828
type: Answer
has body: I fixed the issue by adding the following to bower.json: ... "exportsOverride": { "bootstrap": { "css": ["dist/css/bootstrap.css", "dist/css/bootstrap.css.map"], "js": "dist/js/bootstrap.js", "fonts": "dist/fonts" } } ... This is also a fix to copy fonts. See http://blog.mdarveau.com/2014/10/10/using-fontawesome-and-glyphicons-in-a-sails-app
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26477828
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41500216
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26427301
type: AnswerComment
has text: Slowly getting to the source of my problems. About the quotes I just looked closely and it seems that Oxygen XML editor inserted ” instead of " for some unknown reason. Naturally ” is not recognized as a valid quote character in the XML element.

http://stackoverflow.com/comment/41501384
comment on: http://stackoverflow.com/a/26427301
type: AnswerComment
has text: Yes, now it is working. I found a couple more of the weird quotation characters. I have no idea why Oxygen did that. I used its autocomplete feature. I'm still getting validation errors in Oxygen XML editor concerning my cid and sid attributes though. Xmllint also returns errors there so it's not an Oxygen thing only. Thanks a lot for your help! Will mark your reply as the answer since it actually pointed me to the right direction. Copying it revealed to me the problem with the characters.
type: Comment
score: 1

http://stackoverflow.com/q/26354309
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26354457
favorite count: 0
has comment: http://stackoverflow.com/comment/41368001
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26354375
tagged with: php
has title: Pass image id to php mysql query via jquery
has comment: http://stackoverflow.com/comment/41368265
tagged with: mysql
has body: I need to pass image id to mysql query. For that, i have done these coding. But it results in Undefined index x: I referenced many stackoverflow answers. But nothing is working. echo "&lt;img src=http://localhost/ss/img/".$p['path']." id=".$p['album_id']." class='img-responsive' alt='' data-toggle='modal' data-target='.bs-example-modal-lg1'&gt;"; if(isset($_GET['x'])) { echo $_GET['x']'; } &lt;script&gt; $(document).ready(function() { $(".g2 img").click(function() { var albumID = $(this).attr('id'); alert(albumID); //working fine, getting id $.ajax({ type: 'GET', url: 'index.php', //data: x: "albumID", data: x: albumID, success: function(data) { alert("success!"); } }); }); }); &lt;/script&gt; What is the wrong which i'm doing? Please help me.
has answer: http://stackoverflow.com/a/26355131
downvote count: 1
has comment: http://stackoverflow.com/comment/41368633
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/41373617
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26357138
score: 0
has text: special character = non-alphanumeric characters?

http://stackoverflow.com/comment/41465918
type: AnswerComment
has text: please contribute giving a correct code of mine, I'm not understanding.
type: Comment
comment on: http://stackoverflow.com/a/26407498
score: 0

typeahead
type: Tag
tags question: http://stackoverflow.com/q/26442052
tags question: http://stackoverflow.com/q/26458892
tag name: typeahead
tags question: http://stackoverflow.com/q/26510561

asp.net
tags question: http://stackoverflow.com/q/26459299
tags question: http://stackoverflow.com/q/26359893
tags question: http://stackoverflow.com/q/26493518
tags question: http://stackoverflow.com/q/26384211
tags question: http://stackoverflow.com/q/26384645
tags question: http://stackoverflow.com/q/26465915
tags question: http://stackoverflow.com/q/26387749
tags question: http://stackoverflow.com/q/26393713
tags question: http://stackoverflow.com/q/26448375
tags question: http://stackoverflow.com/q/26414125
tags question: http://stackoverflow.com/q/26447766
tags question: http://stackoverflow.com/q/26415614
tags question: http://stackoverflow.com/q/26449789
tags question: http://stackoverflow.com/q/26439258
tags question: http://stackoverflow.com/q/26427381
tags question: http://stackoverflow.com/q/26379899
tags question: http://stackoverflow.com/q/26490565
tags question: http://stackoverflow.com/q/26499209
tags question: http://stackoverflow.com/q/26401407
tags question: http://stackoverflow.com/q/26501347
tags question: http://stackoverflow.com/q/26502515
tags question: http://stackoverflow.com/q/26513260
tags question: http://stackoverflow.com/q/26378523
tags question: http://stackoverflow.com/q/26389975
tags question: http://stackoverflow.com/q/26472539
tags question: http://stackoverflow.com/q/26492696
tags question: http://stackoverflow.com/q/26470858
tags question: http://stackoverflow.com/q/26512309
tags question: http://stackoverflow.com/q/26508298
tags question: http://stackoverflow.com/q/26418219
tags question: http://stackoverflow.com/q/26403096
tags question: http://stackoverflow.com/q/26506063
tags question: http://stackoverflow.com/q/26356730
tags question: http://stackoverflow.com/q/26423567
tags question: http://stackoverflow.com/q/26441476
tags question: http://stackoverflow.com/q/26362440
tags question: http://stackoverflow.com/q/26356096
tags question: http://stackoverflow.com/q/26378121
tags question: http://stackoverflow.com/q/26460025
tags question: http://stackoverflow.com/q/26390487
tags question: http://stackoverflow.com/q/26441701
tags question: http://stackoverflow.com/q/26412773
tags question: http://stackoverflow.com/q/26486838
tags question: http://stackoverflow.com/q/26377648
tags question: http://stackoverflow.com/q/26497018
tags question: http://stackoverflow.com/q/26454331
tags question: http://stackoverflow.com/q/26417885
tags question: http://stackoverflow.com/q/26438120
tags question: http://stackoverflow.com/q/26470862
tags question: http://stackoverflow.com/q/26364854
tags question: http://stackoverflow.com/q/26404419
tags question: http://stackoverflow.com/q/26485070
tags question: http://stackoverflow.com/q/26473804
tags question: http://stackoverflow.com/q/26361774
tags question: http://stackoverflow.com/q/26419412
tags question: http://stackoverflow.com/q/26430160
tags question: http://stackoverflow.com/q/26415377
tags question: http://stackoverflow.com/q/26394488
tags question: http://stackoverflow.com/q/26389237
tags question: http://stackoverflow.com/q/26390474
tags question: http://stackoverflow.com/q/26360830
tags question: http://stackoverflow.com/q/26355101
tags question: http://stackoverflow.com/q/26413422
tags question: http://stackoverflow.com/q/26369801
tags question: http://stackoverflow.com/q/26384840
tags question: http://stackoverflow.com/q/26493336
tags question: http://stackoverflow.com/q/26459438
tags question: http://stackoverflow.com/q/26436977
tags question: http://stackoverflow.com/q/26395488
tags question: http://stackoverflow.com/q/26406813
tags question: http://stackoverflow.com/q/26412169
tags question: http://stackoverflow.com/q/26495673
tags question: http://stackoverflow.com/q/26360544
type: Tag
tags question: http://stackoverflow.com/q/26479596
tags question: http://stackoverflow.com/q/26401547
tags question: http://stackoverflow.com/q/26468594
tags question: http://stackoverflow.com/q/26463858
tags question: http://stackoverflow.com/q/26420386
tags question: http://stackoverflow.com/q/26373347

http://stackoverflow.com/comment/41487774
has text: Im using FF 32.0.3 and FireBug. No console errors found
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26398260

http://stackoverflow.com/comment/41607702
type: Comment
type: QuestionComment
has text: I get that ofcourse. But my problem is that I'm not using a retina screen now. On my friends Mac, all pictures looks fine, even in IE when he is using virtualbox with IE. But on my screen, the picture looks like crap in IE, but not in Chrome, Opera and so on. Why is that?
score: 0
comment on: http://stackoverflow.com/q/26486541

android
tags question: http://stackoverflow.com/q/26510118
tags question: http://stackoverflow.com/q/26380531
tags question: http://stackoverflow.com/q/26356626
tags question: http://stackoverflow.com/q/26401037
tags question: http://stackoverflow.com/q/26397933
tags question: http://stackoverflow.com/q/26510519
tags question: http://stackoverflow.com/q/26461148
tags question: http://stackoverflow.com/q/26466016
tags question: http://stackoverflow.com/q/26461678
tags question: http://stackoverflow.com/q/26458781
tags question: http://stackoverflow.com/q/26451476
tags question: http://stackoverflow.com/q/26453703
tags question: http://stackoverflow.com/q/26434265
tags question: http://stackoverflow.com/q/26463955
tags question: http://stackoverflow.com/q/26494647
tags question: http://stackoverflow.com/q/26418520
tags question: http://stackoverflow.com/q/26427739
tags question: http://stackoverflow.com/q/26437290
tags question: http://stackoverflow.com/q/26419086
tags question: http://stackoverflow.com/q/26368863
tags question: http://stackoverflow.com/q/26425128
tags question: http://stackoverflow.com/q/26385301
tags question: http://stackoverflow.com/q/26407695
tags question: http://stackoverflow.com/q/26493314
tags question: http://stackoverflow.com/q/26378194
tags question: http://stackoverflow.com/q/26455646
tags question: http://stackoverflow.com/q/26451310
tags question: http://stackoverflow.com/q/26379667
tags question: http://stackoverflow.com/q/26437400
tags question: http://stackoverflow.com/q/26382523
tags question: http://stackoverflow.com/q/26379162
tags question: http://stackoverflow.com/q/26422539
tags question: http://stackoverflow.com/q/26392957
tags question: http://stackoverflow.com/q/26402060
tags question: http://stackoverflow.com/q/26410308
tags question: http://stackoverflow.com/q/26452517
tags question: http://stackoverflow.com/q/26465832
tags question: http://stackoverflow.com/q/26488002
tags question: http://stackoverflow.com/q/26404764
tags question: http://stackoverflow.com/q/26394698
tags question: http://stackoverflow.com/q/26381356
tags question: http://stackoverflow.com/q/26460215
tags question: http://stackoverflow.com/q/26481471
tags question: http://stackoverflow.com/q/26445771
tags question: http://stackoverflow.com/q/26497774
tags question: http://stackoverflow.com/q/26398921
tags question: http://stackoverflow.com/q/26439175
tags question: http://stackoverflow.com/q/26495358
tags question: http://stackoverflow.com/q/26505927
tag name: android
tags question: http://stackoverflow.com/q/26447063
tags question: http://stackoverflow.com/q/26495242
tags question: http://stackoverflow.com/q/26364610
tags question: http://stackoverflow.com/q/26479985
type: Tag
tags question: http://stackoverflow.com/q/26379353

http://stackoverflow.com/a/26482365
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26482270
upvote count: 2
answers question: http://stackoverflow.com/q/26482270
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41600488
has body: Yes. $(element).append(' ')

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/26402663
tag name: datetimepicker

http://stackoverflow.com/comment/41462962
score: 0
type: Comment
has text: Yes, this is what I was looking for. +1 :) Also good explanation for click().
type: AnswerComment
comment on: http://stackoverflow.com/a/26406885

http://stackoverflow.com/q/26380966
upvote count: 4
answer count: 2
downvote count: 0
has title: Setting inherited property via setter
tagged with: javascript
tagged with: inheritance
score: 4
linked to: http://stackoverflow.com/q/12592913
favorite count: 0
has answer: http://stackoverflow.com/a/26381860
has body: I have this code: // 'Vehicle' object constructor function Vehicle() { this.wheels = 4; } // Adding 'setWheels' setter function to set 'wheels' property Object.defineProperty(Vehicle.prototype, "setWheels", { set: function(x) {this.wheels = x} }); // 'Car' object constructor with 'Vehicle' as prototype function Car() {} Car.prototype = new Vehicle; Car.prototype.constructor = Car; // myCar inherits 'wheels' property and 'setWheels' method myCar = new Car(); myCar.setWheels = 2; I was expecting myCar.setWheels = 2 to alter the inherited property, but instead it sets myCar's local property which shadows inherited one. From what I have read here setting inherited property via setter is possible, which means I am doing something wrong. But what exactly?
has comment: http://stackoverflow.com/comment/41417206
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26382224
has answer: http://stackoverflow.com/a/26382224
accepted answer: http://stackoverflow.com/a/26381860
type: Question
has comment: http://stackoverflow.com/comment/41417030

http://stackoverflow.com/comment/41513411
comment on: http://stackoverflow.com/a/26433811
has text: You need an Object, not a String. Stringify = strings, JSON.parse =object
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26436140
downvote count: 1
has body: I am loading markers from a database to display on a google map by this below. This is working fine however, I would like to implement the option of pressing a particular button somewhere else on the page, and then map would dynamically change to only show markers pertaining to what was clicked. Basically, I would like to filter by the 'type' column in my database but still keep all types loaing by default. eg. Page loads, Map loads and displays all types, User clicks on a button which causes the map to only show markers that have type1 as the value in the db. Kind of like a toggle with a check box. Any ideas of how to go ahead with this, I don't think reloading markers from the db is the most efficient way, can I simply just hide markers which have this property? map = new google.maps.Map(document.getElementById("google_map"), googleMapOptions); //Load Markers from the XML File, Check (map_process.php) $.get("map_process.php", function (data) { $(data).find("marker").each(function () { var name = $(this).attr('name'); var address = '&lt;p&gt;'+ $(this).attr('address') +'&lt;/p&gt;'; var type = $(this).attr('type'); var description ='&lt;p&gt;'+ $(this).attr('description') +'&lt;/p&gt;'; var point = new google.maps.LatLng(parseFloat($(this).attr('lat')),parseFloat($(this).attr('lng'))); var icon1 = customIcons[type] || {}; create_marker(point, name, address, false, false, false, icon1.icon);//"http://sanwebe.com/assets/google-map-save-markers-db/icons/pin_blue.png"); }); });
upvote count: 0
has title: Loading specific markers by checkbox?
has answer: http://stackoverflow.com/a/26438181
accepted answer: http://stackoverflow.com/a/26438181
type: AnsweredQuestion
score: -1
type: Question
tagged with: google-maps
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: google-maps-api-3

http://stackoverflow.com/comment/41460603
type: QuestionComment
has text: It's a pretty common problem: https://github.com/harvesthq/chosen/issues/746
comment on: http://stackoverflow.com/q/26405178
score: 0
type: Comment

sql
tags question: http://stackoverflow.com/q/26401974
tags question: http://stackoverflow.com/q/26416102
tags question: http://stackoverflow.com/q/26401682
tags question: http://stackoverflow.com/q/26398679
tags question: http://stackoverflow.com/q/26448124
tag name: sql
tags question: http://stackoverflow.com/q/26403985
type: Tag
tags question: http://stackoverflow.com/q/26412285
tags question: http://stackoverflow.com/q/26427541
tags question: http://stackoverflow.com/q/26497074
tags question: http://stackoverflow.com/q/26439981
tags question: http://stackoverflow.com/q/26431392

http://stackoverflow.com/a/26485245
has body: To start, use a simple plugin function for superagent. This rewrites absolute urls - but only on the server. This means that the browser will make a request to '/api' and the server will make it to 'localhost:port/api'. function fixUrlPlugin(port){ return function fixUrl(req){ if (process.browser) return req; if (req.url[0] === '/') { req.url = 'localhost:' + port + req.url } return req; }; } Now somewhere in your code, you'll run this and save the output in a module. app.listen(8080); module.exports = fixUrlPlugin(8080); And then your code can be come: var urlPlugin = require('./path/to/that/module.js'); // ... statics: { getUserInfo: function(username, cb) { superagent.get('/api/users/' + username) .use(urlPlugin) .end(function(err, res) { cb(err, res ? res.body : null); }); } },
score: 3
type: AcceptedAnswer
downvote count: 0
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26463924
type: Answer
answers question: http://stackoverflow.com/q/26463924

http://stackoverflow.com/a/26478239
has comment: http://stackoverflow.com/comment/41601479
has body: It's primarily useful for preventing objects from polluting the global space. In a closure you can make the variables local and an internal "implementation" detail. The main benefit of closures is really the ability to create private scope. The performance argument made here really relates to micro optimization at this level, and is not a practical concern.
score: 0
answers question: http://stackoverflow.com/q/26478177
type: Answer

http://stackoverflow.com/a/26498670
has comment: http://stackoverflow.com/comment/41630055
has body: You can use ng-cloak to solve this issue You can put it on the specific level you want to cloak or at the top level such as body to html tag. The effect propagates downward. For example if it is on the body tag, all tags under the body tag will be cloaked &lt;body ng-cloak&gt; &lt;div&gt;{{variable}}&lt;/div&gt; //cloaked &lt;/body&gt;
downvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26498455
type: Answer
accepted answer of: http://stackoverflow.com/q/26498455
upvote count: 2
score: 1

http://stackoverflow.com/q/26453170
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/24216243
accepted answer: http://stackoverflow.com/a/26453308
has comment: http://stackoverflow.com/comment/41551564
has title: Clicking objects on the evaluated page using CasperJS
has body: I'm trying to click x number of objects on the evaluated page but it's failing after all day sunday attempts.. I have the following code, you can see I build up a list of objects in my variable (called itemsToAdd) and then I need that to be passed onto the evaluated page and then those objects to be clicked. I know you can't pass complex objects to the evaluated page but every attempt I've tried has failed.. I've tried everything, please help. I've also tried custom js files although I couldn't get that working either. $(function(ns) { ns.myMethod = function(itemArray) { var items = itemArray.items; for (i = 0; i &lt; items.length; i++) { casper.thenEvaluate(function() { casper.click(items[i].buttonId); casper.waitUntilVisible(items[i].basketId, function() { casper.echo(items[i].successMessage); }); }); } return this; }; })(namespace('test')); This is my variable, the buttonId is the DOM id for the button on the evaluated page. The basketId is another section on the evaluated page that gets updated to represent the button clicking has worked. Complex variable var itemsToAdd = { 'items': [ { buttonId: '#button1', basketId: '#nowInBasket1', successMessage: 'It worked' }, { buttonId: '#button2', basketId: '#nowInBasket2', successMessage: 'this worked aswell' } ] }; Calling the code test.myMethod(itemsToAdd);
type: AnsweredQuestion
tagged with: casperjs
linked to: http://stackoverflow.com/q/750486
type: Question
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/41551407
has comment: http://stackoverflow.com/comment/41547442
tagged with: javascript
has answer: http://stackoverflow.com/a/26453308

http://stackoverflow.com/q/26384250
type: Question
tagged with: javascript
tagged with: jquery
has body: This a variation I have asked before. With the Bootstrap accordion,how can I retrieve the id of the panel at a specified index(index 0 for example)? was thinking something along the lines of var id = $('#accordion .in').get(0).attr("id"); regards
accepted answer: http://stackoverflow.com/a/26384280
upvote count: 3
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26384280
tagged with: accordion
type: AnsweredQuestion
score: 3
tagged with: twitter-bootstrap-3
has title: Getting id of accordion at specified index
downvote count: 0

http://stackoverflow.com/comment/41611781
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26488693
has text: the div part is just a sample I pulled its not an actual chunk of code, so that div is there but that's for proofreading!
type: Comment

http://stackoverflow.com/a/26438447
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26434029
has body: I solved this by reinitialising ajaxifyShopify every time the new products finished rendering using infinite-ajax-scroll's rendered event. Copy and paste the following code in collection.liquid: &lt;script&gt; var ias = jQuery.ias({ container: '#products', item: '.single-product', pagination: '.pagination-custom', next: '.next' }); ias.on('rendered', function() { jQuery(function($) { ajaxifyShopify.init({ method: '{{ settings.ajax_cart_method }}', wrapperClass: 'wrapper', formSelector: '#addToCartForm', addToCartSelector: '#addToCart', cartCountSelector: '#cartCount', toggleCartButton: '.cart-toggle', useCartTemplate: true, btnClass: 'btn', moneyFormat:, disableAjaxCart: false, enableQtySelectors: true }); }); }) &lt;/script&gt;
answers question: http://stackoverflow.com/q/26434029
type: AcceptedAnswer

http://stackoverflow.com/q/26490823
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41615557
has title: How to allow html form to submit only if numbers in field adds up to a certain sum
has answer: http://stackoverflow.com/a/26490975
has body: I have a form that inserts data into a database. There are many input fields in this form, 4 of these fields are meant to input numbers: &lt;form action="page.php" method="post"&gt; &lt;input type="text" name="Text1"&gt; &lt;input type="number" name="Number1"&gt; &lt;input type="text" name="Text2"&gt; &lt;input type="number" name="Number2"&gt; &lt;input type="text" name="Text3"&gt; &lt;input type="number" name="Number3"&gt; &lt;input type="text" name="Text4"&gt; &lt;input type="number" name="Number4"&gt; &lt;input type="submit" name="submit"&gt; &lt;/form&gt; My question: How to allow the form to submit ONLY IF the inputs in those 4 fields adds up to 100? And display some sort of error to tell the user if the total is not yet 100. Thanks.
has answer: http://stackoverflow.com/a/26491171
possible better answer: http://stackoverflow.com/a/26491110
has answer: http://stackoverflow.com/a/26491636
type: Question
has comment: http://stackoverflow.com/comment/41615604
has answer: http://stackoverflow.com/a/26491415
tagged with: javascript
answer count: 6
tagged with: forms
has comment: http://stackoverflow.com/comment/41615735
score: 0
accepted answer: http://stackoverflow.com/a/26491171
has comment: http://stackoverflow.com/comment/41615585
has comment: http://stackoverflow.com/comment/41615592
has answer: http://stackoverflow.com/a/26491208
has comment: http://stackoverflow.com/comment/41615574
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26491110

http://stackoverflow.com/a/26428809
has body: Sorry I didn't really understand what was happening with your code so I rewrote the js part from scratch: http://jsfiddle.net/d503n47r/2/ $('body').on('click','.toggle h3 a', function(e){ e.preventDefault(); if($(this).parents('.toggles').hasClass('accordion')) return false; if ($(this).parents('.toggle').find('div').eq(0).hasClass('open')) { $(this).parents('.toggle').find('div').eq(0).removeClass('open').slideUp(); } else { $('.toggle.open').removeClass('open'); $(this).parents('.toggle').find('div').eq(0).addClass('open').slideDown(); } }); Please take a look at jquery UI as it helps a lot with all this common things http://jqueryui.com/ (No need to reinvent the wheel)
answers question: http://stackoverflow.com/q/26428051
type: Answer
has comment: http://stackoverflow.com/comment/41503187
score: 0
has comment: http://stackoverflow.com/comment/41509487

http://stackoverflow.com/comment/41454377
has text: thanks. This works however I can only move this part "$http.post('/api/values/entries/GoHere', par);" into the factory. the success part is still on my controller. Ive tried to put it in a method like this. "mySharedService.callPost(par()).success(method());" still in the controller but i can't access the method. Do you know how to?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26397765
type: AnswerComment

http://stackoverflow.com/q/26471497
has answer: http://stackoverflow.com/a/27663371
has title: d3.js word missing from word cloud
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/41581239
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
score: 2
downvote count: 0
type: Question
has body: js and trying to do word cloud base on the sample code from [here]: https://github.com/jasondavies/d3-cloud. What i trying to do is the font size of the words is base on the frequency of the words in array. For example i have [a,a,a,b,b] so the word 'a' will be larger than 'b' but the problem is when the width or height of the word is larger than the &lt;svg> the word will be gone. layout = d3.layout.cloud().size([w, h]) .words(frequency_list) .padding(5) .rotate(function() { return ~~(Math.random() * 2) * 90; }) .font(d3.select("#font").property("value")) .fontSize(function(d) { return (d.freq*wordSize); }) .spiral(d3.select("input[name=spiral]:checked").property("value")) .on("end",draw) .start(); What i think of is get the width and height of the element first then adjust the wordSize accordingly but seems like i cant do that with [d3.layout.cloud.js]:https://github.com/jasondavies/d3-cloud/blob/master/d3.layout.cloud.js Can anyone help me with this?
tagged with: javascript
tagged with: word-cloud

http://stackoverflow.com/a/26885748
has body: The value update isn't triggered because the value is set programmatically, which doesn't trigger the textarea's change event. The onPreviewRefresh event is not triggered because there is no preview element. As a workaround you can add the element and hide it: var ME = {}; ME.MarkdownConverter = Markdown.getSanitizingConverter(); ME.MarkdownCounter = 0; ko.bindingHandlers.markdownText = { init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { $(element).addClass('markdown-text'); }, update: function(element, valueAccessor, allBindings) { var value = valueAccessor(); var valueUnwrapped = ko.unwrap(value); $(element).html(ME.MarkdownConverter.makeHtml(valueUnwrapped)); } }; ko.bindingHandlers.markdownEditor = { init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { ++ME.MarkdownCounter; // Create the elements needed for a new PageDown editor. $(element).append($('&lt;div id="wmd-button-bar-' + ME.MarkdownCounter + '" class="wmd-button-bar"&gt;&lt;/div&gt;')); $(element).append($('&lt;textarea id="wmd-input-' + ME.MarkdownCounter + '" class="wmd-input"&gt;&lt;/textarea&gt;')); // if no preview element is found, onPreviewRefresh is not triggered $(element).append('&lt;div style="display: none" class="wmd-panel wmd-preview" id="wmd-preview-' + ME.MarkdownCounter + '"&gt;&lt;/div&gt;'); var $input = $('#wmd-input-' + ME.MarkdownCounter); // Make sure the textarea is properly binded up so that the view model is updated. var newBindings = { textInput: valueAccessor }; ko.applyBindingAccessorsToNode($input[0], newBindings, viewModel); // Create the editor and apply to the new elements ensuring that we detect all // changes from the wmd-button-bar. var editor = new Markdown.Editor(ME.MarkdownConverter, "-" + ME.MarkdownCounter); editor.hooks.chain("onPreviewRefresh", function () { $input.change(); }); editor.run(); return { controlsDescendantBindings: true }; } }; var vm = { noteText: ko.observable('') }; ko.applyBindings(vm…
score: 1
answers question: http://stackoverflow.com/q/26387803
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26387803
upvote count: 1
type: Answer

http://stackoverflow.com/a/26481121
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26481000
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26481000
has body: success: function (data) { if (data.d == '[]') { alert('No Matches found'); } else { // here you amend the data from service. $("div#divId").html(data.d); } } jQuery HTML is used for the solution, please check.

http://stackoverflow.com/comment/41513137
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26434141
has text: I originally used that, but the interval was destroyed everytime I changed controllers. I may have missed something though. I'm pretty new to angular.

http://stackoverflow.com/q/26489650
tagged with: ajax
tagged with: extjs
has title: ExtJS load another app in panel
has answer: http://stackoverflow.com/a/26571784
type: UnansweredQuestion
tagged with: model-view-controller
has body: I'm trying to create a small ExtJS app (main app) that displays other apps (secondary apps) in a panel. I can load the index file of the apps but the js scripts are not loaded. The secondary apps are already built. Does anyone know how I should properly load the secondary apps? Thank you This is my main app's view: Ext.define('POCs.view.Main', { extend: 'Ext.container.Container', requires: [ 'POCs.controller.MainController', //'POCs.view.MainModel' ], xtype: 'app-main', controller: 'main', viewModel: { type: 'main' }, layout: { type: 'border' }, items: [{ xtype: 'panel', region: 'west', items:[{ xtype: 'button', width:200, fontWeight: "bold", itemId: 'err', margin:20, html: 'POC1', bodyPadding: 10, handler: 'onErrButton' }, { width:200, xtype: 'button', fontWeight: 'bold', itemId: 'per', margin:20, html: 'POC2', bodyPadding: 10, //handler: 'onPerButton' } ], width: 250, split: true, },{ region: 'center', xtype: 'panel', id: 'canvas1', name: 'Canvas1' }, { region: 'north', xtype: 'panel', split:true, items:[{ region:'west', xtype:'image', src:'logo.jpg' }, { region:'center', html: ' Proofs of concept ', margin:"0 0 0 50", }] }] }); And this is the controller: Ext.define('POCs.controller.MainController', { extend: 'Ext.app.ViewController', requires: [ 'Ext.MessageBox' ], alias: 'controller.main', config: { refs: { canvas1: '#canvas1', } }, init: function() { var me=this; me.control({ '#per': { click: this.onPerButton, } }); }, onErrButton: function () { Ext.Msg.confirm('Confirm', 'Are you sure?', 'onConfirm', this); }, onPerButton: function () { Ext.Ajax.request ({ url: 'ap3init/index.html', scripts:true, autoLoad:true, success: function(response) { var htmlText= response.responseText; var cp1 = Ext.getCmp('canvas1').setHtml(htmlText); //setHtml only sets the html but doesn't activate the scripts } }); }, onSecButton: function () { Ext.Msg.confirm('Confirm', 'Are you sure?', 'onConfirm', this); }, onSpcnButton: function () { Ext.Msg.confirm('Confirm', 'Are you sure?',…
linked to: http://stackoverflow.com/q/6025814
type: Question
has comment: http://stackoverflow.com/comment/41618229
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41761707

http://stackoverflow.com/comment/41447847
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26398392
has text: why -ve ?? may i know reasom
type: QuestionComment

http://stackoverflow.com/comment/41423274
type: AnswerComment
has text: You want to check if the `myForm` directive, exists as a parent directive in your `myDirective` directive?
type: Comment
comment on: http://stackoverflow.com/a/26384053
score: 0

http://stackoverflow.com/q/26408469
tagged with: javascript
tagged with: extjs
score: 0
answer count: 1
tagged with: dom-events
has answer: http://stackoverflow.com/a/26409752
accepted answer: http://stackoverflow.com/a/26409752
tagged with: propertychangelistener
has title: How can I fire the property change event immediately after the property is changed?
type: AnsweredQuestion
type: Question
has body: I have this code that you can test here: Ext.application({ name: 'Fiddle', launch: function() { Ext.create('Ext.grid.property.Grid', { id: "PROPERTIES", renderTo: Ext.getBody(), autoHeight: true, width: 300, viewConfig: { forceFit: true, scrollOffset: 2 // the grid will never have scrollbars }, listeners: { propertychange: function(source, recordId, value, oldValue) { alert("new Value=" + value); } }, source: { "title": "My Object", "color": Ext.Date.parse('10/15/2006', 'm/d/Y'), "Available": false, "Version": 0.01, "Description": "A test object" } }); } }); When I change the false value to true in the example the property change event only fires when I click off the true/false box. I would like the event (or another event) to fire immediately after I change the value. How can I do this?

http://stackoverflow.com/q/26470862
accepted answer: http://stackoverflow.com/a/26471446
has title: SignalR startup exposes timing gap in document "ready" handler
score: 0
has body: In this SO post, I described by problems wiring up a SignalR app that allows a POST controller action to call back to the specific client that triggered the POST. The solution I implemented involves fetching the SignalR connection ID in JavaScript once the SignalR stuff is wired up and storing that connection ID in a hidden form field. That hidden form field is then sent to the POST action when the user clicks the submit button on the form. The obvious problem with this scheme is that it takes a couple of seconds for SignalR to set up the connection; if the user clicks the submit button during this time then the POST action gets a null string for the connection ID. Ok, simple solution (I would have thought): Disable the submit button on form load, and re-enable it once the connection is established. (Note that the HTML has to start with the button enabled in case JavaScript is disabled in the user's browser; I must use JS to disable the button only if JS is enabled.) But herein lies my problem: It seems that, at least in IE 11: Referencing the autogenerated SignalR hub script causes about a two second delay between when the browser displays the page (and allows the user to click on buttons) and when the page ready script runs. During that two second window, the user can click the submit button and send a null connection ID to the POST action. My view looks like this. Note that this line: causes the page to display for a couple of seconds before the page "ready" script executes! @model SignalRTest.Models.MyViewModel @using (Html.BeginForm()) { @Html.HiddenFor(m => m.SignalRConnectionId) Go to it! } Please wait... @section scripts { }
type: AnsweredQuestion
tagged with: asp.net-mvc
tagged with: signalr
type: Question
linked to: http://stackoverflow.com/q/26454331
has answer: http://stackoverflow.com/a/26471446
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net

http://stackoverflow.com/q/26471526
has title: ipad safari 8.0.2 link unclickable
type: UnansweredQuestion
upvote count: 1
tagged with: safari
linked to: http://stackoverflow.com/q/19899553
tagged with: popup
score: 1
type: Question
downvote count: 0
tagged with: ios
answer count: 1
has answer: http://stackoverflow.com/a/29129346
tagged with: javascript
has body: Having issue where web links are not 'clickable' anymore on Safari iPad or iPhone since version 8.0. Works fine on all PC browsers and Android phone. Running inspect element in Firebug shows that all the &lt;a /&gt; tags have the target="_blank" attribute. I found this link that said to turn "Block Pop-ups" off, but that didn't work. Has anybody else found a solution for this or do I have to replace all the target="_blank" with javascript?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41644103
type: QuestionComment
comment on: http://stackoverflow.com/q/26485316
has text: @jQueryAngryBird I got it working. I needed the second method you used. I just need to try and get the page to jump/focus on the non valid ckeditor
score: 0
type: Comment

http://stackoverflow.com/q/26384566
tagged with: animation
tagged with: css
score: 2
has body: I'm having a bit of an issue using some css animations in firefox. I am using them to slide in some radio buttons when the user clicks a button. In chrome everything seems to be fine but in firefox they kind of look like they are firing the animation twice (the second one slightly over the first one). I've tried a few things and can't seem to solve this problem. Here's what I'm doing : $(document).on("click", ".addLesson", function(){ $(".contentList").addClass("fadeOutRight"); $(".contentList").hide(); $(".lessonOptions").addClass("fadeInLeft"); }); $(document).on("click", ".lessonCancel", function(){ $(".contentList").removeClass("fadeOutRight"); $(".contentList").addClass("fadeInLeft"); $(".contentList").show(); $(".lessonOptions").removeClass("fadeInLeft"); $(".lessonOptions input[type='radio']").removeAttr("checked"); }); And I'm just using animate.css styles for the animations themselves - .fadeInLeft -webkit-animation: fadeInLeft 1s forwards animation: fadeInLeft 1s forwards @-webkit-keyframes fadeInLeft 0% opacity: 0 -webkit-transform: translate3d(-100%, 0, 0) transform: translate3d(-100%, 0, 0) 100% opacity: 1 -webkit-transform: none transform: none @keyframes fadeInLeft 0% opacity: 0 -webkit-transform: translate3d(-100%, 0, 0) transform: translate3d(-100%, 0, 0) 100% opacity: 1 -webkit-transform: none transform: none .fadeOutRight -webkit-animation: fadeOutRight 1s animation: fadeOutRight 1s @-webkit-keyframes fadeOutRight 0% opacity: 1 100% opacity: 0 -webkit-transform: translate3d(2000px, 0, 0) transform: translate3d(2000px, 0, 0) @keyframes fadeOutRight 0% opacity: 1 100% opacity: 0 -webkit-transform: translate3d(2000px, 0, 0) transform: translate3d(2000px, 0, 0) I think maybe I'm making the javascript and css fight against each other, but I'm not to sure because it works fine in chrome. I also noticed when I mouse over the lessOptions div I'm sliding in (after it's entered the stage) it flickers or blinks. I would appreciate any help on this, thanks fo…
has answer: http://stackoverflow.com/a/61483620
type: Question
has answer: http://stackoverflow.com/a/68953888
answer count: 2
has comment: http://stackoverflow.com/comment/41423687
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Css animations firing twice and "blinking" in firefox
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41423820
favorite count: 0
has comment: http://stackoverflow.com/comment/41423348
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/26462832
possible better answer: http://stackoverflow.com/a/26462953
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26463317
has comment: http://stackoverflow.com/comment/41564377
linked to: http://stackoverflow.com/q/13789618
has body: I'm getting a Javascript object in the following format { "Alerts": [{ "Name": "...", "Type": "Warning", "Message": "...", "Time": "..." }, { "Name": "...", "Type": "Critical", "Message": "...", "Time": "..." }, { "Name": "...", "Type": "Info", "Message": "...", "Time": "..." }] } How do I check if an alert of the type Critical exists anywhere in this array object I receive. I am using angularjs.
has answer: http://stackoverflow.com/a/26462864
favorite count: 0
has comment: http://stackoverflow.com/comment/41564467
tagged with: angularjs
answer count: 4
has answer: http://stackoverflow.com/a/26462978
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26462953
has comment: http://stackoverflow.com/comment/41564430
type: Question
has title: Check existence of an element in a nested javascript object array
has answer: http://stackoverflow.com/a/26463317

http://stackoverflow.com/comment/41552218
comment on: http://stackoverflow.com/a/26446394
has text: I already do. `\s` is a space, `\s*` is 1 or none space, and the trim on the end removes the space from a case of not having []. If there will be spaces inside the string, remove them after with `.replace`.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26451369
downvote count: 2
score: -2
accepted answer: http://stackoverflow.com/a/26451796
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I need to call a JSON function from C# to check the order status. In the web page the function is called in this way: Can someone please give me an example of how I can make a call to: $.getJSON(urltothewebsite + "QueryStockStatus?callback=?", { sku: sku, categoryid: "" }, function (data) I will then parse the result in the variable data in my code. I would also like to know which library for the JSON part I have to include.
type: Question
tagged with: c#
upvote count: 0
has comment: http://stackoverflow.com/comment/41544248
has title: Parsing JSON function in C#
tagged with: javascript
has answer: http://stackoverflow.com/a/26451796
answer count: 1
favorite count: 0

http://stackoverflow.com/q/26429711
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/18211984
score: 0
has comment: http://stackoverflow.com/comment/41504899
has comment: http://stackoverflow.com/comment/41611373
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41612813
has body: I'm working on a jquery mobile hybrid app. as I have a fixed skeleton of the app, all I do is loading the content of each page on the &lt;div data-role="content"&gt; of the index file preserving the header / footer / sidebar etc... $("#pageContent").load ("pages/login-view.html", function () { $(this).enhanceWithin(); }); Everything's working just fine. But what's blocking me right now, is managing the back action when clicking on a left arrow in the header. Since I'm not reloading the whole page and I'm loading only the content on pages inside my main page, I have no Idea how to create or use the Backstack of loaded pages contents. Do you hve any idea about how to do this ? Thank you.
tagged with: hybrid-mobile-app
has comment: http://stackoverflow.com/comment/41504517
has comment: http://stackoverflow.com/comment/41504843
type: Question
tagged with: mobile
has title: Managing back button jquery mobile after loading content

http://stackoverflow.com/q/26428838
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26432496
tagged with: php
has body: I am making a switch cars and their respective models. The data is brought from a database with php. may make more dynamic of like this? (shorter code). Sorry for my bad english. Selector Marca <?php /* marcas */ $Alfa_Romeo=39; $Chevrolet=33; $Chrysler=40; $Citroën=42; $Dodge=41; $Fiat=35; /* ... */ $Registros=array(); $Registros=TraerMarcas(); if (!empty($Registros)) { $cntRegistros=count($Registros); } ?> <?php for ($i=0; $i < $cntRegistros ; $i++) { ?> <option value="<?php echo $Registros[$i]['marca'] ?>"><?php echo $Registros[$i]['marca'] ?> <?php } ?> Modelo Cilindrada JS $( document ).ready(function() { $(function() { var sel, i, list = [ <?php for ($i=0; $i < $cntRegistros ; $i++) { echo "'".$Registros[$i]['marca']."',"; } ?> ], Fiat = [ <?php $Modelo=array(); $marca=$Fiat; $Modelo=TraerModelo($marca); if (!empty($Modelo)) { $cntModelo=count($Modelo); } for ($i=0; $i < $cntModelo ; $i++) { echo "'".$Modelo[$i]['modelo']."',"; } ?> ], Chevrolet = [ <?php $Modelo=array(); $marca=$Chevrolet; $Modelo=TraerModelo($marca); if (!empty($Modelo)) { $cntModelo=count($Modelo); } for ($i=0; $i < $cntModelo ; $i++) { echo "'".$Modelo[$i]['modelo']."',"; } ?> ], Ford = [ <?php $Modelo=array(); $marca=$Ford; $Modelo=TraerModelo($marca); if (!empty($Modelo)) { $cntModelo=count($Modelo); } for ($i=0; $i < $cntModelo ; $i++) { echo "'".$Modelo[$i]['modelo']."',"; } ?> ], Cilindrada = [ '1.2','1.3','1.6','2.0','2.5', ], dev_default = ' Modelo ', os_default = ' Cilindrada '; sel_marca = $('#brand'); sel_cilin = $('#version'); $('select').change(function() { switch (this.id) { case 'main_list': $('.secondary').hide(); sel_marca.find('option').remove(); sel_marca.append(dev_default); sel_marca.show(); $('#brand').removeAttr('disabled'); if (this.value == 'Fiat') { for (i = 0; i < Fiat.length; i++) { $("#brand").append( ' ' + Fiat[i] + ' ' ); } } else if (this.value == 'Chevrolet') { for (i = 0; i < Chevrolet.length; i++) { $("#brand").append( ' ' + Chevrolet[i] + ' ' ); } } else …
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26432496
possible better answer: http://stackoverflow.com/a/26428959
has title: How I can shorten this process with javascript and php
has answer: http://stackoverflow.com/a/26428959
type: Question
score: 0
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/26396073
tagged with: safari
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26396807
tagged with: dom
type: Question
has body: I'm seeing some odd behavior in Safari 7.1 (9537.85.10.17.1) on Mac OS X 10.9.5. When creating new DOM, the form tag always wrap any content after it. var html = ' bam '; var doc = (new DOMParser).parseFromString(html, 'text/html'); #document bam Can anyone confirm? Which tree do I bark on to get the oddity resolved? As a work around: var html = ' bam '; var doc = (new DOMParser).parseFromString(html, 'text/html'); #document bam
tagged with: javascript
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: macos
favorite count: 0
type: UnansweredQuestion
has title: form tag wraps all content after it

http://stackoverflow.com/q/26454540
has body: Question Background: I have a navbar that 'smoothly scrolls' to a corresponding div based on the selected items id. The Issue: In Chrome and FireFox there are no issues, when I try and select an option from the navbar in IE (version 11) the following JavaScript error is showing: 0x800a138f - JavaScript runtime error: Unable to get property 'top' of undefined or null reference The code: This is the JS code for the Smooth Scroll: EDIT - ADDED HTML MARKUP: Navbar: Toggle navigation Menu Projects Welcome Workplace, Education, Development About Me Location Div ID: /*CODE*/ I do not understand how the 'top' property can be null or empty when this code works fine on Chrome? ****EDIT 2 - Added new JavaScript code:**** After some more invesigation the error is being causied because of this line: var sectionID = $(this).attr("href"); This is returning an 'undefined' property for 'sectionID'. I have modified my code to implement 'data-id' attributes on the dropdown list: Projects Welcome Workplace, Education, Development About Me Location The JavaScript smooth scroll now looks like this: $(document).ready(function () { $('#nav .navbar-nav li>a').on('click', function (event) { event.preventDefault(); var sectionID = $(this).data('data-id'); console.log('ID:'+sectionID); scrollToID('#' + sectionID, 750); }); function scrollToID(id, speed) { //alert('SectionID is: ' + id); var offSet = 70; var obj = $(id).offset(); var targetOffset = $(id).offset().top - offSet; $('html,body').animate({ scrollTop: targetOffset }, speed); } }); If I hardcode a div ID for example '#myCarosuel' then this works perfectly i.e: scrollToID('#myCarosuel, 750);
linked to: http://stackoverflow.com/q/1593174
score: 1
has answer: http://stackoverflow.com/a/26455020
has comment: http://stackoverflow.com/comment/41550027
type: Question
has comment: http://stackoverflow.com/comment/41550830
has comment: http://stackoverflow.com/comment/41555945
has comment: http://stackoverflow.com/comment/41549978
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
has comment: http://stackoverflow.com/comment/41551068
has answer: http://stackoverflow.com/a/26488530
favorite count: 0
has title: JavaScript runtime error in IE: Unable to get property 'top'
has answer: http://stackoverflow.com/a/26469379
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/a/26501204
downvote count: 0
has body: This line: angular.module('Umfrage', 'Auswertung'[]) is creating a module, named 'Umfrage'. The second parameter should be an array, holding string items that match names of module which you would like to declare as a dependency of the module you're creating. Thus, this would be correct, assuming that there is a module named 'Auswertung' angular.module('Umfrage', ['Auswertung']) See module API
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26501168
type: Answer
answers question: http://stackoverflow.com/q/26501168
score: 2

ms-project
type: Tag
tag name: ms-project
tags question: http://stackoverflow.com/q/26376887

http://stackoverflow.com/comment/41655044
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26512449
has text: Too many questions… What is your problem at hand that you're trying to solve?

http://stackoverflow.com/comment/49875581
type: QuestionComment
has text: possible duplicate of [How can I replace one class with another on all elements, using just the DOM?](http://stackoverflow.com/questions/16510973/how-can-i-replace-one-class-with-another-on-all-elements-using-just-the-dom)
comment on: http://stackoverflow.com/q/26479289
score: 0
type: Comment

http://stackoverflow.com/comment/41443917
comment on: http://stackoverflow.com/a/26395617
score: 0
type: Comment
has text: Also, I removed the other script and it worked. But can you give me an example that changes the entire background of the page (instead of just the div)?
type: AnswerComment

http://stackoverflow.com/a/26384265
score: 3
has body: You should be able to assign your instance to a variable and then access the destroy method through your reference. var mySplitter = $('#foo').split({ orientation: 'horizontal', limit: 10, position: '50%' // if there is no percentage it interpret it as pixels }); // then you can do mySplitter.destroy();
downvote count: 0
answers question: http://stackoverflow.com/q/26384170
type: Answer
upvote count: 3

http://stackoverflow.com/q/26376109
tagged with: angularjs
type: UnansweredQuestion
score: 3
answer count: 0
upvote count: 3
has body: I am working on an app that uses an API from a different domain that I have no control over it's header. The API allows to post to it's api by passing it a username and a key in the url. The method needs to be post and the code would like something like this. $http({ url : url, method : "POST", headers : { 'Content-Type' : 'application/json' }, data : { name: "joe", number: 1234567890 } }).success(function(data) { //do something }); the data being posted is being pass as an object like above. I'm new to CORS but I have a conceptual idea. Again I have to access to the API. The instructions say that I need to send a post request and pass in a header of the content type 'Content-Type' : 'application/json' Any help is welcomed, I have looked at post that change angular's settings in the config method $httpProvider.defaults.withCredentials = true; $httpProvider.defaults.useXDomain = true; delete $httpProvider.defaults.headers.common['X-Requested-With']; But it doesn't do anything. I believe this was a fix to an older version of Angular. Other solutions require access to the server which I don't have. The header response looks something like this Allow GET,PUT,POST,PATCH,HEAD,OPTIONS Content-Encoding gzip Content-Type text/html; charset=utf-8 Date Wed, 15 Oct 2014 06:42:43 GMT P3P policyref="https://www.somedomaincom/w3c/p3p.xml", CP="NON DSP COR CURa ADMa DEVa PSAa PSDa IVAa IVDa CONa TELa OUR STP PHY ONL COM NAV INT DEM CNT PRE" Server nginx/1.1.19 Transfer-Encoding chunked Vary Host, Cookie
linked to: http://stackoverflow.com/q/18733104
type: Question
linked to: http://stackoverflow.com/q/23823010
tagged with: javascript
has title: AngularJS Cross-Domain POST request blocked by CORS
has comment: http://stackoverflow.com/comment/41408084
tagged with: cors
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/41451933
comment on: http://stackoverflow.com/q/26400935
has text: Yeah you're right. didn't notice that
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41496614
has text: How you managing file's load (order of load in application.js)?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26424300

http://stackoverflow.com/q/26385797
answer count: 1
tagged with: permutation
has comment: http://stackoverflow.com/comment/41425638
has answer: http://stackoverflow.com/a/26386021
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41425690
accepted answer: http://stackoverflow.com/a/26386021
tagged with: alphabetical
type: Question
has body: I am trying to create a function that will generate an array of all possible letter combinations that fit a pattern of vowels and consonants. For example given the string "VCV" where V = vowel and C = consonant I want to get a list of all possible letter combinations that conform to that pattern. ['ABA', 'ABE', 'ABI', 'ABO', 'ABU', 'ACA', 'ACE', ....] Any ideas?
tagged with: javascript
has title: Javascript function to generate list of all possible words that conform to vowel and consonant pattern
has comment: http://stackoverflow.com/comment/41425652
score: 0

http://stackoverflow.com/q/26361705
tagged with: backbone.js
linked to: http://stackoverflow.com/q/19621074
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11969062
tagged with: memory-leaks
has answer: http://stackoverflow.com/a/26762349
type: Question
tagged with: google-chrome-devtools
tagged with: javascript
has body: Trying to get a handle on memory management with Backbone by using the heap snapshot tool in Chrome. There's a back button on a view which when clicked will switch the current view with a new one via a backbone router. I take a snapshot on the initial page, navigate to the page with the back button, click the back button and take another snapshot. I'd expect heap snapshot to be identical using the comparison option. However old models/collections seemingly aren't being cleared (they are highlighted in white in the snapshot i.e. still accessible via the root of the graph). Also it looks like the views themselves aren't being removed either(same white highlight in the snapshot). I've linked a diagram to aid the explanation (https://i.sstatic.net/mlN2I.jpg). Say view V1 nests three views of which V2 contains a model M1, V3 holds model M2 and V4 holds a backbone collection C1. M1 listens to a change to M2 and updates itself accordingly. In order to properly remove view V1 the following are done: Call Backbone.View.Remove on V1 and all its child views (and the child views of those children if they exist) Call Backbone.Events.StopListening on all models (and the child models of those models if they exist) Is this enough to completely clear the view? It seems like most resources online discuss proper disposal of backbone views but not its models/collections. Any help would be much appreciated. Thanks.
has title: Clearing backbone model/collection memory leaks
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26366592

http://stackoverflow.com/comment/41561817
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26455575
type: AnswerComment
has text: What I need is a callback to run after every ajax call completion not for a specific/single request.

http://stackoverflow.com/a/26484707
downvote count: 0
upvote count: 2
has body: The best way to do this is to do it all while you are working on it. Heres a way you could potentially do it: var colors = new Array(); var tempColors = {}; $(".colors").each(function(){ var c = $(this).val(); // check if the color exists without looping if(typeof tempColors[c] == "undefined"){ // if it doesn't, add it to both variables. tempColors[c] = true; colors.push(c); } }); This will result in two variables: one is an object that you don't have to loop through to find out if you defined it before, one is a colors array that you push to using standard javascript. You shouldn't make it a dedicated function if you are not reusing it, but you could make it an object like this: var colors = function(){ var self = this; self.array = new Array(); // this is a dedicated check function so we don't need separate variables. // returns true if the color exists, false otherwise self.check = function(color){ for(var i =0; i &lt; self.array.length; i++){ if(self.array[i] === color) return true; } return false; } self.add = function(color){ // use the check function, if it returns false, the color does not exist yet. if(!self.check(color)){ self.array.push(c); } } } You can then instantiate a colorlist using var colorlist = new colors(); and add colors using colorlist.add("dd0300"). Accessing the array can be done by requesting colorlist.array.
type: Answer
answers question: http://stackoverflow.com/q/26484554
score: 2

http://stackoverflow.com/q/26479420
has answer: http://stackoverflow.com/a/26479664
type: Question
accepted answer: http://stackoverflow.com/a/26479664
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
tagged with: textbox
has comment: http://stackoverflow.com/comment/41596190
possible better answer: http://stackoverflow.com/a/26479627
has answer: http://stackoverflow.com/a/26479501
has answer: http://stackoverflow.com/a/26479627
has comment: http://stackoverflow.com/comment/41597396
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26479569
answer count: 7
tagged with: css
favorite count: 0
has body: My goal is to clear an input type text box when they are focused ONLY IF the input is INVALID. Let's say i have a text box that has a maximum value of 200 &lt;input id="textbox" type = "text" max="200" runat="server"&gt; so let's say I input 150 so it's valid hence if I focus again on it, it will remain its value 150 but, if i input greater than 200, my text box will have have a red border color on it and focused on another textbox(its working on my current code) and if i will focus on it again, i want to clear its value. I wanna do something like this. input:invalid { box-shadow: 0 0 1px 3px #e74c3c; } input:focus:invalid { textbox.value = "" (i know this will not work, but i wanna do something like this but how?) } Note that I have multiple textboxes with different max and min values, not just one.
has comment: http://stackoverflow.com/comment/41595571
has title: Clear input box when input:invalid in html using javascript
upvote count: 1
has answer: http://stackoverflow.com/a/26479638
has answer: http://stackoverflow.com/a/26480200
has answer: http://stackoverflow.com/a/26479555
type: AnsweredQuestion

http://stackoverflow.com/q/26430644
score: 1
accepted answer: http://stackoverflow.com/a/26438923
upvote count: 1
type: Question
tagged with: ecmascript-6
has title: For-of loop in node --harmony doesn't work with arrays
tagged with: javascript
tagged with: ecmascript-harmony
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26438923
favorite count: 0
has body: When I start node v0.11.14 REPL with --harmony option and try for-of loop, I get: &gt; for (var i of [3, 4, 5]) console.log(i); TypeError: undefined is not a function The same for sets. But it works fine with generators: &gt; function* Counter() { var n=3; while (n &lt; 7) { yield n++; } } &gt; var c = new Counter(); &gt; for (var i of c) console.log(i); 3 4 5 6 Though the first example from ecmascript wiki page is: for (word of ["one", "two", "three"]) { alert(word); } MDN page and Traceur docs contain the same example. I've failed to google "for-of in nodejs". Should it actually work in Node or am I missing something?
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/41644058
type: QuestionComment
comment on: http://stackoverflow.com/q/26506735
has text: could you share your html and external javascript file?
score: 0
type: Comment

http://stackoverflow.com/q/26412056
type: UnansweredQuestion
has body: I have a loop that lists files in a directory. It's working fine going down the first level. Folder/1.jpg Folder/2.jpg etc. But if I have a folder inside the main folder... Folder/nestedFolder/ The console.log spits out nestedFolder/1.jpg but I want it to log Folder/nestedFolder/1.jpg Here's my method function traverseFileTree(item,path){ path = path || ""; if (item.isFile){ console.log(path + item.name); } else if (item.isDirectory){ var directoryPath = item.name var dirReader = item.createReader(); dirReader.readEntries(function(entries){ for (var i=0; i &lt; entries.length; i++){ traverseFileTree(entries[i], directoryPath + "/") } }); } } and this is where directories are being passed in function handleDrop(e) { var items = e.dataTransfer.items; var length = items.length; for (var i = 0; i &lt; length; i++) { var item = items[i].webkitGetAsEntry(); if(item){ traverseFileTree(item); } } };
score: 1
has title: FileSystem API - Recursively listing files from directory drag and drop
has comment: http://stackoverflow.com/comment/41472098
type: Question
has answer: http://stackoverflow.com/a/26412457
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41472070
has comment: http://stackoverflow.com/comment/41472360
upvote count: 1
tagged with: html5-filesystem
favorite count: 0

http://stackoverflow.com/a/37667340
type: Answer
has body: I recommend using this Node Package: https://www.npmjs.com/package/angular-google-analytics Step 1: Run bower install angular-google-analytics Step 2: Add this script tag: &lt;script src="/bower_components/angular-google-analytics/dist/angular-google-analytics.js"&gt;&lt;/script&gt; Step 3: Add angular-google-analytics to your app.main e.g. app.run(function(Analytics) {}); Step 4: Add this to your config: AnalyticsProvider .setAccount('Your tracking code here') .logAllCalls(true) .trackPages(true) .trackUrlParams(true);
answers question: http://stackoverflow.com/q/26356279
score: 0

http://stackoverflow.com/a/26411707
has comment: http://stackoverflow.com/comment/41472781
has comment: http://stackoverflow.com/comment/41471440
has comment: http://stackoverflow.com/comment/41471428
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26411508
has comment: http://stackoverflow.com/comment/41471881
has comment: http://stackoverflow.com/comment/41472333
answers question: http://stackoverflow.com/q/26411508
has body: getDistanceMatrix is asynchronous, so dauer1 is defined before dauer gets updated. By looking at the docs, you need a callback: dauer.getDistanceMatrix( { origins: ["48.142362,11.549859"], destinations: ["48.2,11.4"], travelMode: google.maps.TravelMode.WALKING, unitSystem: google.maps.UnitSystem.METRIC }, setDauer1); function setDauer1(response, status) { dauer1 = response.rows[0].elements[0].duration.text; // your code continues here }
type: Answer
has comment: http://stackoverflow.com/comment/41471723
has comment: http://stackoverflow.com/comment/41473063
has comment: http://stackoverflow.com/comment/41471643
has comment: http://stackoverflow.com/comment/41471973
has comment: http://stackoverflow.com/comment/41472894
has comment: http://stackoverflow.com/comment/41472958
has comment: http://stackoverflow.com/comment/41473490
has comment: http://stackoverflow.com/comment/41472406
score: 0

http://stackoverflow.com/q/26476242
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
has title: FIXED jQuery Validate + php check user exits
has body: I am trying to add to a form, which is validated with jQuery validate, and a PHP script where I check if the user (usuario) exits. Each user has a different folder. To check if the user exits, I check if the folder exists then if exists, tell there is an error and I don't want to stop the form from being submitted. If not, I create the sub-folder with the username and create the folder. Currently, I use the AJAX solution, but the PHP is not executed, and it won't print any echo on it. I have been reading more about AJAX and about the remote attribute in jQuery validate but neither way I can get my functionality to work out. With Ajax (or what I have understood as ajax) submitHandler: function(form) { var username = $(this).val(); $.post('check_user.php', {'usuario':username}, function(data) { $("#user-result").html(data); form.submit(); }); } With remote "usuario":{ required: true, rangelength: [3, 10], remote: { url: "check-user.php", type: "get", data:{ usuarios: function(){ return $('#usuario').val(); } } } } My PHP <?php $user = $_REQUEST['usuario']; $dir = "usuarios/$user"; if (!file_exists($dir)) { echo 'true'; } else { if(!mkdir($dir, 0777, true)) { echo 'Fallo al crear las carpetas...' } $doc = new_xmldoc('1.0'); $root = $doc->add_root('historial'); $fp = @fopen('historial.xml','w'); if(!$fp) { echo 'Fallo al crear historial.xml' } fwrite($fp,$doc->dumpmem()); fclose($fp); echo 'true'; } ?> Piece of my form (HTML) Usuario: UPDATE: Closing correctly the brackets i continue having problems.The rules goes fine but after filling correctly my form, when i press submit button it makes nothing. If something in my form is wrong it will display the error corrrectly. My script will have the following structure: Thanks for everything and if you need more things of my code, simply ask. FIXED Finally i hve been able to fix this problem. I found the solution in here: YouTube The solution was to use both, ajax and remote rule. With remote rule i check if the user exists an…
upvote count: 1
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/41589800
type: UnansweredQuestion
tagged with: forms
has answer: http://stackoverflow.com/a/26476498

http://stackoverflow.com/q/26372405
tagged with: javascript
has comment: http://stackoverflow.com/comment/41401827
has answer: http://stackoverflow.com/a/26374503
score: 0
answer count: 1
has body: I've got a reasonably small file (~50kB), that I'd like to manipulate in a chrome app at the byte level. chrome.storage.local was my previous approach. This has a quota of ~5MB, which is plenty for this application, but the documentation made it seem like this should really be more for managing user settings, etc. chrome.filesystem seems to be more for allowing the user to select a file. I'm reading through it now, but wanted to see if there's any guidance before I sink too much into one approach. I would prefer to not have to store the file in a google drive account (this would be a dropbox or s3 link most likely).
has title: How to read in chunks of a file via chrome app?
has comment: http://stackoverflow.com/comment/41404426
has comment: http://stackoverflow.com/comment/41401551
tagged with: google-chrome-app
accepted answer: http://stackoverflow.com/a/26374503
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41403184
type: Question

http://stackoverflow.com/comment/107825691
type: AnswerComment
has text: @Dmitry newDate.setDate( date.getDate() - 31 ); console.log(newDate); return newDate;
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26488640

http://stackoverflow.com/a/64790963
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26477206
type: Answer
has body: The next line should be enough let ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress || req.socket.remoteAddress; If you are testing locally you will see the private IP, but if you test on the cloud the IP that you will receive is the public. You can test it locally using ngrok

http://stackoverflow.com/q/26431109
has answer: http://stackoverflow.com/a/26431211
tagged with: blocking
score: -4
upvote count: 1
has title: How to Disable browser stop button near to back button in Chrome and Firefox
type: AnsweredQuestion
tagged with: reload
accepted answer: http://stackoverflow.com/a/26431211
type: Question
tagged with: browser
has comment: http://stackoverflow.com/comment/41510313
has body: I would like to prevent the user pressing the stop button in their browser while a certain page is loading. How can I do this in jquery or javascript?
tagged with: javascript
tagged with: jquery
downvote count: 5
has comment: http://stackoverflow.com/comment/41507024
answer count: 1
favorite count: 0

mpd
tag name: mpd
type: Tag
tags question: http://stackoverflow.com/q/26478673

http://stackoverflow.com/q/26441206
possible better answer: http://stackoverflow.com/a/26441407
has title: Javascript: In closures, can private members (var`s) be added after instantiation?
tagged with: closures
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26441416
has comment: http://stackoverflow.com/comment/41525808
tagged with: javascript
has comment: http://stackoverflow.com/comment/41526119
score: 0
has answer: http://stackoverflow.com/a/26441407
has answer: http://stackoverflow.com/a/26441416
has comment: http://stackoverflow.com/comment/41525659
has body: Can "private" members (vars) be added to a closure after instantiation? I think I understand this much in my Closure below (please correct me if I'm wrong!): this.x is available "publicly" var y is unavailable publicly, but can be accessed through this.y() After new Closure(), I can add a new "public" like this: var c=new Closure(); c['z']=25; console.log(c.z); // z is a dynamically added public member So...Is there a way to dynamically add a private member (var) and its get/set function after "new-ing" the Closure? var Closure=( function(){ function Closure(x){ // "public" member this.x=x; }; // "private" member backing variable var _y=0; // get/set private member Closure.prototype.y=function(newValue){ if(newValue){ _y=newValue; return(this); }else{ return(_y); } }; // return return(Closure); } )(); var c=new Closure(10,15); // Can I add var _z and it's get/set function at this point?
type: AnsweredQuestion

http://stackoverflow.com/a/78351186
type: Answer
has body: I have written a chrome extension in manifest v3, here is my experimental code snippet, and it can detect the popup window properly. // popup.js const isElementVisible = (ele, partiallyVisible = false) => { const { top, left, bottom, right } = ele.getBoundingClientRect(); const { innerHeight, innerWidth } = window; return partiallyVisible ? ((top > 0 && top < innerHeight) || (bottom > 0 && bottom < innerHeight)) && ((left > 0 && left < innerWidth) || (right > 0 && right < innerWidth)) : top >= 0 && left >= 0 && bottom <= innerHeight && right <= innerWidth; }; let opened = false; setInterval(function () { let ele = document.getElementById("app"); if (isElementVisible(ele) && !opened) { chrome.runtime.sendMessage({ type: "popup_window_opened" }); opened = true; } }, 1000); // service_worker.js chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) { if (message.type == "popup_window_opened") { console.log("popup window opened"); } }); when I watch the service worker's console output, I found that every time when the popup window open, the interval timer in popup window would work and send a message to service worker, otherwise, the interval timer in popup window would stop and service worker can't receive any message.
score: 0
answers question: http://stackoverflow.com/q/26370891

http://stackoverflow.com/comment/41596792
score: 0
type: Comment
type: AnswerComment
has text: @AndrewAlexander Check if path is correct. See in console for any image not found error if that's case. Is image on `images/nohoverfb.png` location?
comment on: http://stackoverflow.com/a/26479851

http://stackoverflow.com/comment/41556883
score: 0
type: Comment
type: QuestionComment
has text: @charlietfl Thanks for your help. Now the answer is on stackoverflow.
comment on: http://stackoverflow.com/q/26458370

http://stackoverflow.com/q/26355017
has body: I am trying to create hierarchy for tree layout of d3.js but i have row data means only links and some of the links are really recursing with each other like some times in link two different source have same target so by basic d3.js tree function it will get issue with that situations. I there any other option for it ? For Ex. I have data like this { source: "main1", target: "level 3"} { source: "main2", target: "level 3"} { source: "level 3", target: "level 4"} so this will be like this scenario 0 0 \ / 0 | 0 and also these are not under one root parent also means two different parents in tree !!! Any helpful links will be appreciate thanks in advance
downvote count: 0
tagged with: d3.js
tagged with: hierarchy
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27426913
has answer: http://stackoverflow.com/a/27753339
score: 1
type: Question
answer count: 2
upvote count: 1
tagged with: arrays
tagged with: javascript
favorite count: 0
tagged with: data-visualization
has title: Create hierarchy from row data

http://stackoverflow.com/comment/41373005
comment on: http://stackoverflow.com/q/26357138
score: 0
has text: did you want to allow zero special characters? Show your efforts..
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26508724
tagged with: ios
tagged with: javascript
answer count: 1
tagged with: cordova
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31817580
has body: I am working on a Phonegap app for a while now, i am using this plugin to download files from the server to the Documents/ forder on the device: https://github.com/torrmal/cordova-simplefilemanagement i tested the plugin and it works. it downloads the file and it also reads the file. // READ A FILE c.read_file('data/','content.json',Log('file contents: '),Log('something went wrong')); painlessfs.js does something: this.read_file = function(dir, filename, success, fail){ // console.log(dir); fail = (typeof fail == 'undefined')? Log('FileManager','read file fail'): fail; this.load_file( dir, filename, function(fileEntry){ fileEntry.file( function(file){ var reader = new FileReader(); reader.onloadend = function(evt) { success(evt.target.result); }; reader.readAsText(file); }, fail ); }, fail ); }; I get this log back: Oct 22 15:12:00 Iphone-van-patrick A12 VEG[10479] &lt;Warning&gt;: file contents: : Oct 22 15:12:00 Iphone-van-patrick A12 VEG[10479] &lt;Warning&gt;: {"data":[{"Id":"1","C_Code":"Frontpage_Title","C_output":"A12-VEG"},{"Id":"2","C_Code":"Frontpage_Welkom","C_output":"Welkom A12-VEG"},{"Id":"3","C_Code":"Frontpage_intro","C_output":"hiiii"}]} it works well as jou can see... but what i want is i need to bind the "file contents" to for example "FileContent" what i have tried is this: // READ A FILE c.read_file('data/','content.json',FileContent(evt.target.result),Log('something went wrong')); Function FileContent (Content){ console.log(Content); } i want to return the content of the file. can somebody look at it and help me with this? EDIT: so i found out that: "evt.target.result" holds the content of the file and returns it to "success". but how do i get this data out of "success"??
type: Question
has title: how do i get the content of a returning value?

http://stackoverflow.com/comment/41569503
type: QuestionComment
comment on: http://stackoverflow.com/q/26465712
has text: It performs the request? Nothing is returned? `on()` is preferred over `bind()` in later versions of jQuery.
score: 0
type: Comment

http://stackoverflow.com/q/26356881
has answer: http://stackoverflow.com/a/26357042
accepted answer: http://stackoverflow.com/a/26357042
has body: I have use this click function for some event to call but when i am clicking the class it is sometime firing twice,thrice and much more . Please give me proper suggestion for this code and how to correct it. $(".PositiveReaction").unbind("click").click(function () { var itemGraphId = this.id; itemGraphId = itemGraphId.replace("Like", ""); $.ajax({ type: "Post", url: "/React/AddReact", dataType: "JSON", data: { "itemGraphId": itemGraphId, "reactionTypeEnum": "POSITIVE" }, success: function (data) { $.each(data, function (i, item) { $("#CountLike" + item.GraphID).html(item.CountPositiveReactions); $("#CountDisLike" + item.GraphID).html(item.CountNegativeReactions); }); }, error: function (req, status, error) {} }); });
type: Question
has comment: http://stackoverflow.com/comment/41372612
answer count: 2
upvote count: 1
tagged with: asp.net-ajax
has comment: http://stackoverflow.com/comment/41373152
tagged with: javascript
tagged with: jquery
has title: Click Function sometime firing twice,thrice and much more
possible better answer: http://stackoverflow.com/a/26357074
favorite count: 0
has comment: http://stackoverflow.com/comment/41372967
has comment: http://stackoverflow.com/comment/41373006
has answer: http://stackoverflow.com/a/26357074
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/q/26455517
tagged with: web-component
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26455727
score: 1
has title: Polymer defining properties in element
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/26455666
has answer: http://stackoverflow.com/a/26455666
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26455727
tagged with: object
tagged with: polymer
has body: While going through Polymer docs, I found two ways of defining properties in custom elements, namely: Polymer('my-element', { myProp: 'someValue' }); and Polymer('my-element', { ready: function () { this.myProp = 'someValue'; } }); I understand that the first one passes the object as the prototype to my custom element, so the attribute exists before the element is created, while the other one waits for the element to be initialized before declaring the property. I am wondering what are the differences between those two (if any), and when one would use over the other? Also are there any other ways of initializing properties/functions?
tagged with: javascript
tagged with: prototype

http://stackoverflow.com/a/58839473
has body: The correct answer to this would be to run npm rebuild. This will rebuild all the bindings relevant to the current project, especially after updates.
has comment: http://stackoverflow.com/comment/120164402
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26376160
score: 1
upvote count: 1

http://stackoverflow.com/q/26386520
favorite count: 0
upvote count: 7
type: AnsweredQuestion
tagged with: amazon-s3
accepted answer: http://stackoverflow.com/a/26394523
score: 7
tagged with: file
type: Question
has title: Sending file direct from browser to S3 but changing file name
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: amazon-web-services
has answer: http://stackoverflow.com/a/26394523
tagged with: file-upload
has body: I am using signed authorized S3 uploads so that users can upload files directly from their browser to S3 bypassing my server. This presently works, but the file name is the same as on the user's machine. I'd like to save it on S3 as a different name. The formdata I post to amazon looks like this: var formData = new FormData(); formData.append('key', targetPath); // e.g. /path/inside/bucket/myFile.mov formData.append('AWSAccessKeyId', s3Auth.AWSAccessKeyId); // aws public key formData.append('acl', s3Auth.acl); // e.g. 'public-read' formData.append('policy', s3Auth.policy); // s3 policy including ['starts-with', '$key', '/path/inside/bucket/'] formData.append('signature', s3Auth.signature); // base64 sha1 hash of private key and base64 policy JSON formData.append('success_action_status ', 200); // response code 200 on success formData.append('file', file.slice()); // e.g. /path/on/user/computer/theirFile.mov However instead of the file ending up at: https://s3.amazonaws.com/mybucket/path/inside/bucket/myFile.mov It ends up as: https://s3.amazonaws.com/mybucket/path/inside/bucket/theirFile.mov Note it has their filename but my base path. I would like it to have the filename I specify as well. UPDATE: Update: this was working all along I simply had other code that copied from one bucket to another that restored the original file name and thus confusing me.

http://stackoverflow.com/a/26441089
type: Answer
has body: This may fix your problem: Change the canvas class from overlay to flot-overlay. The class name was changed due to a request here: https://code.google.com/p/flot/issues/detail?id=540 You'll see the API change described in the second paragraph here: https://code.google.com/p/flot/source/browse/trunk/NEWS.txt Without this change, the canvas is being deleted during the plot call, leaving vertical-chart without a height. If this doesn't fix your problem, it would be useful to see your data object.
has comment: http://stackoverflow.com/comment/41525846
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41525527
has comment: http://stackoverflow.com/comment/41525860
has comment: http://stackoverflow.com/comment/41526052
has comment: http://stackoverflow.com/comment/41525995
has comment: http://stackoverflow.com/comment/41526070
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26438458
downvote count: 0
answers question: http://stackoverflow.com/q/26438458

http://stackoverflow.com/q/26360033
has comment: http://stackoverflow.com/comment/41394515
tagged with: rake
tagged with: ruby-on-rails
type: Question
has body: I have a Rails 4 application installed on RHEL 6 machine. The production uses Passenger and Apache2. Lately I've been trying to integrate Rake tasks into production as a scheduled job using Whenever Gem and Cron. Whenever I try to run in production one of these Rake tasks, I get the following error: rake aborted! ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. It is important to mention the NodeJS was installed on the machine. I can precompile assets, and so on. Specifically, the command node --version produces: v0.10.31 Here's my stack trace: rake aborted! ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/execjs-2.2.1/lib/execjs/runtimes.rb:51:in `autodetect' /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/execjs-2.2.1/lib/execjs.rb:5:in `&lt;module:ExecJS&gt;' /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/execjs-2.2.1/lib/execjs.rb:4:in `&lt;top (required)&gt;' /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require' /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require' /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency' /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require' /var/www/eng_performance/shared/bundle/ruby/2.0.0/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `&lt;top (required)&gt;' /home/deploy/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.7.2/lib/bundler/runtime.rb:76:in `require' /home/deploy/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.7.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require' /home/deploy/.…
has answer: http://stackoverflow.com/a/26380731
accepted answer: http://stackoverflow.com/a/26380731
tagged with: javascript
score: 4
tagged with: ruby-on-rails-4
answer count: 1
has title: Runnig Rake tasks on production server failes due to ExecJS
favorite count: 0
linked to: http://stackoverflow.com/q/14829275
upvote count: 4
tagged with: node.js
linked to: http://stackoverflow.com/q/14187681
has comment: http://stackoverflow.com/comment/41416194
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41407075
downvote count: 0

http://stackoverflow.com/comment/41477246
type: AnswerComment
has text: Hey, thanks for help. Now it's not `undefined` but returning original document when debugging `yourArray`. I couldn't understand why.
type: Comment
comment on: http://stackoverflow.com/a/26414282
score: 0

http://stackoverflow.com/a/26378830
answers question: http://stackoverflow.com/q/26378349
score: 0
has body: using jquery it can be possible to use content from another page in html. Follow these below code here: create a two any file index.html and Secondpage.html In index.html paste below code : - $(function(){ $( "#target" ).click(function() { $("#content_holder").load("Secondpage.html"); }); }); Put below code inside body tag and click at click me Click Me
type: Answer

http://stackoverflow.com/comment/41413062
type: QuestionComment
has text: I'm not sure if I understood your issue but IDs must be unique. Could u explain some more about what u wanna do?
score: 0
comment on: http://stackoverflow.com/q/26378790
type: Comment

webchromeclient
tag name: webchromeclient
tags question: http://stackoverflow.com/q/26398656
type: Tag

http://stackoverflow.com/a/26394887
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26382950
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41445301
type: Answer
has comment: http://stackoverflow.com/comment/41445116
answers question: http://stackoverflow.com/q/26382950
has body: Seems to me that your main problem is that you are reusing id attributes. You can't have multiple &lt;div id="chart"&gt;&lt;/div&gt; on a single page. Ids need to be unique. Each instance of d3.select("#chart") will be selecting the same div. It will likely be either the first or last on the page (depending on the browser).

http://stackoverflow.com/comment/41507435
has text: @KevinB I see what you mean, the single thread is for the I/o. But not for inner processing. The analogy is great. Thanks
comment on: http://stackoverflow.com/q/26431146
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41645851
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26507641
type: Comment
has text: What version of jQuery are you using? `.live` was deprecated in 1.7 and removed in 1.9. [(reference)](http://api.jquery.com/live/)

http://stackoverflow.com/comment/41653896
type: QuestionComment
has text: So only the third one works? That's weird... i really don't understand why. but thank you for those tests! i will try to use it.
type: Comment
comment on: http://stackoverflow.com/q/26510657
score: 0

http://stackoverflow.com/a/26366258
has comment: http://stackoverflow.com/comment/41391656
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41390778
score: 0
has body: You can put a check on change event of both dropdowns call a function, where make a check as below HTML: -- Select -- ACOUSTIC GUITAR DRUM PIANO -- Select -- MAINSTREAM BEGINNER PRIMARY A INTERMEDIATE A INTERMEDIATE B JS : function toggle(){ if(jQuery('#activity').val == 'PIANO' && jQuery('#level').val == 'BEGINNER'){ jQuery('#idTable').css('display','block') } } Have used jquery u can include it adding below line in your script in head.
type: Answer
accepted answer of: http://stackoverflow.com/q/26365852
answers question: http://stackoverflow.com/q/26365852
has comment: http://stackoverflow.com/comment/41391802

http://stackoverflow.com/q/26502681
has comment: http://stackoverflow.com/comment/41642907
answer count: 1
tagged with: javascript
score: 0
tagged with: load
has answer: http://stackoverflow.com/a/26506511
accepted answer: http://stackoverflow.com/a/26506511
has title: How to set a load event for images on a complex Object in javascript
has comment: http://stackoverflow.com/comment/41643162
type: Question
has body: I'm loading a lot of images in javascript that are going to be needed in very different contexts. To easily access them in different contexts I created a tree-kind-of object. Something like this: var imgs = { scene: new Image(), character1 :{ left: { stand: new Image(), kick: new Image(), ... } right: { stand: new Image(), kick: new Image(), ... } character2 :{ left: { stand: new Image(), kick: new Image(), ... } right: { stand: new Image(), kick: new Image(), ... } } Then I loaded the images: imgs.scene.src = "scene.jpg"; imgs.character1.left.stand.src = "char1stand.png"; imgs.character1.left.kick.src = "char1kick.png"; ... Now I want to make a reliable method to attach an event to them. But the problem is the amount of levels I have. Is there a way of doing this without going into a complex system of for-in loops?
type: AnsweredQuestion

http://stackoverflow.com/comment/41536787
type: QuestionComment
comment on: http://stackoverflow.com/q/26447167
has text: @LearningNeverStops Yes you are correct but I got one solution for it and I'm trying to find another simple and easy solution to do the same. I thought people with lot of HTML knowledge have a number of ways to do it
score: 0
type: Comment

http://stackoverflow.com/comment/41513724
type: Comment
comment on: http://stackoverflow.com/a/26405922
score: 0
type: AnswerComment
has text: Yeah sure but the code in the post pretty much is the whole script so far. Of course it was supposed to be more but due to the issues with the variables I haven't gone much further. Unless the issue is with the page get (which I've been thinking it probably is) or with the tampermonkey/greasemonkey header. (Which is also probably is because I'm stupid and dyslexic.) [Pastebin Here](http://pastebin.com/S24mdTyD)

http://stackoverflow.com/a/26572393
has comment: http://stackoverflow.com/comment/42224208
has comment: http://stackoverflow.com/comment/41762953
has comment: http://stackoverflow.com/comment/41762901
score: 5
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/41762886
has body: When you put an expression inside a condition (for instance: if (i), if (i == null), if (++i), if (i < 2))) the expression get evaluated before its 'checked' is it true or false. Live example: we have var i = 0; now you call if (++i) console.log(i). The expression ++i return 1 (it is understood as truth in javascript [0 is not]) so console.log(i) logs 1. Now let's say we have var i = 0 and if (++i && ++i) console.log(i). The first expressions returns 1 so the second is also called which returns 2. Both 1 and 2 are treated as truth so console.log(i) logs 2 Awesome. Let's have a look on the same example as above but before if we initialise var i = -1 . Now we call if (++i && ++i) console.log(i). The first ++i returns 0 which is falsity. To continue you have to get how && works. Let me explain quickly: If you stack exp1 && exp2 && exp3 ... && expX then exp2 will be only executed(evaluated) when exp1 returns truth (for instance: true, 1, "some string"). exp3 will be executed only if exp2 is truthy, exp4 when exp3 is truth and so on...(until we hit expN) Let's go back to f (++i && ++i) console.log(i) now. So the first ++i returns 0 which is falsity so second ++i isn't executed and whole condition is false so console.log(i) won't be executed (How ever incrementation was completed so i equals to 0 now). Now when you get it I can tell you that while loop works the same in condition checking way. For instance var = -2 and while (++i) will be executed until ++i returns falsity (that is 0). while (++1) will be executed exactly 2 times. TL;DR BELOW!!! So how this works? while ( ++i < l && (j.context = j[0] = this[i]) && c.call(j[0], i, j) !== false ); I think the best way to explain is to rewrite it (: while ( ++i < l ) { if (!(j.context = j[0] = this[i])) break; if (!(c.call(j[0], i, j) !== false)) break; } or ever less magical: var i = 0; while ( i < l ) { if (!(j.context = j[0] = this[i])) break; if (!(c.call(j[0], i, j) !== false)) break; i++; }
answers question: http://stackoverflow.com/q/26513683
has comment: http://stackoverflow.com/comment/41763042
has comment: http://stackoverflow.com/comment/41762910
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41763468
type: Answer
has comment: http://stackoverflow.com/comment/42015135
accepted answer of: http://stackoverflow.com/q/26513683
has comment: http://stackoverflow.com/comment/41980713

http://stackoverflow.com/a/26463950
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41566803
has body: Nakul, Please refer to this fiddle for a working version. You did not escape the ? which is a special character in a regular expression. This is done by prefixing it with \. So it should have been \? instead of ? in your string. Here is a working version of the code you uploaded.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41567106
has comment: http://stackoverflow.com/comment/41566332
has comment: http://stackoverflow.com/comment/41566627
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26463620
answers question: http://stackoverflow.com/q/26463620
type: Answer

http://stackoverflow.com/comment/41540134
score: 1
comment on: http://stackoverflow.com/q/26449246
type: Comment
type: QuestionComment
has text: "14" > "3" returns false. Cast it to an int.

http://stackoverflow.com/q/26430165
linked to: http://stackoverflow.com/q/14028959
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41505243
answer count: 0
has comment: http://stackoverflow.com/comment/41505168
has comment: http://stackoverflow.com/comment/41505225
tagged with: dom
type: Question
has body: So, I did not think that this would that complicated but I cannot figure it out myself. I preload images in the with JS. //PRELOAD THE IMAGES original = new Image(698, 360); original.src = "imagenes_png/bosque_mapa.png"; ... Then I want to insert the preloaded images ito a div tag with the name test, also with JS. //Thats in the head aswell document.getElementById('test').appendChild(original) That is my div tag in the body testext That does not work though. The div is still testext For people with the same issue: Put the document.getElementById('test').appendChild(original) into here $(document).ready(function() { /* code here */ }); $(document).ready(function() {document.getElementById('test').appendChild(original)}); Why? Read the comment of David Thomas and follow the posted link! **Note: That solution requieres jQuery which can be loaded like this:
has title: Appending a preloaded image to a div
tagged with: javascript
has comment: http://stackoverflow.com/comment/41505287
score: 0

http://stackoverflow.com/a/26494592
has comment: http://stackoverflow.com/comment/41622586
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: Normally that code is shortened a bit into if (obj &amp;&amp; obj.key1 &amp;&amp; obj.key1.key2 &amp;&amp; obj.key1.key2.key3) { return obj.key1.key2.key3.key4; } because undefined is also falsy and any object is instead truthy. The shorter but IMO logically uglier alternative is try { return obj.key1.key2.key3.key4; } catch(e) { } that may be is acceptable if you never use Javascript properties as it can hide errors in non-trivial accessors.
upvote count: 2
answers question: http://stackoverflow.com/q/26494448
accepted answer of: http://stackoverflow.com/q/26494448

http://stackoverflow.com/comment/41410392
type: Comment
has text: I will check out this solution tonight, thnx. Do I understand correctly that I will have to use something like | return objHashCache[3].myProperty() |?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26373934

http://stackoverflow.com/comment/41487388
type: QuestionComment
has text: More or less is something like this http://plnkr.co/edit/LbHRBB?p=preview
score: 0
comment on: http://stackoverflow.com/q/26420391
type: Comment

angularjs-scope
tags question: http://stackoverflow.com/q/26445397
tags question: http://stackoverflow.com/q/26404763
tags question: http://stackoverflow.com/q/26423245
tags question: http://stackoverflow.com/q/26504481
tags question: http://stackoverflow.com/q/26401885
tags question: http://stackoverflow.com/q/26461330
tags question: http://stackoverflow.com/q/26411439
tags question: http://stackoverflow.com/q/26477594
tags question: http://stackoverflow.com/q/26510034
tags question: http://stackoverflow.com/q/26479179
tags question: http://stackoverflow.com/q/26434618
tags question: http://stackoverflow.com/q/26447233
tags question: http://stackoverflow.com/q/26389626
tags question: http://stackoverflow.com/q/26429024
tags question: http://stackoverflow.com/q/26445779
tags question: http://stackoverflow.com/q/26397493
tags question: http://stackoverflow.com/q/26441772
tags question: http://stackoverflow.com/q/26505077
tags question: http://stackoverflow.com/q/26483513
tags question: http://stackoverflow.com/q/26410262
tags question: http://stackoverflow.com/q/26365765
tags question: http://stackoverflow.com/q/26459958
tags question: http://stackoverflow.com/q/26411367
tags question: http://stackoverflow.com/q/26394718
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/26497231
tags question: http://stackoverflow.com/q/26447923
tags question: http://stackoverflow.com/q/26380630
tags question: http://stackoverflow.com/q/26488043
tags question: http://stackoverflow.com/q/26366796
tags question: http://stackoverflow.com/q/26463491
tags question: http://stackoverflow.com/q/26379150
tags question: http://stackoverflow.com/q/26393676
tags question: http://stackoverflow.com/q/26480615
tags question: http://stackoverflow.com/q/26367277
tags question: http://stackoverflow.com/q/26490004
tags question: http://stackoverflow.com/q/26484154
tags question: http://stackoverflow.com/q/26400761
tags question: http://stackoverflow.com/q/26505635
tags question: http://stackoverflow.com/q/26362695
tags question: http://stackoverflow.com/q/26463972
tags question: http://stackoverflow.com/q/26506854
type: Tag

cordova
tags question: http://stackoverflow.com/q/26378075
tags question: http://stackoverflow.com/q/26402497
tags question: http://stackoverflow.com/q/26476653
tags question: http://stackoverflow.com/q/26461678
tags question: http://stackoverflow.com/q/26437290
tags question: http://stackoverflow.com/q/26407695
tags question: http://stackoverflow.com/q/26455646
tags question: http://stackoverflow.com/q/26411091
tags question: http://stackoverflow.com/q/26376444
tags question: http://stackoverflow.com/q/26437400
tags question: http://stackoverflow.com/q/26502455
tags question: http://stackoverflow.com/q/26470202
tags question: http://stackoverflow.com/q/26511363
tags question: http://stackoverflow.com/q/26392966
tags question: http://stackoverflow.com/q/26392957
tags question: http://stackoverflow.com/q/26414615
tags question: http://stackoverflow.com/q/26465832
tags question: http://stackoverflow.com/q/26455132
tags question: http://stackoverflow.com/q/26434337
tags question: http://stackoverflow.com/q/26482480
tags question: http://stackoverflow.com/q/26394698
tags question: http://stackoverflow.com/q/26460215
tags question: http://stackoverflow.com/q/26481471
tags question: http://stackoverflow.com/q/26401355
tags question: http://stackoverflow.com/q/26363574
tags question: http://stackoverflow.com/q/26399348
tags question: http://stackoverflow.com/q/26367818
tag name: cordova
tags question: http://stackoverflow.com/q/26505927
tags question: http://stackoverflow.com/q/26424432
tags question: http://stackoverflow.com/q/26364610
tags question: http://stackoverflow.com/q/26402563
tags question: http://stackoverflow.com/q/26386354
tags question: http://stackoverflow.com/q/26510118
tags question: http://stackoverflow.com/q/26355618
tags question: http://stackoverflow.com/q/26483215
tags question: http://stackoverflow.com/q/26508724
tags question: http://stackoverflow.com/q/26489972
tags question: http://stackoverflow.com/q/26466016
tags question: http://stackoverflow.com/q/26471177
tags question: http://stackoverflow.com/q/26458781
tags question: http://stackoverflow.com/q/26358275
tags question: http://stackoverflow.com/q/26422640
tags question: http://stackoverflow.com/q/26421502
tags question: http://stackoverflow.com/q/26358832
tags question: http://stackoverflow.com/q/26491926
type: Tag
tags question: http://stackoverflow.com/q/26494647
tags question: http://stackoverflow.com/q/26493769
tags question: http://stackoverflow.com/q/26410066
tags question: http://stackoverflow.com/q/26491516

gmail
type: Tag
tags question: http://stackoverflow.com/q/26430255
tag name: gmail

http://stackoverflow.com/comment/41373869
comment on: http://stackoverflow.com/q/26357653
score: 0
has text: But $('#my_form')[0].submit(); should submit
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26468483
has body: The question is "Best way to count number of downloads of several files on website" What I am trying to do: Track and tally the number of downloads of Several files For files which have different extensions. (foo.zip, bar.tar.gz, foo2.zip) Avoid relying on server side code. I've seen multiple answers for counting the file's downloads with the Apache access.log cat /path/to/access.log | grep foo.zip | grep 200 | wc -l from Best way to count file downloads on a website , which is an eloquent solution however requires access to the backend log file. I was hoping to use an mostly-javascript solution, Which could also make a call to a php portion of code.
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41574702
has answer: http://stackoverflow.com/a/26468687
has comment: http://stackoverflow.com/comment/41575315
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has title: Best way to count number of downloads of several files on website
linked to: http://stackoverflow.com/q/158124
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41574605
type: Question
accepted answer: http://stackoverflow.com/a/26468687
has answer: http://stackoverflow.com/a/26468660
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26468660
has comment: http://stackoverflow.com/comment/41575046
answer count: 2

http://stackoverflow.com/q/26510561
tagged with: angularjs
tagged with: typeahead
tagged with: http://stackoverflow.com/tag/html
has body: I have two files. One is an index.html, which essentially is the frame for my website, and the other a main.html which holds the template for my homepage. I have the following code right before all my scripts are imported. Well hello there Mr. Footer All my typeahead and controllers are imported in my scripts. This defaults to pulling my main.html because of the routed controller. The issue is that when I put the following code into my index.html, the typeahead works fine, but as as soon as I move it into my main.html it stops working. All of my javascript is being ran from files, so it shouldn't be a conflict of which loads first... Thoughts? Here is a somewhat similar question that was never answered: Bootstrap Typeahead Not Registering in AngularJS ng-view
linked to: http://stackoverflow.com/q/16526316
tagged with: twitter-bootstrap
has title: Typeahead not recognized inside ng-view
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26552241
has comment: http://stackoverflow.com/comment/41724190
type: Question
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26552241

http://stackoverflow.com/comment/41585424
score: 0
type: Comment
type: QuestionComment
has text: normally the datapicker hide himself when he lost the focus. You don't have to do this manually.
comment on: http://stackoverflow.com/q/26473896

http://stackoverflow.com/comment/41632304
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26499999
has text: ohh.... so based on the other code... you didn't copy your `{ brackets }` or the function it's passed to... or return statement.
score: 0

http://stackoverflow.com/a/26408901
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26408379
type: Answer
answers question: http://stackoverflow.com/q/26408379
upvote count: 4
has body: I think you're on the right track. You need to set the showfull on the item and then use ng-show or ng-if to hide it, or as Gavin mentioned, use a class. On ng-click you can call your expand function, where you pass the item, toggle it and set all others to hidden. Template: {{item.title}} {{item.content}} {{item.info}} Controller: $scope.expand = function (item) { angular.forEach($scope.items, function (currentItem) { currentItem.showfull = currentItem === item && !currentItem.showfull; }); };
downvote count: 0
score: 4

http://stackoverflow.com/a/26408431
downvote count: 1
type: Answer
upvote count: 4
has body: The key difference between the two is in the first example, you can't have private variables and functions if you want to work with the prototype. You can have private variables and functions, but only if your public properties and methods are created in the constructor by attaching them to this. Example 1 with a private variable and function: var Foo = function(){ var privateVar = "priv"; function privateFunction(){ console.log(privateVar); } this.publicProperty = 1; this.publicFunction = function(){ console.log(privateVar); } } The above is no problem if you don't want to use the prototype. However, if you do then there is no way to have private variables, without the new scope that your second example benefits from. As you can see, you have to include everything within the constructor, whereas the second example you can leave the constructor just for initialising variables. Conversely, the prototype methods in the second example are out of scope of the constructor, so they can't use any variables of functions within the constructor. All functions and variables that the prototype methods need must be declared in the outer closure scope.
score: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26407593
has comment: http://stackoverflow.com/comment/41497550
answers question: http://stackoverflow.com/q/26407593

http://stackoverflow.com/comment/41596776
has text: I see what you do there, but if this is a more complex wizard with 5 steps and 10 different fields in each step, I would like to not have to hard code each piece of check myself. Is there any way to loop through all fields bound to a observable inside a template?
comment on: http://stackoverflow.com/a/26465231
score: 0
type: AnswerComment
type: Comment

konacha
type: Tag
tags question: http://stackoverflow.com/q/26428865
tag name: konacha

http://stackoverflow.com/q/26449034
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26449567
downvote count: 2
upvote count: 1
type: Question
has title: Radial text with html5 canvas
has comment: http://stackoverflow.com/comment/41539726
has body: I'm trying to write some text radiating out from a specified radius. In other words I'm trying to write text in a circular pattern, but radiating out from som defined inner radius. Edit: I'm trying to write text between the lines in this example: http://mandelid.com/code/wheel/
tagged with: javascript
score: -1
tagged with: html5-canvas
answer count: 1
has answer: http://stackoverflow.com/a/26449567
favorite count: 0
has comment: http://stackoverflow.com/comment/41539889

http://stackoverflow.com/comment/41372226
has text: Thank you very much for your answer, I can see where my issue was - very helpful! :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26356379
type: AnswerComment

http://stackoverflow.com/q/26507601
has comment: http://stackoverflow.com/comment/41647306
has comment: http://stackoverflow.com/comment/41645761
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41646088
score: 1
has comment: http://stackoverflow.com/comment/41647672
tagged with: javascript
upvote count: 2
has title: Retrieve full document.referrer URL
downvote count: 1
has body: I'm trying to extract the keywords from Google search engine through document.referrer. The full referrer URL becomes like this: "https://www.google.com.pk/?gws_rd=cr&amp;ei=LXxHVIb_JNC07Qae7oCwAg#q=stack+overflow" The document.referrer property only gives me this: "https://www.google.com.pk/?gws_rd=cr&amp;ei=LXxHVIb_JNC07Qae7oCwAg" Leaving out #q=stack+overflow, but I also want that part after the hash. Any idea on how I can grab the full URL?
favorite count: 0
linked to: http://stackoverflow.com/q/2039306
type: UnansweredQuestion

http://stackoverflow.com/q/26508988
type: UnansweredQuestion
has title: How to call function on a other page
has body: I don't found my answer in my issue , so i would like to explain. I have some QML pages, i manage my pages with a StackView object and i would like to call a function that is at page 1 from page 2 ... For example //Page 1 Item{ id: page1 function test(){ console.debug("Page 1 man ! "); } ... something } } I would like to call a test function that is on page 1 //Page 2 Item{ id: page2 Compoment.onCompleted: page1.test(); ... something } } Anyone have a solution ? yekmen
has answer: http://stackoverflow.com/a/26520040
tagged with: qml
tagged with: qtquick2
tagged with: qt5
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: qt-quick

http://stackoverflow.com/comment/41436909
type: AnswerComment
comment on: http://stackoverflow.com/a/26371911
type: Comment
has text: I changed the site a bit: Now I have a background img, and on top of it a div(this is the base). Inside it another image of an octopus. I have menus(texts in divs) that should always stay on the tentacles. So I need the octopus and the menus move together and always be seen(the whole of it on any kind of resolution). The octopus now can be seen all time whole with this width/height:100% settig. I also need to center it but it doesn't work anyhow I try, but it's the smaller problem. The biggest are still the menus that should move with the picture(stay on the picture on the tentacles).
score: 0

http://stackoverflow.com/q/26358553
tagged with: forms
score: 0
answer count: 2
has title: extjs4 how to display field multiple times
possible better answer: http://stackoverflow.com/a/26359847
tagged with: javascript
tagged with: extjs
linked to: http://stackoverflow.com/q/12089123
accepted answer: http://stackoverflow.com/a/26359106
tagged with: combobox
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26359847
linked to: http://stackoverflow.com/q/12142802
tagged with: fieldset
has answer: http://stackoverflow.com/a/26359106
has body: I have an extjs form panel. Based on the value selected in the combo box, I need to display a fieldset multiple times. That is,display the field set once if value chosen is 1, twice if value chosen is 2. The problem that I am facing is that, the field set is being displayed only once. Since, I am changing the title of the fieldset, I can tell more clearly that the fieldset being displayed is the one in the last iteration of the for loop. However,I can see the log messages in the js console for all the iterations of the for loop which means that the loop is being executed properly. Here is my code: Ext.define('ELM.view.cl.Edit', { extend : 'Ext.form.Panel', alias : 'widget.cform', addMode : false, layout : 'fit', autoShow : true, initComponent : function() { this.items = this.buildItems(); this.callParent(arguments); }, buildItems : function() { return [ { xtype : 'form', id : 'details', items : [ { xtype : 'fieldset', columnWidth : 0.5, title : 'Details', items : [ { fieldLabel : 'Number Of Scripts Required', xtype : 'combo', name : 'noOfScriptsRequired', id : 'noOfScriptsRequired', store : new Ext.data.SimpleStore({ fields : [ 'no', 'val' ], data : [['1','1'],['2','2'],['3','3']] }), displayField : 'no', valueField : 'val', listeners : { select : function(combo, value) { var formpanel = Ext.widget('cform'); var sd = this.up('form').getComponent( 'scriptdetails'); for ( var i=1; i&lt;=combo.getValue();i++){ console.log(i); var title="Script details "+i; sd.setTitle(title); sd.show(); sd.hidden = false; console.log(sd); } } } }, ] }, { xtype : 'fieldset', id : 'scriptdetails', columnWidth : '0.5', hidden : true, title : 'Script Details', items : [ { xtype : 'textfield', fieldLabel : 'Script Name', name : 'scriptName' } ] } ] } ]; } }); UPDATE: Here is the working code: { fieldLabel : 'Name :', xtype : 'textfield', name : 'name' },{ fieldLabel : 'Number Of Scripts Required', xtype : 'combo', name : 'noOfScriptsRequired', id : 'noOfScriptsRequired', store : new Ext.dat…
type: Question

http://stackoverflow.com/comment/41643961
type: QuestionComment
type: Comment
score: 1
has text: I believe there is an option to disable currency in OpenCart. Search for that option :)
comment on: http://stackoverflow.com/q/26506588

http://stackoverflow.com/q/26358089
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26358342
tagged with: http://stackoverflow.com/tag/json
has body: ive got a json object like this: { "c.employees": "222", " c.arr[0].name": "thomas", " c.arr[0].amount": 3, } I want to convert it to object like { c:{ employees:"222", arr:[{name:thomas,amount:3}] } } cant find any solution :/ The array is the problem
type: Question
has comment: http://stackoverflow.com/comment/41374628
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26358342
has comment: http://stackoverflow.com/comment/41374584
answer count: 1
has title: Convert dot notation json
downvote count: 0

http://stackoverflow.com/a/26466962
accepted answer of: http://stackoverflow.com/q/26464142
has body: Layout's cell separators are hardcoded. They are inseparable visual and functional elements of layout's structure. Thus, they can't be removed or hidden.
answers question: http://stackoverflow.com/q/26464142
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26479641
type: Answer
has body: You should use one common popup div. Here is how you can achieve. Add onclick handler with userId as a param to identify user for every item &lt;li&gt; &lt;a onclick="openPopUp(userId)" data-rel='popup'&gt; whatever.. &lt;/a&gt; &lt;/li&gt; Common Popup Code &lt;div data-role='popup' id='myPopupDiv' data-theme='a' class='ui-corner-all'&gt; &lt;input type="hidden" id="userId"/&gt;....other fields pwd/name etc Click handler function openPopUp(userId){ $("#userId").val(userId); $("#myPopupDiv").popup("open"); }
upvote count: 2
has comment: http://stackoverflow.com/comment/41635083
has comment: http://stackoverflow.com/comment/41635048
answers question: http://stackoverflow.com/q/26478706
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26478706
has comment: http://stackoverflow.com/comment/41635183

google-apps-script
tags question: http://stackoverflow.com/q/26373940
tags question: http://stackoverflow.com/q/26494256
tags question: http://stackoverflow.com/q/26386054
tags question: http://stackoverflow.com/q/26458140
type: Tag
tag name: google-apps-script
tags question: http://stackoverflow.com/q/26465760
tags question: http://stackoverflow.com/q/26430255
tags question: http://stackoverflow.com/q/26386492
tags question: http://stackoverflow.com/q/26451160
tags question: http://stackoverflow.com/q/26480857
tags question: http://stackoverflow.com/q/26466352
tags question: http://stackoverflow.com/q/26509477
tags question: http://stackoverflow.com/q/26455094

http://stackoverflow.com/a/26494001
accepted answer of: http://stackoverflow.com/q/26493824
type: AcceptedAnswer
has body: I just needed to stringify the data! $http.post(Common.blog.save, { blog: JSON.stringify(blog) }) .then(saveBlogComplete) .catch(function(message) { });
score: 0
answers question: http://stackoverflow.com/q/26493824
type: Answer

http://stackoverflow.com/a/26391453
type: Answer
has body: serialize() function returned string for get but you need use serializeArray for get all form data in array and send in backend if you use method get you can use serlialize function, but you use method post, for post use serilaizeArray() funtion jQuery('#myform').serializeArray()
score: 0
has comment: http://stackoverflow.com/comment/41436751
answers question: http://stackoverflow.com/q/26391300

http://stackoverflow.com/comment/41388867
comment on: http://stackoverflow.com/a/26363829
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63047/discussion-between-milz-and-ntonnelier).
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26459042
has answer: http://stackoverflow.com/a/26459440
accepted answer: http://stackoverflow.com/a/26459440
favorite count: 0
has comment: http://stackoverflow.com/comment/41557809
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26459488
upvote count: 3
has body: I have a form with 5 fields &lt;form&gt; First name: &lt;input type="text" name="firstname" required&gt;&lt;br&gt; Last name: &lt;input type="text" name="lastname" required&gt; Age: &lt;input type="text" name="age" required&gt; Gender: &lt;input type="text" name="gender" required&gt; City: &lt;input type="text" name="city" required&gt; Locality: &lt;input type="text" name="locality"&gt; Address: &lt;input type="text" name="address"&gt; &lt;/form&gt; When the form fields are entered based upon the number of fields filled how can I show the number of fields entered as percentage completed like we see in some social sites. Here only first name, last name, age, gender, city are mandatory i.e, required, locality and address are not mandatory, hence it must take 5 fields into count and Like if 2 fields are entered it must show 40% completed as when 5 fields make 100%, 2 fields make 40%
type: Question
score: 3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26459439
answer count: 3
has answer: http://stackoverflow.com/a/26459439
downvote count: 0
has title: calculate and auto update the percentage based on number of fields filled in jquery
tagged with: jquery

http://stackoverflow.com/a/26471368
has body: You can do something like this: var totalElems = document.getElementsByTagName('li').length; for(var i =0;i&lt;=totalElems; i++) { var elem = document.querySelectorAll('li[data-info-id$="1"]'); elem[i].style.color = 'red'; } I have added a DEMO too: http://jsbin.com/xucakirici/2/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26470421

http://stackoverflow.com/q/26388648
has body: I have client side email validation script Javascript+RegEx, it works fine, but I want to exclude certain domains while validating, namely all Apple domains since they do not work (emails sent to these addresses are deleted without any notice): @apple.com, @me.com, @icloud.com, @mac.com. I found appropriate questions here, but still they are not the same I am asking for help. Please, help to implement this Can it be done via RegEx modification, or I have to use loop and search substrings (@apple.com, @me.com, @icloud.com, @mac.com) after the main email validation is done? function verifyMe(){ var msg=''; var email=document.getElementById('email').value; if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) || document.getElementById('email').value=='') { msg+='- Invalid Email Address: '+email+'\n\n'; document.getElementById('Eemail').style.color='#ffffff'; } else document.getElementById('Eemail').style.color='#bbb' if(msg!='') return false; else { search_code(); //it's ok go ahead return true; } }
has comment: http://stackoverflow.com/comment/41432312
tagged with: javascript
has answer: http://stackoverflow.com/a/74696626
score: 0
answer count: 3
tagged with: validation
tagged with: email
has title: Email validation Javascript+RegEx, but to exclude certain domains
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41430953
tagged with: regex
has comment: http://stackoverflow.com/comment/41432888
has comment: http://stackoverflow.com/comment/41431049
has comment: http://stackoverflow.com/comment/41432486
has answer: http://stackoverflow.com/a/48089175
has answer: http://stackoverflow.com/a/26388887
type: Question

http://stackoverflow.com/q/26436414
has comment: http://stackoverflow.com/comment/41517603
type: UnansweredQuestion
upvote count: 1
has body: ok so I am currently trying to use a regular expression to validate that my string has 16 numbers. Also a MM/YYYY format. They aren't working. var cc = ccnum.value; cc = cc.replace(/\s/g, ''); cc = cc.replace(/-/g, ''); //Validate the credit card number: if (/^\d{16}$/.test(cc.value)) { removeErrorMessage('ccnum'); } else { addErrorMessage('ccnum', 'Please enter a valid credit card number.'); error = true; } and if (/^\d{2}?\d{4}$/.test(exp.value) &amp;&amp; (expDate[0] &gt;= month) &amp;&amp; (expDate[1] &gt;= year)) {
type: Question
has title: Regular Expressions for 16 digits and forward slash?
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/26436430
tagged with: regex
has answer: http://stackoverflow.com/a/26436540
favorite count: 0

http://stackoverflow.com/comment/41500579
type: Comment
comment on: http://stackoverflow.com/a/26426189
score: 0
type: AnswerComment
has text: @Damo I think this is something jQuery must have removed from their documentation. I sadly couldn't find any official link.

http://stackoverflow.com/a/26396319
accepted answer of: http://stackoverflow.com/q/26395422
score: 7
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41516970
has comment: http://stackoverflow.com/comment/41444416
type: Answer
answers question: http://stackoverflow.com/q/26395422
has body: You can use a mongo shell script. Note that it will perform a full table scan. function findMinMax() { var max = 0; var min = db.collection.findOne().fieldName.length; db.collection.find().forEach(function(doc) { var currentLength = doc.fieldName.length; if (currentLength &gt; max) { max = currentLength; } if (currentLength &lt; min) { min = currentLength; } }); print(max); print(min); } use &lt;databaseName&gt; findMinMax(); You can save the function in a file say c:\minMax.js and run the file as, c:\mongodb\bin&gt; mongo dbName &lt; c:\minMax.js Note: you may need to supply the necessary hostname, user name, password to connect to your database. c:\mongodb\bin&gt; mongo --host hostName --port portNumber -u userName -p password dbName &lt; c:\minMax.js
has comment: http://stackoverflow.com/comment/97441296
upvote count: 7

http://stackoverflow.com/q/26496274
linked to: http://stackoverflow.com/q/2132090
has body: I'm trying to combine the .toggle() method with an animation. I've followed the methods laid out in this fiddle as well as in this SO post, but the second click isn't returning my div to the original position. The behavior should be: Click the title Content expands Slide up over the headline Click again Content contracts Slide back down to the original position <-- This isn't happening HTML This is the headline Feedback Videos can be more than direct instruction. Currently, how do you give feedback on assignments? It takes a lot of time, right? Video can be used to give direct feedback to the student because it communicates areas of improvement more effectively than written feedback alone. CSS #headline { position:fixed; top:10px; left:10px; width:380px; } #page-wrap { position:relative; top:200px; } .post { width:300px; } .post .title { cursor: pointer; } .post .content { display:none; } Script $(".title").click(function() { $title = $(this); $content = $title.next(); $content.toggle( function() { $("#page-wrap").animate({"margin-top":"200px"}, 'fast') }, function () { $("#page-wrap").animate({"margin-top":"-200px"}, 'fast') } ) }); CodePen Demo Here's a live page for more context.
score: 0
tagged with: javascript
tagged with: jquery
tagged with: css
has comment: http://stackoverflow.com/comment/41625944
has title: Reset position after .animate() method
has comment: http://stackoverflow.com/comment/41626296
answer count: 0
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/26357088
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41373106
has answer: http://stackoverflow.com/a/26357398
score: 0
has answer: http://stackoverflow.com/a/26357379
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26357405
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41373091
has title: site works in firefox but no other browsers, why?
has comment: http://stackoverflow.com/comment/41373520
has comment: http://stackoverflow.com/comment/41373490
type: Question
has body: should do this: a progress bar appears, followed by thunbnails.. if it' working. Can someone please simply explain to me what i have written wrong in my markup? I don't understand what might be the issue here so I am asking here, My site: http://env-3884279.jelastic.servint.net/bot2/ if the 0% does not appear, it's working incorrectly, refuses to run in any other browser except firefox. why? capri <!--[if lt IE 9]> <![endif]--> 0 Movies Processed.
has comment: http://stackoverflow.com/comment/41374139
has comment: http://stackoverflow.com/comment/41373140

http://stackoverflow.com/comment/41454136
has text: Casper version : 1.1.0-beta3 and phantomjs : 1.9.7. It is always the problem :/ line 26 ("this.echo(this.getHTML("#ui-id-6"));" in "wait(2000.." ), "No element matching selector found: #ui-id-6"
comment on: http://stackoverflow.com/a/26397679
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26485227
score: 0
answer count: 1
has title: H is undefined using Extjs 3.3.1 Tree
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28266552
tagged with: tree
has body: I Have Problem With ext-3.3.1 Tree. I use it in my project but sometimes the browser show this error and fail to load the page. I take a picture of the errors and It's here and the html is here. I really think it made by a bug ! anyone can help? I hope you can help me it really made me mad. Kind regards
type: Question
tagged with: javascript
tagged with: extjs

http://stackoverflow.com/comment/41641458
has text: Heading3 Heading2 Heading1 < Slider Images>
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26502054
type: QuestionComment

http://stackoverflow.com/q/26462101
favorite count: 0
has body: In a non-event-based language this task is done like this: if (keypressed() and other_condition) { doSomething(); } I can hardy imagine how to reach the same goal when I don't have conditions but rather eventlisteners. $(document).on("keypress", function (a) { .... }); $(document).on("othercondition", function (a) { .... }); To be less general: I call a function report. Within the function body, I want to perform a test, whether a key is currently pressed. This function within shall not be declared newly every time I invoke the report-function. var report = function(e) { if (keypressed()) { } }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/76017112
has comment: http://stackoverflow.com/comment/41563196
has comment: http://stackoverflow.com/comment/41563814
type: Question
has title: Trigger Event when key is pressed and some other condition is true at the same time
has comment: http://stackoverflow.com/comment/41563154
tagged with: javascript
has comment: http://stackoverflow.com/comment/41563167
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: dom-events

http://stackoverflow.com/q/26356432
tagged with: javascript
score: 0
has title: Visualforce with Javascript : autocomplete is working but a field value is missing on loading
tagged with: visualforce
tagged with: salesforce
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41400725
has body: Since we can't use javascript in a home component anymore. I decided to implement my javascript in a custom visualforce page. My javascript is an autocomplete to help my users when they will start to enter a zipcode. after their selection the BillingPostalCode and the BillingCity will be set. I overrode the "edit page" - and i added my javascript in the tag. Following the documentation and my old code my autocomplete is working. BUT when i'm loading the page the current value of my input field "BillingPostalCode" is missing :'( Here is my visualforce page : <apex:page standardController="Account" extensions="cpSearch" tabstyle="Account" > <apex:form > <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"> <apex:pageblock mode="edit" id="Doc" title="Modifier Compte"> <apex:pageblockbuttons > <apex:commandbutton action="{!save}" value="Sauvegarder"></apex:commandbutton> <apex:commandbutton action="{!cancel}" value="Annuler"></apex:commandbutton> </apex:pageblockbuttons> <apex:pageblocksection title="Informations sur le compte"> <apex:outputtext value=""></apex:outputtext> <apex:inputfield value="{!Account.Phone}" ></apex:inputfield> <apex:outputfield value="{!Account.owner.Name}"></apex:outputfield> <apex:inputfield value="{!Account.fax}"></apex:inputfield> <apex:inputfield value="{!Account.Name}" required="true"></apex:inputfield> <apex:inputfield value="{!Account.Website}"></apex:inputfield> <apex:outputfield value="{!Account.RecordType.Name}"></apex:outputfield> <apex:inputfield value="{!Account.Adresse_email__c}"></apex:inputfield> <apex:inputfield value="{!Account.ParentID}"></apex:inputfield> <apex:outputtext value=""></apex:outputtext> <apex:inputfield value="{!Account.URL_du_logo_de_la_societe__c}"></apex:inputfield> <apex:outputtext value=""></apex:outputtext> <apex:inputfield value="{!Account.type}"></apex:inputfield> </apex:pageblocksection> <a…
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41648192
tagged with: autocomplete

http://stackoverflow.com/a/26373394
has body: Use Math.round(): Math.round(1.164 * 100000) It will give you 116400.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26373326

http://stackoverflow.com/comment/41438296
type: QuestionComment
comment on: http://stackoverflow.com/q/26392657
has text: @Ian: "a class to the first three database objects, then another class for the 4 to 6 objects" --- assuming you have `i` index show how would you put `1..3` into one group and `4..6` into another using modulus operator.
score: 0
type: Comment

http://stackoverflow.com/comment/41406447
type: AnswerComment
has text: Django is not a templating language per se (although it has one). Jade is a templating language primarily used on the server side; Handlebars is a well-known client-side templating language.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26374220

http://stackoverflow.com/comment/41464639
score: 0
comment on: http://stackoverflow.com/q/26404876
type: Comment
type: QuestionComment
has text: Did you set `batch: true` on the grid? It should be posting all of the items (not just he ids) that you deleted to the server.

http://stackoverflow.com/comment/41525720
type: AnswerComment
has text: Thanks for the suggestion. though it didn't work. Ill update my question with the whole page so you can see the changes as you advised.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26441198

http://stackoverflow.com/a/36212639
answers question: http://stackoverflow.com/q/26458108
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: Working Code compatible with fullcalendar 2.6.1 I started this code from the post below (A1rPun). Working JSFiddle var scroll = -1; $('#calendar').fullCalendar({ // init calendar header: {left: 'today prev,next, refresh title', right: 'agendaDay,agendaWeek'}, allDaySlot: false, defaultView: 'agendaDay', // when all the events are rendered, scroll to the previous saved scroll position eventAfterAllRender: function(view) { if(scroll &gt; -1 &amp;&amp; (view.name=='agendaDay' || view.name=='agendaWeek')) setTimeout(function(){ document.querySelector('.fc-scroller').scrollTop = scroll; },0); }, // when view is destroyed, we keep the scroll position in a variable viewDestroy: function(view) { if(view.name=='agendaDay' || view.name=='agendaWeek') scroll = document.querySelector('.fc-scroller').scrollTop; } }); // end calendar This solution is working in 'agendaDay', and 'agendaWeek' views. It's also working when you switch between them. I don't think it is very pretty because you need to wait until after all the events are rendered. The more events you have on your calendar, the more time the scroll will take.. A good solution would be to use the Fullcalendar option scrollTime You can set it in viewRender like this. That will have the effect to make the calendar scroll to this time. viewRender: function(view, element){ view.options.scrollTime = '09:00:00'; } Maybe there is a way to convert the scroll value into time and then render it to the calendar. EDIT 1 I figured out that is way much better to use the viewRender callback, instead of the eventAfterAllRender callback to set the scroll position. Here is the JSFiddle viewRender: function(view, element){ if(scroll &gt; -1 &amp;&amp; (view.name=='agendaDay' || view.name=='agendaWeek')){ setTimeout(function(){ document.querySelector('.fc-scroller').scrollTop = scroll; },0); } }, It's allowing to switch between other wiews (month, basicWeek...) and keep saving the scroll. And it's a bit faster

http://stackoverflow.com/q/26475387
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26475503
has title: vimeo - how do i add a custom control bar?
downvote count: 1
has body: I've been searching all over the place for some code to add a custom progress/control bar to embedded vimeo videos. An example of what I'd like to do is the progress bar at the bottom: http://www.5by.com/amazing-timelapses/posts/9LZ/boston-layer-lapse any suggestions? thanks Mike
type: Question
upvote count: 0
tagged with: javascript
score: -1
tagged with: actionscript
answer count: 1

http://stackoverflow.com/q/26454769
has body: I have a Firefox overlay extension with a tree in a sidebar. How can I keep the tree state synchronized in several windows? For example in first window added new item in tree, how update tree in other windows? If somebody can show minimal code for it (with use code modules, observers, broadcasters or something else), please help. I read similar question, but it did not help: Firefox extension - Share common state between two or more windows
has answer: http://stackoverflow.com/a/26457725
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: firefox-addon
tagged with: state
tagged with: firefox
type: Question
linked to: http://stackoverflow.com/q/18358207
has comment: http://stackoverflow.com/comment/41575486
has title: Firefox extension: share state
score: 0

http://stackoverflow.com/a/46114173
accepted answer of: http://stackoverflow.com/q/26400735
type: AcceptedAnswer
has body: I had the same issue. I would rename the file as countries.txt and serve it as text/plain mime type. On the client side you can parse the file as json.
score: 0
answers question: http://stackoverflow.com/q/26400735
type: Answer

http://stackoverflow.com/q/26399627
has body: I am using wp-store-locator plugin and I want to add plugin directory path to my JS. html = " " + storeImg + "" + store + "" + address + "" + address2 + city + " " + state + " " + zip + " " + moreInfo + "More details "; return html; How can I do that ? Plugin path is at the end of html. I have tried like this : var pluginURL = 'pluginpathhere'; But I don't want to this.Is there any other way ?
favorite count: 0
type: UnansweredQuestion
downvote count: 2
score: -2
tagged with: php
has answer: http://stackoverflow.com/a/26400286
tagged with: wordpress
type: Question
answer count: 2
upvote count: 0
has title: How to call plugin path in JS?
has answer: http://stackoverflow.com/a/26399661
tagged with: javascript

http://stackoverflow.com/q/26410465
upvote count: 2
has answer: http://stackoverflow.com/a/26411249
accepted answer: http://stackoverflow.com/a/26411249
answer count: 1
has comment: http://stackoverflow.com/comment/41469805
favorite count: 0
has comment: http://stackoverflow.com/comment/41470093
tagged with: dojo
score: 2
has comment: http://stackoverflow.com/comment/41469290
type: AnsweredQuestion
tagged with: dijit.form
downvote count: 0
has title: How to dynamically construct and set options for dijit.form.select widget?
tagged with: java
type: Question
has body: I have a select widget as follows var pulseLen = new Select({ id : "_PulseLength", label:"PulseLength", name: "pulseLength", value : 100, options: [ { label : "5", value :"5" }, { label : "10", value :"10" }, { label : "30", value :"30" }, { label : "100", value :"100" }, { label : "300", value :"300" } ] }); Now based on the value selected in the above pulseLength widget i have to change the options of the below Select Range widget Its part of GUI validations. var range = new Select({ id:"_Range", label:"Range"), name: "range", value: "5000", options: [ { label : "5", value :"5000" }, { label : "10", value :"10000" }, { label : "20", value :"20000" }, { label : "40", value :"40000" }, { label : "80", value :"80000" }, { label : "160", value :"160000" }, { label : "260", value :"260000" } ] }); API to generate dynamic options function getRangeArray(pulselen){ var myOptions = ""; var array = [0.5,1,2,5,10,20,40]; console.log("Length got is " + pulselen); for(i=0;i&lt;array.length;i++){ var myTmp = "{label : '" + array[i] + "', value : '"+array[i] * 1000 + "'}"; //console.log(myTmp); if(i==array.length-1){ myOptions = myOptions + myTmp; }else{ myTmp=myTmp+","; myOptions = myOptions + myTmp; } //console.log(myOptions); } //console.log(myOptions); myOptions = "[" + myOptions + "];"; return myOptions; } OnChange event of the pulseLength trying to change the options var newOptions = getRangeArray(value); console.log(newOptions); registry.byId("_Range").set("options", newOptions); Sample Output [{label : '0.5', value : '500'}, {label : '1', value : '1000'}, {label : '2', value : '2000'}, {label : '5', value : '5000'}, {label : '10', value : '10000'}, {label : '20', value : '20000'}, {label : '40', value : '40000'}];
tagged with: javascript

http://stackoverflow.com/comment/41499839
type: Comment
comment on: http://stackoverflow.com/q/26425987
type: QuestionComment
has text: `idProject : 1`, or `{"idProject": 1}`, important difference.
score: 0

http://stackoverflow.com/q/26415222
has answer: http://stackoverflow.com/a/26415319
tagged with: javascript
upvote count: 3
answer count: 2
possible better answer: http://stackoverflow.com/a/26415294
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26415294
has title: Javascript get url without querystring
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26415319
has body: I have the following url: url = 'http://stackoverflow.com/questions/ask?new=question' How would I get the url without the querystring? Right, now I am doing the following, but is there a single method to do this instead of adding two? window.location.origin + window.location.pathname
type: Question

http://stackoverflow.com/q/26421731
type: Question
has body: I just implemented Dropzone.js to make file uploads on my website easier. The file uploads fine, and after it finished uploading I give the file an id and return this id to the browser. This works fine, except for that I don't know how to catch the id that gets returned from the server. In this SO answer I found some code that should supposedly do that, but it doesn't work for me. The code I have now is pasted below. Does anybody know how I can get the value that is returned by the server? All tips are welcome!
has answer: http://stackoverflow.com/a/39685449
tagged with: javascript
has answer: http://stackoverflow.com/a/26421902
has answer: http://stackoverflow.com/a/39544006
has answer: http://stackoverflow.com/a/26554118
downvote count: 0
answer count: 7
has title: How to get the Dropzone.js return value?
tagged with: file-upload
score: 17
favorite count: 0
tagged with: dropzone.js
has answer: http://stackoverflow.com/a/43919712
accepted answer: http://stackoverflow.com/a/26421902
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/35224907
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19390471
possible better answer: http://stackoverflow.com/a/35224907
has answer: http://stackoverflow.com/a/49361604
upvote count: 17

http://stackoverflow.com/comment/41434871
type: QuestionComment
comment on: http://stackoverflow.com/q/26390847
score: 0
type: Comment
has text: I have a long-winded version of this question as well, but I plan to delete it soon

http://stackoverflow.com/q/26364062
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/13123874
has answer: http://stackoverflow.com/a/26888437
tagged with: obfuscation
has comment: http://stackoverflow.com/comment/41385776
score: 2
downvote count: 0
type: UnansweredQuestion
has title: is it possible to obfuscate while using soma.js dependency injection?
has body: While looking at how to make JavaScript source code more secure I came upon a lot of 'solutions'. but most people said the same thing; "It's not possible to make your source code 100% secure", "try obfuscation", "run your code server side", etc, etc. After reading a lot posts here on stackoverflow, and other sites I came to the conclusion that a combination of minifying and obfuscating would do the job (for me). But here is the problem: we are currently using soma.js with dependency injection, and the way we set it up it does not work well with obfuscation. It's basically this: var session = function(id, sessionModel){ this._sessionmodel = sessionModel; } mapping: injector.mapClass("sessionModel", project.SessionModel, true); Obfuscation will then rename the sessionModel in the function to for example 'A', but the mapping that was done on SessionModel by the injector still remains 'sessionModel' and not 'A', this then basically breaks the code. I've read this post which is about the same subject Dependency Injection and Code Obfuscation, but it does not provide a real answer to my problem so I decided to write my own question. Any tips/hint/suggestions are welcome. Thanks in advance. EDIT It seems you can tell Yuicompressor to exclude certain identifiers by putting in 'hints' into the files like this: "identifier:nomunge, identifier2:nomunge". var session = function(id, sessionModel){ "sessionModel:nomunge"; this._sessionmodel = sessionModel; } I tested this and it works but that means you'll have to put it in yourself which is a lot of work if you have to do that for every script, especially if you have a very big project.. Gonna look into it further, and update this post if anything new pops up EDIT 2 It's been a while, I only work 1 day a week on this =S. As said before you can get it working by telling it which identifiers to exclude. For that I looked into regular expression to get the "mapped classes" programmatically, since doing it by hand is just insane. Wh…
has comment: http://stackoverflow.com/comment/41385850
tagged with: dependency-injection
type: Question
upvote count: 2
answer count: 1

http://stackoverflow.com/q/26428617
has comment: http://stackoverflow.com/comment/41502949
type: UnansweredQuestion
has body: So im trying some really basic RegEx out for the first time and i've been told that '\d' denotes a digit match. Please can someone explain why only pattern 1 below with a double back-slash "\\d" works when in theory it shouldn't. After looking in the Javascript Regular Expressions documentation, they also include the rogue back slash when you follow this link. var str = "123456", pattern1 = new RegExp("^\\d{6}$"), pattern2 = new RegExp("^\d{6}$"); if(pattern1.test(str)){ alert('pattern 1 match!'); }else{ alert('pattern 1 no match!'); } if(pattern2.test(str)){ alert('pattern 2 match!'); }else{ alert('pattern 2 no match!'); }
tagged with: regex
has title: Javascript Regex - \\d works but not \d
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26428641
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26428647

http://stackoverflow.com/q/26439617
answer count: 1
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/26440541
tagged with: routes
type: AnsweredQuestion
tagged with: javascript
type: Question
has body: What I'm trying to do There are two 'styles' or 'classes' of display "Normal": [ Header | Body | Footer ] - I use this for most states "Discreet": [ Body ] only, centre of screen - I use this for states like login/register, errors etc. These 'styles of display' don't correspond to example.com/normal/* or example.com/discreet/*, but are rather just extendable templates for other views. They should affect the URL at all. When switching between normalstyled states, only the body should reload (animate, whatever) and the header/footer should remain static. When switching between discreet styled states, the entire page, being wholely made of the body view, should transition. Such that the URLs and states should look like this (screenshots): /#/home /#/signup /#/ What I've tried What I've got visually works, until I start working with transitions, and you see the header/footer animate along with the body: app.config() $stateProvider .state('index', { url: '/', views: { '': { templateUrl: 'partials/template-normal' }, 'body@index': { templateUrl: 'partials/view-index' } } }) .state('signin', { url: '/signin', views: { '': { templateUrl: 'partials/template-discreet' }, 'body@signin': { templateUrl: 'partials/view-signin', controller: 'SigninCtrl' } } } template-normal header.app__header ... main.app__body(ui-view='body') footer.app__footer ... template-discreet main.app__body--discreet(ui-view='body')
accepted answer: http://stackoverflow.com/a/26440541
tagged with: angular-ui
has title: angular-ui-router: Creating extendable, non-url-altering layout states?
tagged with: angularjs
score: 0

http://stackoverflow.com/q/26486554
tagged with: javascript
has answer: http://stackoverflow.com/a/26486714
accepted answer: http://stackoverflow.com/a/26486714
has title: Can't run a Playlist App
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I'm trying to run a small application with an HTML kit. It's simple, I have two forms one a text input form and the other a button. When you type your text and click the button the Event handler should save the text in a list. I even used window.onload but the text doesn't get saved in the list and displays on the page. I am using an outdated text editor for HTML but I wrote it in HTML5 so shouldn't it be backwards compatible? I loaded the page in google chrome and I run into the same problem. Here is the fiddle. http://jsfiddle.net/xcmdvg71/ Code below. Playlist App
type: Question
score: 0
answer count: 1

http://stackoverflow.com/q/26453378
has answer: http://stackoverflow.com/a/26475513
linked to: http://stackoverflow.com/q/6127154
has comment: http://stackoverflow.com/comment/41548255
has title: How can I serialize backbone model into URL
linked to: http://stackoverflow.com/q/417142
linked to: http://stackoverflow.com/q/17461264
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: I want to store state of a simple application in a model, and be able to generate URL containing full state of the application (i.e., serialized model). Is there a backbone-idiomatic way to provide such a feature? Related: BackboneJS model.url using collection.url Backbone.js state management / view initialization based on url fragment
tagged with: backbone.js
type: UnansweredQuestion

http://stackoverflow.com/q/26487062
has title: jquery Serialize Method to be implemented
has comment: http://stackoverflow.com/comment/41608731
score: 0
has answer: http://stackoverflow.com/a/26487467
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41608636
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41608477
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26487467
has comment: http://stackoverflow.com/comment/41608426
has body: users often bookmark a search page after they have selected some facets to refine their search query. The refinements panel needs to be able to serialize the selected facets for inclusion in the URL each time a facet is selected or unselected. http://jsfiddle.net/sk7pqf5c/ The serialization Method should be: ?refine=panelId:facet1id...
favorite count: 0
tagged with: serialization
has comment: http://stackoverflow.com/comment/41609009
has comment: http://stackoverflow.com/comment/41608483
type: Question
linked to: http://stackoverflow.com/q/26254474

http://stackoverflow.com/comment/41552467
has text: The second argument in the $resource provider, paramDefaults, is designed to contain the default URL parameters for parameters states in the first argument, the url. Your URL does not have an :id parameter in it, so in all cases it will just return the whole JSON object.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26455801
score: 0

http://stackoverflow.com/a/26461531
type: Answer
has body: If you want to get more accurate location feed, you should request for updates, the last known location will not be sufficient for you. GPS_PROVIDER will supply only location updates from the gps, not from network provider. However, if you use NETWORK_PROVIDER, you can get more accurate location values indoor. public class MainActivity extends Activity implements LocationListener{ protected LocationManager locationManager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); } @Override public void onLocationChanged(Location location) { txtLat.setText("Latitude:" + location.getLatitude() + ", Longitude:" + location.getLongitude()); } @Override public void onProviderDisabled(String provider) { Log.d("Latitude","disable"); } @Override public void onProviderEnabled(String provider) { Log.d("Latitude","enable"); } @Override public void onStatusChanged(String provider, int status, Bundle extras) { Log.d("Latitude","status"); } }
answers question: http://stackoverflow.com/q/26461367
score: 0

http://stackoverflow.com/q/26443860
tagged with: asp.net-mvc
tagged with: .net
tagged with: javascript
has answer: http://stackoverflow.com/a/26443963
score: 0
has comment: http://stackoverflow.com/comment/41531399
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26444172
linked to: http://stackoverflow.com/q/1529740
has title: Push data from server side to web page
type: Question
answer count: 2
has body: At some point I need to send information from server side to web page. Is it possible to send data(push data) from server side to web page?

http://stackoverflow.com/a/26505323
has body: The MathJax-node project implements a command-line API to MathJax that allows you to use MathJax to process single equations or pages containing math. You can use it to convert an HTML page containing TeX code to one containing MathML instead using the page2mml command in the bin directory of the project.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26494646
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41658038
has text: @Zugwalt right... that's why what your code puts into `targetPath` needs to end with the literal filename you want to see land in S3, not `${filename}`, which is what *I think* you are doing now, based on the behavior you're seeing.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26394523

http://stackoverflow.com/a/26395399
score: 6
accepted answer of: http://stackoverflow.com/q/26395377
answers question: http://stackoverflow.com/q/26395377
has comment: http://stackoverflow.com/comment/41442743
type: AcceptedAnswer
downvote count: 0
has body: When you splice, you remove an element from the array, and shift the index of each element after it down by one. If you then increment your index j, you're committing an off-by-one error. arr = [1, 2, 3]; arr[1]; // 2 arr.splice(1, 1); // arr is now [1, 3] arr[1]; // 3 arr.splice(1, 1); // arr is now [1] arr[1]; // undefined You can avoid this by just not incrementing j, since it's now referring to a new element of the array, which is what you want.
has comment: http://stackoverflow.com/comment/41442767
type: Answer
upvote count: 6

http://stackoverflow.com/comment/41600003
has text: I would appreciate if anyone who downvote, points out what is the reason. For e.g: why is it considered too broad ? It's a very specific issue right: open a PDF file and print it via JavaScript.
score: 3
comment on: http://stackoverflow.com/q/26481814
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41382616
has text: Have you tried using GeoJSON instead?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26359982

http://stackoverflow.com/a/26438987
has body: Jquery is better option to add dynamic input/div's easy to manipulate DOM. Check the following code Enter input value submit Append input values $(document).ready(function(e){ $('#submit').click(function(){ var inputIndex = $('#in_num').val(); for( var i=0; i<inputIndex; i++) { $('#dynamicInput').append(' '); } }); }); Demo URl: http://jsfiddle.net/sathyanaga/75vbgesm/3/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26438425

http://stackoverflow.com/q/26441210
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/26441229
accepted answer: http://stackoverflow.com/a/26441237
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26441237
upvote count: 1
downvote count: 1
type: Question
has body: So I have my code like this: for (var i = 0; i &lt; str.length; i++) { str = str.replace("|", "Math.abs("); str = str.replace("|", ")"); } Is there anyway to get the same effect using a regex? Or at least a regex with a function?: str = str.replace(/?/g, function() {?});
possible better answer: http://stackoverflow.com/a/26441229
has title: Javascript - Regex - Replace every other match in string with different strings
tagged with: javascript
score: 0

http://stackoverflow.com/q/26414615
has answer: http://stackoverflow.com/a/26424972
has title: phoneGap/Apache Cordova media capture plugin - multiple video recording
tagged with: ibm-mobilefirst
upvote count: 1
answer count: 1
has body: I am trying to record multiple videos using phoneGap/Apache Cordova plugin but after every recording it prompts to save or discard. How do I get rid of this option and autosave every video recording ? (I used duration options as 15 sec which it stops recording after 15 sec and then prompts to save or discard) // capture callback var captureSuccess = function(mediaFiles) { var i, path, len; for (i = 0, len = mediaFiles.length; i &lt; len; i += 1) { path = mediaFiles[i].fullPath; // do something interesting with the file } }; // capture error callback var captureError = function(error) { navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error'); }; // start video capture navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:2, duration:15});
accepted answer: http://stackoverflow.com/a/26424972
tagged with: javascript
tagged with: phonegap-plugins
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
tagged with: cordova
type: Question

http://stackoverflow.com/q/26488799
type: UnansweredQuestion
tagged with: forms
has comment: http://stackoverflow.com/comment/41611706
has body: I want to make a script that opens a new window and in that window there is a form to call. I want to just to call the form from the new window and return back. My code: Enter product numbers:
has comment: http://stackoverflow.com/comment/41615291
answer count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41611570
type: Question
has comment: http://stackoverflow.com/comment/41611593
has title: Open new url with javascript and submit a form on the new site
score: 0
has comment: http://stackoverflow.com/comment/41611606

http://stackoverflow.com/q/26459066
type: Question
possible better answer: http://stackoverflow.com/a/26459160
has title: Import css and js to PHP codeigniter
accepted answer: http://stackoverflow.com/a/26459090
tagged with: javascript
answer count: 2
has body: So, Everything works fine in my HTML And here is the body: Proceed Proceed Proceed Proceed Proceed Proceed Proceed Proceed Proceed Proceed My Question is: How to do that in my CodeIgniter: This is my view in my CodeIgniter: <?php if(is_array($posting)){ //This function is purposed to retrieve from Daabase echo ' '; foreach($posting as $key){ $judul = ' '.$key->tbl_name.' '; echo $judul; } echo ' '; } But now it's only work for 'draggable' only. How to do it for 'draggable2' - 'draggable10'?
has answer: http://stackoverflow.com/a/26459090
tagged with: php
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26459160
score: 0
tagged with: codeigniter

http://stackoverflow.com/comment/41570443
has text: like this `$("#calendar").fullCalendar({ events: result });`
score: 0
comment on: http://stackoverflow.com/q/26466270
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26384920
answers question: http://stackoverflow.com/q/26384211
score: 0
type: Answer
has body: You have a couple of approaches, which will vary on your technology. If your project is using: Web-Forms: Example: &lt;div&gt; &lt;span&gt;&lt;%= GetData(Eval("Data Column").ToString()) %&gt;&lt;/span&gt; &lt;/div&gt; That would be your front end, you notice how your exposing the method. protected string GetData(string content) { // Do Something. } That is the code behind, which is your method. It must be protected or public it can not be private. Web-Method: This is viable, but as mentioned above it isn't supported anymore. So I won't provide an example, though they exist. Model View Controller: Example: &lt;div&gt; &lt;span&gt;@{ ClassName.GetData() }&lt;/span&gt; &lt;/div&gt; That is the front end, as you notice you use Razor to expose the method from behind. That will help you call a method from the Controller. Those are a couple of approaches, hopefully that points you in the right direction.

http://stackoverflow.com/q/26469741
tagged with: django
tagged with: python
tagged with: jqplot
tagged with: http://stackoverflow.com/tag/json
has title: Parameter required for django view with json decorator - how?
type: Question
has body: I have a django page (search_form.html) with a form text field/button that triggers an action that goes and searches a database with the value entered. The results are displayed on another django page (search_results.html). The form snippet from the search_form.html looks like this: Partner ID I have the following in my app urls.py url(r'^search_form/$', views.search_form, name='search_form'), url(r'^search_results/$', views.search_results, name='search_results'), And I have the following in views.py def partner_search(request): error = False if 'partnerQ' in request.GET: q = request.GET['partnerQ'] if not q: error = True else: my_data = MyTable.objects.filter(dbField__icontains=q) return render(request, 'myapp/search_results.html', {'mydata': my_data, 'query': q}) return render(request, 'myapp/search_form.html', {'error': error}) This works ok, but my problem comes when I want to include a jqplot graph in the results page, but the data to be plotted on the graph needs a DB Query based on the partnerQ string passed to the above views.py method. So I have a separate method that is meant to create the JSON data for jqplot in my views.py. So the additional entry in urls.py looks like: url(r'^my_plot_json/$', views.my_plot_json, name='my_plot_json'), The views.py method (which still needs to string from the search field - don't know how to capture this) looks like the following. Note - I know this won't work as I haven't passed q @render_to_json() def my_plot_json(request): mydata = MyTable.objects.values("iDate").filter(dbField__icontains=q).annotate(Count("id")) jsondataset = [[str(z['iDate']), z['id__count']] for z in mydata] return [jsondataset] The corresponding javascript snippet looks like this: function populateGraph() { $.get('/myapp/my_plot_json', function(data) { drawTwelveMonthPlot(data); }); } So my problem in summary is this _ I need to perform a separate DB query to generate the JSON data for my jqPlot graph but I can't figure out how to capture the searc…
has answer: http://stackoverflow.com/a/26470508
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/26375996

http://stackoverflow.com/q/26354510
tagged with: javascript
has answer: http://stackoverflow.com/a/26355053
favorite count: 0
has title: What is a resource in the resource.received context of events in Casperjs?
tagged with: casperjs
has body: What exactly is a resource in the resource.received event context of Casperjs ? What is its structure, I know it has a .url attribute but what else ? How can I learn more about it ?
upvote count: 1
accepted answer: http://stackoverflow.com/a/26355053
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/43123804
comment on: http://stackoverflow.com/a/26398551
type: AnswerComment
score: 0
type: Comment
has text: It's not returning an array with values [0,1,2]. It returns an array of 3 functions, each when invoked will return 0,1,2 respectively, and that's the whole point and the sophisticated expression f()[0](). this answer is not correct.

http://stackoverflow.com/q/26493389
has body: I have a button (add to bag) to transfer detail of product in the pop up table. However, this far the code I have is only able to transfer one detail of product to the pop up table. Since I have many list of products, I have to transfer this detail of product in one pop up table. How to make this pop up table is filled with information based on the product which is clicked by customer? This is the fiddle: http://jsfiddle.net/Alkasih/whjc0tta/1/ This is the html code that show the list of product (in this example I will only show two list of products) Forbiden Rice Good Rice 200.000 Add to bag Buy Not Forbiden Rice Good Rice 200.000 Add to bag Buy Berikut kami tampilkan bon belanja Anda hari ini. Pastikan seluruh spesifikasi sesuai dengan kebutuhan Anda. Product Name Description Price Processed Cancel Pesanan Anda akan expired pada tanggal: And here is the javascript that trasnfer the details of one product to the pop up table: $('#productName-content').html($('.product-name').val()); $('#productName-content').html($('.product-name').html()); $('#description-content').html($('.content-info').val()); $('#description-content').html($('.content-info').html()); $('#priceContent').html('Rp. ' + $('.price-info').html());
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26494541
type: Question
has title: Transfer each details in one pop up table on click
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26494541

http://stackoverflow.com/comment/41444106
has text: That didn't work, the page just refreshes but nothing changes.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26395617

http://stackoverflow.com/comment/41747358
type: Comment
has text: See my edit (It's an ugglier solution i know, but it'll work)
score: 0
comment on: http://stackoverflow.com/a/26485139
type: AnswerComment

couchdb
tags question: http://stackoverflow.com/q/26419061
tags question: http://stackoverflow.com/q/26424316
tag name: couchdb
type: Tag
tags question: http://stackoverflow.com/q/26427552
tags question: http://stackoverflow.com/q/26436821

http://stackoverflow.com/comment/41634899
comment on: http://stackoverflow.com/a/26479200
has text: Marking this as "the answer" because it gave some useful workarounds to the Total Absence of Sane Error-Reporting, because no one else even bothered to try, and because an honest 'no answer exists' means few will help me in the future. Many of my difficult questions are tumbleweeds, and most SO people see that reflected in my profile, and look for "easier points," rather than challenges. Thank you jfriend00, for your input and courage.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41445374
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26392957
has text: have you tried bootstrap datepicker its easy. If you want the code I can provide which you can use.
score: 0

http://stackoverflow.com/q/26446846
has comment: http://stackoverflow.com/comment/41536153
linked to: http://stackoverflow.com/q/26312998
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26446918
answer count: 1
downvote count: 1
tagged with: initialization
favorite count: 0
upvote count: 0
type: UnansweredQuestion
has title: Adding API options to initialization script?
type: Question
has body: I'd like to add the following API options to my fancybox initialization script, following an advice given by someone in this forum (Saving images in Fancybox). Adding these options are said to increase the margins on the sides when fancybox images are opened. But, the problem is I don't know how/where to add. This is my initialization script: &lt;script type="text/javascript"&gt; $(document).ready(function() { $(".fancybox").fancybox(); }); And this is the API options suggested: margin : [20, 60, 20, 60] Can anybody help me add the API into the script? (And What's API? excuse my ignorance)

http://stackoverflow.com/a/26502998
has body: For event delegation the syntax should be: .on( events [, selector ] [, data ], handler ) Change: $(document).on("#checkallmails","click", function() { To: $(document).on("click", "#checkallmails", function() { But it doesn't seem you need to delegate the event, also the each call is not necessary, prop iterates through the collection behind the scenes: $('#checkallmails').on("change", function() { $('input:checkbox.mail-checkbox').prop("checked", this.checked); });
type: AcceptedAnswer
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26502956
answers question: http://stackoverflow.com/q/26502956
downvote count: 0
score: 1

http://stackoverflow.com/q/26488043
has answer: http://stackoverflow.com/a/69267331
has body: If i have a variable that returns a date, in the format of dd MMM yyyy, so 28 Aug 2014, how can i get the date of the previous month. I can modify the month via: $scope.DateMapping = function (months) { var myVariable = "28 Aug 2014" var makeDate = new Date(myVariable); prev = new Date(makeDate.getFullYear(), makeDate.getMonth()+1, 1); }); Essentially, this is adding one to the Month.. But how can i account for years, so if the current date is 12 Dec 2014, the previous would be 12 Jan 2013? My application is using AngularJS can make use of filters. UPDATE: var myVariable = "28 Aug 2014" var makeDate = new Date(myVariable); var prev = new Date(makeDate.getFullYear(), makeDate.getMonth()+1, makeDate.getMonth()); console.log(myVariable) console.log(makeDate) console.log(prev) Output: 28 Aug 2014 Thu Aug 28 2014 00:00:00 GMT+0100 (GMT Standard Time) Mon Sep 01 2014 00:00:00 GMT+0100 (GMT Standard Time) How comes although the month has incremented, the day is showing as 01 instead of 28?
answer count: 8
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41610352
possible better answer: http://stackoverflow.com/a/26488154
has answer: http://stackoverflow.com/a/26488215
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/64393325
has title: Javascript - Get Previous Months Date
has comment: http://stackoverflow.com/comment/41611520
downvote count: 0
has answer: http://stackoverflow.com/a/26488154
upvote count: 16
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26488640
accepted answer: http://stackoverflow.com/a/26488640
has answer: http://stackoverflow.com/a/26488397
has answer: http://stackoverflow.com/a/72470882
has answer: http://stackoverflow.com/a/61081671
score: 16
type: Question

http://stackoverflow.com/comment/41498026
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26426078
type: Comment
has text: Thanks! I de-linted and did a text comparison tool. Looks to be working now.

http://stackoverflow.com/q/26423459
tagged with: getelementbyid
favorite count: 0
has title: innerHTML on keypress - cannot get content
has body: I have a function which should grab the innerHTML of a textarea when the enter key is pressed. The function seems to work with the key press, however the following line returns nothing: var currentHTML = document.getElementById("postcontent").innerHTML; I can't work out what's wrong with the line as it remains empty. I've created a JS fiddle. Type something in the box and press enter, it should give you some console messages. You'll see that currentHTML remains empty when it should be grabbing the content. http://jsfiddle.net/w4L7c2qh/1/
has answer: http://stackoverflow.com/a/26423491
accepted answer: http://stackoverflow.com/a/26423491
tagged with: innerhtml
has answer: http://stackoverflow.com/a/26423684
downvote count: 1
type: AnsweredQuestion
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26423684
tagged with: javascript
score: 0
upvote count: 1

http://stackoverflow.com/comment/41399801
comment on: http://stackoverflow.com/a/26370860
type: Comment
has text: Google is your best friend. First figure out how you want to solve a problem, then just look up how to do it. That's my usual approach, anyways. Good luck!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41559771
type: QuestionComment
has text: @SimranjeetSingh i also can get 404 frist,then the js run
comment on: http://stackoverflow.com/q/26459753
score: 0
type: Comment

http://stackoverflow.com/comment/41578053
type: Comment
type: QuestionComment
has text: or === if they are all of the same type.
comment on: http://stackoverflow.com/q/26470087
score: 0

http://stackoverflow.com/comment/41462988
score: 0
type: QuestionComment
type: Comment
has text: The error says you can't have META tags in your code, yet I see `meta` tags in the code you've provided - is this the problem?
comment on: http://stackoverflow.com/q/26407129

http://stackoverflow.com/q/26429486
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26429553
score: 0
answer count: 2
has title: Javascript- How to store string by searching for first couple letters
has comment: http://stackoverflow.com/comment/41503889
linked to: http://stackoverflow.com/q/646628
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26433390
has body: I have a question on how to store a string in Javascript when you only know the first couple letters. Here is an example. The HTML code is this: <TITLE>Your Title Here Link Name is a link to another nifty site This is a Header This is a Medium Header Send me mail at support@yourcompany.com. This is a new paragraph! Persons's Name/A> This is a new paragraph! This is a new sentence without a paragraph break, in bold italics. I need to store the full string of '003U0000015Rmza', but I will only know that it starts with '003'. Is there a way in Javascript to search for the characters '003', and once it's found, store the full string in a variable? Thanks in advance!

http://stackoverflow.com/comment/41602766
type: Comment
comment on: http://stackoverflow.com/q/26483895
has text: So just reverse the opacities? Set the opacity in :hover:after to 0, and the opacity in the starting class to 1. Or am I not understanding?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41606185
score: 0
has text: I've added the diffference between HTML5 and MVC controls
comment on: http://stackoverflow.com/a/26485224
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41425132
type: AnswerComment
has text: Added some code above. I took your HTML and their jQuery and seemed to work for me? Did you include a reference to the jQuery library?
type: Comment
comment on: http://stackoverflow.com/a/26385298
score: 0

http://stackoverflow.com/q/26505811
answer count: 0
linked to: http://stackoverflow.com/q/10087819
has comment: http://stackoverflow.com/comment/41643495
has body: How can I convert a string: Mon, 28 Jul 2014 09:33:44 GMT to PST? using angular JS (preferable) or rather javascript. I went through other thread but didn't find any to the point/complete/crisp solution. People say we should not handle date/time zone myself, so is it mandatory to use some existing lib? if so suggest some good lib and its implementation.
type: Question
has comment: http://stackoverflow.com/comment/41642421
has title: convert GMT to PST in Angular JS
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/41655946
has comment: http://stackoverflow.com/comment/41642580
score: 0
tagged with: angularjs
tagged with: timezone
type: UnansweredQuestion

http://stackoverflow.com/comment/41645570
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26506138
has text: seems to use node.js, which is the route I'm looking at the moment (https://github.com/chjj/tty.js/)

http://stackoverflow.com/a/26394937
type: Answer
has body: You can store the divs map first, then do what you want. Like this: $(document).ready(function () { var divsMap = { 'cuidamos': 'cuidado', 'products': 'sabor', 'encuentranos': 'locat' }; $(window).scroll(function () { $.each(divsMap, function(key, item){ var topOfDiv = $('#'+key).offset().top - 490; if ($(window).scrollTop() &gt; topOfDiv) { //scrolled past the other div? $('#'+item).fadeIn(); //reached the desired point -- show div } else { $('#'+item).fadeOut(); } }); }); });
upvote count: 1
has comment: http://stackoverflow.com/comment/41442061
answers question: http://stackoverflow.com/q/26394851
downvote count: 0
score: 1

http://stackoverflow.com/q/26492191
has answer: http://stackoverflow.com/a/26492567
has body: I'm looking for a solution or actually is there any code that would disable the opening of a new window/tab using Mailchimp form? I've got javascript and php taking care of the "thank you" div that is shown and the form div being hidden upon submit... however, it still processes the New Window / Tab function as well. Any easy way to stop that from happening?
upvote count: 2
has title: How to disable new window on submit mailchimp
has comment: http://stackoverflow.com/comment/83094316
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 2
downvote count: 0
type: UnansweredQuestion
tagged with: php
type: Question

http://stackoverflow.com/comment/41381809
score: 0
type: AnswerComment
has text: make page default value to 1
type: Comment
comment on: http://stackoverflow.com/a/26361164

http://stackoverflow.com/a/26355741
has body: Your js function is named verifyReleaseOtherEmployeesCase but in the OnClientClick it says verifyReleaseOtherWorkersCase, assuming that is a typo you also need to prevent the first button from performing a postback. Notice the return of false in the js function and the return in the OnClientClick function verifyReleaseOtherEmployeesCase() { var logonUser = document.getElementById('&lt;%= HiddenLogonUser.ClientID %&gt;'); var lockedBy = document.getElementById('&lt;%= HiddenLockedBy.ClientID %&gt;'); var button = document.getElementById('&lt;%= ButtonFrigivHidden.ClientID %&gt;'); if (logonUser.value == lockedBy.value) { button.click(); } else if (confirm("Danish confirm message")) { button.click(); } return false; } &lt;asp:Button ID="ButtonFrigiv" runat="server" Text="Frigiv sag" CssClass="button" OnClientClick="return verifyReleaseOtherEmployeesCase()" /&gt;
has comment: http://stackoverflow.com/comment/41371761
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26355101
answers question: http://stackoverflow.com/q/26355101
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41577899
type: QuestionComment
has text: After some more testing I updated my question. The problem occurs whenever another element gains focus. Not when the select box in question loses focus.
score: 0
comment on: http://stackoverflow.com/q/26468770
type: Comment

http://stackoverflow.com/a/26397329
type: Answer
score: 5
has body: Try this, alert($( "input[myattr='navo']" ).val()); in jQuery value can be get using the method val(), it doesn't have any property like value.
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/26397317

http://stackoverflow.com/comment/41550836
has text: Thanks, this has led me to the solution. I feel kind of dumb - I had two nested callbacks which both used a variable named "data", so evidently I was trying to read the "name" field from the "data" object, which was overwritten by the 2nd "data" object in the inner function.
comment on: http://stackoverflow.com/a/26441769
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26410350
has comment: http://stackoverflow.com/comment/41468879
has comment: http://stackoverflow.com/comment/41468949
has comment: http://stackoverflow.com/comment/41468923
has answer: http://stackoverflow.com/a/26410546
has comment: http://stackoverflow.com/comment/41469077
has comment: http://stackoverflow.com/comment/41468881
upvote count: 6
answer count: 4
downvote count: 6
has body: Just noticed a peculiar side effect of automatic type casting in JS: if (false || false) { } Is the same as: if (false + false) { } And both (false || true) and (false + true) will return the same result (true). Why doesn't the + see more use in this case? Is there a solid reason (besides possibly confusing code) that we shouldn't use + in place of ||? I imagine there might be a performance hit due to extra casting, but hey--we're saving a character! Yay for one micro-optimization in place of another!
has comment: http://stackoverflow.com/comment/41468858
has title: Is it bad to use + in place of ||?
possible better answer: http://stackoverflow.com/a/26410489
has answer: http://stackoverflow.com/a/26410484
has answer: http://stackoverflow.com/a/26410489
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26410568
accepted answer: http://stackoverflow.com/a/26410546
has comment: http://stackoverflow.com/comment/41468889
tagged with: javascript
has comment: http://stackoverflow.com/comment/41469010
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41469440
has comment: http://stackoverflow.com/comment/41468866
favorite count: 0
has comment: http://stackoverflow.com/comment/41468956
has comment: http://stackoverflow.com/comment/41468920
has comment: http://stackoverflow.com/comment/41468936

http://stackoverflow.com/a/26416467
type: Answer
has comment: http://stackoverflow.com/comment/41480206
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26416448
downvote count: 0
has body: $(function() { $( 'a.video-preview' ).on( 'click', function( e ) { e.preventDefault(); jwplayer('video-player').play(); }); });
has comment: http://stackoverflow.com/comment/41480380

http://stackoverflow.com/comment/41571009
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26465335
has text: @GuyT: that's ok, i've just want to be sure, OP and others who will see the comments wont learn that the data should be always object.

http://stackoverflow.com/q/26500398
tagged with: pouchdb
downvote count: 4
has answer: http://stackoverflow.com/a/28351770
has answer: http://stackoverflow.com/a/26500513
has body: I want to use JavaScript database in my app to store model data, So once data is received from server I will store data in database this will minimize web service communication with server. But I really don't know which library should I use to implement database in my JavaScript (angularJS) application. Also I do not want to store data in local-storage/ web-storage for security concern. Is there any JavaScript database available to store data?
favorite count: 0
tagged with: angularjs
type: Question
score: -1
upvote count: 3
answer count: 3
has title: Which database should I use in JavaScript (AngularJS) application?
tagged with: taffydb
has answer: http://stackoverflow.com/a/28344673
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/45547868

memory-leaks
tags question: http://stackoverflow.com/q/26414131
tags question: http://stackoverflow.com/q/26390230
tags question: http://stackoverflow.com/q/26361705
type: Tag
tags question: http://stackoverflow.com/q/26398015
tag name: memory-leaks

http://stackoverflow.com/comment/41482908
type: QuestionComment
has text: @ThomasSebastian Of course, just wanted to flag that the lack of `;` would not affect the code whatsoever in its current state.
comment on: http://stackoverflow.com/q/26417934
score: 0
type: Comment

http://stackoverflow.com/q/26470858
tagged with: jquery
tagged with: ajax
answer count: 1
tagged with: asp.net
type: UnansweredQuestion
has body: I have a problem in my project about google Maps. When I use an ajax call to display map, it didn't appear. It works normally when I do not use ajax. I don't know if there are problems of synchronisation in Map loading. Any help please. This is a part of my code: ajax call: view where I want to display the map: @model IEnumerable<PFE.Models.ptVente> @{ ViewBag.Title = "MapPtVente"; } @foreach (var item in Model){ }
score: 0
has answer: http://stackoverflow.com/a/26471028
type: Question
tagged with: google-maps
has title: display google Map with an ajax call in Asp.net
tagged with: javascript

http://stackoverflow.com/q/26405051
upvote count: 2
score: 1
linked to: http://stackoverflow.com/q/4195970
has comment: http://stackoverflow.com/comment/41459257
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41458826
has comment: http://stackoverflow.com/comment/41459656
has answer: http://stackoverflow.com/a/26405531
tagged with: javascript
has comment: http://stackoverflow.com/comment/41459080
has comment: http://stackoverflow.com/comment/41459164
answer count: 2
has comment: http://stackoverflow.com/comment/41459550
tagged with: jquery
has body: I have table type structure made of DIV elements. I have made a expand/collapse type list. I have this icon that i want to change if it expands and reset it back if I collapse the list. The two icons are linked to 2 classes. $('.rowHead_but i', this ).removeClass('icon-double-angle-down'); and $('.rowHead_but i', this ).addClass('icon-double-angle-up'); Okay it removes the class successfully and adds the new class, but it does it for all rows. I only want this row to be affected. What Im I doing wrong? 2014-10-10 2014-10-10 2014-10-10 JQuery code $('.notificationDetail').on('click','.header', function(e){ e.stopPropagation(); $(function() { var classTst_down = $('.rowHead_but i', this ).hasClass( "icon-double-angle-down" ); var classTst_up = $('.rowHead_but i', this ).hasClass( "icon-double-angle-up" ); if ( classTst_down ) { console.log('remove down'); $(this ).removeClass('icon-double-angle-down'); console.log('removed'); $(this ).addClass('icon-double-angle-up'); console.log('added'); } if ( classTst_up ){ console.log('remove up'); $(this ).addClass('icon-double-angle-down'); $(this ).removeClass('icon-double-angle-up'); } }); });
favorite count: 0
accepted answer: http://stackoverflow.com/a/26405531
has comment: http://stackoverflow.com/comment/41459708
has comment: http://stackoverflow.com/comment/41459339
has title: remove class and add class on single element
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26405580
has comment: http://stackoverflow.com/comment/41458979
has comment: http://stackoverflow.com/comment/41459229
has answer: http://stackoverflow.com/a/26405580

http://stackoverflow.com/comment/41416868
type: Comment
comment on: http://stackoverflow.com/a/26380833
score: 1
has text: @Vladimirs: Nonetheless, it is inappropriate. It's not how things are done here. Post complete answers, not incomplete ones.
type: AnswerComment

http://stackoverflow.com/q/26483358
type: AnsweredQuestion
tagged with: wordpress
has title: JavaScript CJT using a Combobox to change picture
type: Question
tagged with: javascript
tagged with: image
has answer: http://stackoverflow.com/a/26484231
score: 0
answer count: 1
has body: Im new to using java script and im using the CJT plugin for wordpress. Ive been trying to make a picture change when a different value is selected in a combo box but i am having trouble getting it to work. Im not sure where im going wrong and would like someone to explain what im doing wrong. The code that i have is as follows: Picture 1 Picture 2 Picture 3 Picture 4 Picture 5 (url) is the correct url for the image.
tagged with: combobox
accepted answer: http://stackoverflow.com/a/26484231

http://stackoverflow.com/comment/55129691
comment on: http://stackoverflow.com/a/26500766
type: AnswerComment
has text: ^ `mmm/DD/YYYY` is not a valid format, you're looking for: `var newDate = moment("Nov/21/2015", "MMM/DD/YYYY").format("MM/DD/YYYY");alert(newDate);`
type: Comment
score: 1

http://stackoverflow.com/q/26467287
type: Question
has comment: http://stackoverflow.com/comment/41572762
has comment: http://stackoverflow.com/comment/41573250
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41572419
has comment: http://stackoverflow.com/comment/41572488
has answer: http://stackoverflow.com/a/26467442
answer count: 2
tagged with: flot
has answer: http://stackoverflow.com/a/26467891
possible better answer: http://stackoverflow.com/a/26467442
has comment: http://stackoverflow.com/comment/41572459
favorite count: 0
has comment: http://stackoverflow.com/comment/41572871
has body: How would I display values on a Flot bar chart using my PHP variables, rather than using static data? I am not sure if the PHP has to be inside the JavaScript or how it should be formatted. Afterwards, I would like to echo my variables inside the var data. For example, instead of saying... $london = mysqli_num_rows($londonc); $Newyourk = mysqli_num_rows($Newyourkc); $Taipei = mysqli_num_rows($Taipei); $NewDelhi= mysqli_num_rows($NewDelhi); var data = [ [0, 11], //London, UK [1, 15], //New York, USA [2, 25], //New Delhi, India [3, 24], //Taipei, Taiwan [4, 13], //Beijing, China [5, 18] //Sydney, AU ]; ...I'd like to use my PHP variables in a way something like this: var data = [ [0, &lt;?php echo '['.($London).']'?&gt;], //London [1, &lt;?php echo '['.($NewYork).']'?&gt;], //New York [2, &lt;?php echo '['.($NewDelhi,).']'?&gt;], //New Delhi, [3, &lt;?php echo '['.($Taipei).']'?&gt;], //Taipei [4, &lt;?php echo '['.($Beijing).']'?&gt;] //Beijing ];
tagged with: php
has title: Passing PHP variables into Flot charts
type: AnsweredQuestion
upvote count: 2
score: 1
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26467891
downvote count: 1

http://stackoverflow.com/a/26725034
score: 2
downvote count: 0
has body: Marketo Forms 2.0 provides a method called whenReady, which allows you to specify a callback function when the Marketo Form reaches its ready event. So you can use this method to notify the client when the Marketo Form has loaded. Please see the Marketo developer documentation for more information.
answers question: http://stackoverflow.com/q/26406652
upvote count: 2
type: Answer

http://stackoverflow.com/comment/41457863
type: QuestionComment
has text: @SinanSamet You should show a screenshot of the data being returned from PHP (via dev tools). More than likely it's invalid/not what you're expecting
score: 1
comment on: http://stackoverflow.com/q/26404405
type: Comment

http://stackoverflow.com/q/26418505
score: 1
accepted answer: http://stackoverflow.com/a/26418525
type: Question
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26418525
upvote count: 1
favorite count: 0
has body: I am trying to form the following structure { "details": [ { "id": 1, "index": "index" }, { "id": 2, "index": "index" } ], "user": "user" } For that iam trying var order = []; $('.movables').each(function(index, element){ var id = $(this).children().attr('id'); order.push({'id': id, 'index' : index}); }); order.push('user',user); It gives wrong format. I dont know how to form that above structure. I am getting id, index value from each method. It is working fine. Iam getting id, index &amp; user values but i dont know how to form
has title: form the array value in javascript
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/41524100
type: QuestionComment
has text: I did. Perhaps I missed something?
score: 0
comment on: http://stackoverflow.com/q/26440005
type: Comment

http://stackoverflow.com/q/26385985
has answer: http://stackoverflow.com/a/40182120
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Removing zero value point lables on a Jqplot stacked bar chart
has answer: http://stackoverflow.com/a/26389710
type: Question
upvote count: 2
answer count: 2
has body: I am having trouble removing the zeros (point lables) in a Jqplot stacked bar chart. I tried 'hideZero', but it's not working at all. I tried different things; not sure what's wrong. I have imported the following packages: jqplot.barRenderer.min.js jqplot.canvasAxisLabelRenderer.min.js jqplot.canvasAxisTickRenderer.min.js jqplot.canvasTextRenderer.min.js jqplot.categoryAxisRenderer.min.js jqplot.pointLabels.min.js jquery-2.0.3.js jquery.jqplot.min.css jquery.jqplot.min.js Here is the JavaScript: var s3 = [11, 28, 22, 47, 11, 11]; var s1 = [0, 6, 3, 0, 0, 0]; var s2 = [1, 0, 3, 0, 0, 0]; var dataArray = [s3, s1, s2]; var ticks = ['John', 'Tumm', 'Wen', 'Ken', 'Dolly']; var options = { title: 'Title ', stackSeries: true, seriesColors: ["#eb4b3d", "#ffc800", "#009149"], seriesDefaults: { renderer: $.jqplot.BarRenderer, pointLabels: { show: true }, rendererOptions: { barWidth: 25, varyBarColor: true, }, }, axes: { xaxis: { // renderer: $.jqplot.CategoryAxisRenderer, // renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks, }, yaxis: { //autoscale: true, //label: 'Application Count', min: 0, tickInterval: 5, max: 50 } }, axesDefaults: { tickRenderer: $.jqplot.CanvasAxisTickRenderer, tickOptions: { angle: -30, fontSize: '10pt' } } }; var plot = $.jqplot('chartDivId', dataArray, options); HTML: &lt;div id="chartDivId"/&gt; There is a JSFiddle of this problem.
accepted answer: http://stackoverflow.com/a/26389710
tagged with: jqplot
possible better answer: http://stackoverflow.com/a/40182120
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/41464566
comment on: http://stackoverflow.com/q/26407874
has text: You most likely have a character encoding problem. Which means, there could be a lot going on that is causing your problem. Setting the page encoding as @Superdrac suggests might help. But my recommendation is to check the character encoding at every step and make sure everything is lined up correctly. Lower probability at this point, but you could also be dealing with microsoft special characters.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41496023
type: AnswerComment
type: Comment
has text: T.J. Crowder's suggestions aside, you should _never_ use `i = i++`. That doesn't even make sense (was it a typo?).
score: 1
comment on: http://stackoverflow.com/a/26425238

http://stackoverflow.com/a/55143631
has comment: http://stackoverflow.com/comment/121667254
has body: The FormData has a delete method. So, you can just iterate through the hidden/disabled fields from the form you used to create the FormData and delete the ones you don't want in the object: // $form is a jQuery object of the form in question var formData = new FormData($form[0]); form.find(':hidden').each(function(i, field) { var fname = $(field).attr('name'); if(fname) { formData.delete(fname); } });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26405936
upvote count: 3
score: 3

http://stackoverflow.com/a/26429040
answers question: http://stackoverflow.com/q/26428855
has body: Try this: var width = $(".holder").width(); setInterval(function () { $(".cube").fadeIn("fast").css({ left: "0%" }).animate({ left: "+=50%" }).animate({ left: "+=5%" }, width).animate({ left: "+=45%" }).fadeOut("fast"); }, 2500); FIDDLE.
type: Answer
score: 0

http://stackoverflow.com/q/26478674
has answer: http://stackoverflow.com/a/26479227
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26479227
type: Question
has title: Readonly textboxes are missing from Request.Form collection
has body: In one of my page, I have few text boxes which are set to readonly based on the user selection. All of these buttons are missing from the Request.Form collection, during postback. I have no idea why it is happening. But, I tried few things. a) disabling or setting the text box to readonly mean control will be missing from postback collection. b) if view state is set to true, then only the first read only control is posted. others still fail. c) tried manually enabling the control right before postback. no change. So, here I am trying to find some ideas to test.
answer count: 1
tagged with: javascript
tagged with: asp.net

http://stackoverflow.com/comment/41600188
score: 1
comment on: http://stackoverflow.com/q/26482268
has text: Take a look at [ADsafe](http://www.adsafe.org/). Note however that users can execute any code they want by just opening up the JavaScript console (`Ctrl` + `Shift` + `I`).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41559091
comment on: http://stackoverflow.com/q/26459708
score: 0
type: Comment
type: QuestionComment
has text: yes,i declare it in my controllers` $scope.previouspage = function previouspage() { $scope.page -= 1; $scope.getCr(); };`

http://stackoverflow.com/q/26512257
tagged with: javascript
tagged with: gruntjs
has title: Only render pages I've changed with Assemble
upvote count: 2
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: 2
has body: I've been using assemble to create a pattern library. I have a pattern as different files that all get built into one file. I also have a number of pages that are the templates for the HTML. The problem is that if I change one thing on any of the files I have to wait for the whole thing to be rendered, this is taking up to 30sec due to the amount of pages I have. As you can imagine, this can get frustrating and I'm only half way through the project. Does anyone know of a way to make Grunt only render the pages I have changed rather than all of them? Below is my Gruntfile.js: 'use strict'; module.exports = function(grunt) { // 1. All configuration goes here grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { dist: { src: [ 'vendor/jquery-ui/ui/core.js', 'vendor/jquery-ui/ui/widget.js', 'vendor/jquery-ui/ui/accordion.js', 'vendor/jquery-ui/ui/datepicker.js', 'javascript/slick/slick.js', 'vendor/magnific-popup/dist/jquery.magnific-popup.min.js', 'vendor/heapbox/src/jquery.heapbox-0.9.4.js', 'vendor/jquery-waypoints/waypoints.js', 'vendor/jquery-waypoints/shortcuts/sticky-elements/waypoints-sticky.js', 'javascript/*.js' ], dest: 'public/javascript/scripts.js' } }, uglify: { build: { src: 'public/javascript/scripts.js', dest: 'public/javascript/scripts.min.js' } }, copy: { main: { src: [ 'vendor/jquery/dist/*.js', 'vendor/prismjs/*', 'vendor/bigSlide/**', 'vendor/bigSlide/**', 'vendor/magnific-popup/dist/*', 'images/*' ], dest: 'public/' } }, sass: { dist: { options: { style: 'compressed' }, files: { 'public/css/style.min.css': 'scss/style.scss' } }, expanded: { options: { style: 'expanded' }, files: { 'public/css/style.css': 'scss/style.scss' } } }, watch: { all: { files: ['*.hbs', 'patterns/*.hbs', 'layouts/*.hbs', 'templates/*.hbs'], tasks: ['assemble'], options: { spawn: false } }, css: { files: ['scss/*.scss', 'scss/**/*.scss'], tasks: ['sass'], options: { spawn: false } }, copy: { files: ['images/*', 'vendor/*', 'CHANGELOG'], tasks: ['copy'], opt…
downvote count: 0
tagged with: grunt-contrib-watch
has answer: http://stackoverflow.com/a/26512384
tagged with: assemble
type: Question

http://stackoverflow.com/comment/41586721
type: Comment
type: QuestionComment
has text: @remixdesign Not necessary for PHP.
comment on: http://stackoverflow.com/q/26474600
score: 0

http://stackoverflow.com/comment/41426533
comment on: http://stackoverflow.com/a/26385878
type: AnswerComment
type: Comment
has text: I am tring again to see if i missed anything
score: 0

http://stackoverflow.com/a/50968552
has body: Self timer,when you want to start a new Exam : request.getSession().setAttribute("totalNumberOfQuizQuestions",document.getElementsByTagName("totalQuizQuestions").item(0).getTextContent()); request.getSession().setAttribute("quizDuration",document.getElementsByTagName("quizDuration").item(0).getTextContent()); request.getSession().setAttribute("min",document.getElementsByTagName("quizDuration").item(0).getTextContent()); request.getSession().setAttribute("sec",0);
type: Answer
answers question: http://stackoverflow.com/q/26378587
score: 0

http://stackoverflow.com/q/26439175
favorite count: 0
has body: When I check the application installed or not using custom URL with JavaScript then application jump to the application but if app is not installed then redirect to blank page myschema://details?parameters if installed then working fine and open both link that i redirect in my code play store as well as custom URL that I configured in android apps. Below is my code (same logic I implemeted in iOS app and it's working fine) var now = new Date().valueOf(); setTimeout(function(){ if (new Date().valueOf() - now &gt; 100) return; window.location = "https://play.google.com/store/apps/details?id=my.apps.package";//play store URL. },25); window.location = "myschema://details?parameters";//custom url Is there any way to jump on custom URL if not installed apps then redirect to play store URL?
upvote count: 2
type: UnansweredQuestion
tagged with: android
score: 2
answer count: 0
type: Question
linked to: http://stackoverflow.com/q/12856773
has title: How to detect android application installed or not through web page, if not installed then stay there or redirect to apps store
tagged with: javascript
tagged with: jquery
downvote count: 0

http://stackoverflow.com/q/26463694
has title: Generate google map error
answer count: 2
tagged with: google-maps
upvote count: 1
possible better answer: http://stackoverflow.com/a/26463843
has answer: http://stackoverflow.com/a/26463843
tagged with: jquery
favorite count: 0
has body: I have the following script which supposed to generate a basic google map: $(document).ready(function(){ var weatherAPP = { generateMap: function(){ console.log('called'); var mapHolder = document.getElementById('#map'); var mapOptions = { center: new google.maps.LatLng(51.5072, 0.1275), zoom:10, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(mapHolder, mapOptions); } }; weatherAPP.generateMap(); }); console.log('called') gets called fine. I have included the following scripts in order: google maps api jquery script However I am getting the following error: Uncaught TypeError: Cannot read property 'offsetWidth' of null
has comment: http://stackoverflow.com/comment/41565842
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26463815
has comment: http://stackoverflow.com/comment/41565863
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/26463815
tagged with: javascript

http://stackoverflow.com/comment/41593125
score: 0
type: Comment
has text: It's not for a company. I am doing this website on my own, mainly for practice for when I land a job. Point taken, though.
type: QuestionComment
comment on: http://stackoverflow.com/q/26477111

http://stackoverflow.com/q/26502406
has title: Accessing "private" members within an anonymous function outside scope
has comment: http://stackoverflow.com/comment/41636680
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41637477
favorite count: 0
has comment: http://stackoverflow.com/comment/41637645
has comment: http://stackoverflow.com/comment/41637757
has comment: http://stackoverflow.com/comment/41636927
upvote count: 3
has answer: http://stackoverflow.com/a/26503230
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41636712
score: 3
has body: Basically what I am trying to do, is to provide access to "private" functions/variables for an anonymous function. I need some opinions about two ways I achieve this and possible better alternatives to these approaches. Fiddle Observe the following snippet. function Something() { /*private*/ var _someVariable = 1; /*private*/ function _someFunction() { alert('_someFunction'); } /*public*/this.SomeDelegate1 = function(codeblock) { var members = $.extend({ _someVariable : _someVariable, _someFunction:_someFunction }, this); codeblock.apply(members); } /*public*/this.SomeDelegate2 = function(codeblock) { var caller = eval('(' + codeblock + ')'); caller.apply(this); } } In SomeDelegate1, I convert my private members to instance members and pass it as context to the anonymous function like seen below. var someInstance = new Something(); someInstance.SomeDelegate1( function() { this._someFunction(); alert(this._someVariable); } ); I like the fact that one can specify which members you would like to expose, but it can potentially get quite clunky e.g. when you need to update "private" variables for example. I can obviously write all members as instance members, but I would rather prefer them to stay "private", only allowing access within scope of the callback function. In SomeDelegate2, I use an eval (yes I am aware of all the evils and witchcraft associated with this). var someInstance = new Something(); someInstance.SomeDelegate2( function() { _someFunction(); alert(_someVariable); } ); Since I am injecting code into the function, the "privately" scoped members are automatically available, so I don't need to do any copying of members etc and not a lot of work needs to be done otherwise. Is there fundamental problems with this approach? Do you have better alternatives/approaches to achieve this?
has comment: http://stackoverflow.com/comment/41636827

electron
tags question: http://stackoverflow.com/q/26422639
tag name: electron
type: Tag

http://stackoverflow.com/comment/41497923
type: QuestionComment
has text: If you short the result from the very beginning when you make the query it would be a more accurate result in the browser. Otherwise you can only order the chunk you have on the client side. (chunk = 50 to 100 out of 5000 results)
comment on: http://stackoverflow.com/q/26425308
score: 0
type: Comment

http://stackoverflow.com/a/65146267
downvote count: 1
score: 12
has comment: http://stackoverflow.com/comment/123645921
has comment: http://stackoverflow.com/comment/131315534
has body: One possible way is to use JS to print out the export statements, then in shell to use eval to evaluate it in the current shell. e.g. test.js #!/usr/bin/env node console.log('export A=40; export B=10'); In the shell: eval `./test.js` echo $A
type: Answer
upvote count: 13
answers question: http://stackoverflow.com/q/26464103

http://stackoverflow.com/comment/41403618
comment on: http://stackoverflow.com/q/26373423
type: Comment
type: QuestionComment
has text: Seems to have worked for me. What I get is the number `2` inside a textbox, when I click `OK` I get another textbox appearing, and another if I keep clicking. Is that the expected result you wish to get?
score: 0

http://stackoverflow.com/q/26477733
tagged with: javascript
has body: I'm designing a responsive website and am using media queries to handle the responsiveness. However along with the CSS I want to disable certain jQuery click functions at a certain window width. Right now I can do this successfully on page load but I want to also be able to do it assuming the user resized the window. (paragraph 3) So for example if the user starts off with a really big window on his/her computer and he/she resizes it to be a very small window he/she should not be able to activate the click functions anymore. Conversely if a user starts off with a very small window on his/her computer and resizes it to be very big he/she should be able to activate the click functions. I have tried multiple solutions but none seem to work. Basically I want to make some clickable objects not clickable anymore or at least have them click and do nothing at a certain window width. Simply checking at page load and no other time makes it so that what should happen in paragraph 3 doesn't happen. $(document).ready(function(){ if($(window).width() &gt; 992){ $('#portclick').click(function(){ $('#pagecont').slideToggle(500); $('#icons').slideToggle(500); })}}) $(document).ready(function(){ if($(window).width() &gt; 992){ $('#name').click(function(){ $('#projects').slideToggle(500); })}}) I tried remove the id attribute that I'm using to call the function on at certain window widths and readd them at the width but this doesn't seem to work either. Removing the id doesn't seem to disable to click function at all. And my most recent solution which comes the closest is just to bind the click function to window resize. So far this works but it is extremely buggy so when you get to a width where the click function works and you try clicking it will do the toggle function about 100 times before it stops. But it does sustain the condition described in paragraph 3. $(document).ready(function() { $(window).resize(); }); $(window).resize(function(){ if($(window).width() &gt; 992){ $('#por…
answer count: 3
downvote count: 0
tagged with: jquery
tagged with: click
favorite count: 0
has answer: http://stackoverflow.com/a/26477869
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26478039
score: 2
upvote count: 2
has title: Disabling jQuery click function at certain window size
type: Question
has answer: http://stackoverflow.com/a/26477806
tagged with: responsive-design

http://stackoverflow.com/comment/41412078
type: Comment
has text: @Inferpse Your comment isn't actually correct as the responses in the ticket you cited would not work in all cases when run the context of the extension. See my answer for the correct approach. [**Disclosure**: I am a Crossrider employee]
comment on: http://stackoverflow.com/q/26377933
score: 0
type: QuestionComment

http://stackoverflow.com/q/26475189
tagged with: jquery
has answer: http://stackoverflow.com/a/26475369
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26475369
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26475481
has title: jQuery selectable serialize into an array
accepted answer: http://stackoverflow.com/a/26475481
has body: I have a selectable: 1 2 3 I want to capture every selected item body into a hidden input separated by a comma, so after selecting some items it would look for example like this: where 1,3 are bodies of the items selected. Any examples from the web I tried failed to work. Please note that only selected items have to be captured, if I select some item, then unselect, then select again it should appear only once. How to achieve it?
type: Question
has answer: http://stackoverflow.com/a/26475530
tagged with: jquery-ui
tagged with: javascript

http://stackoverflow.com/comment/41577268
has text: hmm, okay, I'm not a jQuery guru guy, what is jQuery UI? my bad, I don't know.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26462234

http://stackoverflow.com/q/26418580
has comment: http://stackoverflow.com/comment/41484011
has comment: http://stackoverflow.com/comment/41484034
has answer: http://stackoverflow.com/a/26418623
tagged with: javascript
type: UnansweredQuestion
has body: In the below string, 'This "is, "just, for", Test", ignore it. My name is "FirstName, LastName".' I want to replace all Commas(,) only inside the double quotes("") with ###. For now I only found the matching pattern for (""), but need to build the regex to replace the commas. /".*?"/g Could you please help me? Thanks in advance ;) Expected o/p: This "is### "just### for"### Test", ignore it. My name is "FirstName### LastName". Note: This is not dupe of "Find comma in quotes with regex and replace with HTML equiv". Please see my expected o/p(Even I wanna replace the Comma in inner double quotes).
tagged with: regex
linked to: http://stackoverflow.com/q/6335264
type: Question
has title: Javascript: Replace Comma with ### - only with in double quotes(event to match inner double quotes)
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/15268504
has comment: http://stackoverflow.com/comment/41483998

http://stackoverflow.com/comment/41414707
type: Comment
type: QuestionComment
has text: Yes, both are viable, but don't forget about the necessary escaping!
comment on: http://stackoverflow.com/q/26379771
score: 0

http://stackoverflow.com/q/26430316
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41505499
has comment: http://stackoverflow.com/comment/41505665
type: Question
has answer: http://stackoverflow.com/a/26430559
accepted answer: http://stackoverflow.com/a/26430559
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41505462
has comment: http://stackoverflow.com/comment/41505506
answer count: 1
favorite count: 0
has body: I was experimenting with jQuery trying to create a button that fade out all targeted divs one by one and then fade them in again.. I know I can use .each() and loop to accomplish the same thing but as I mentioned I'm trying to understand this part of jQuery . this is the code var divCount = $('.box').length; var counter = 0; $('.button').click(function() { var divAttr = $('.box').eq(counter).attr('class'); if ( divAttr !== 'hidden' &amp;&amp; counter &gt;= 0 &amp;&amp; counter &lt;= divCount){ $('.box').eq(counter).attr('class','hidden'); $('.box').eq(counter).css('background', 'gray'); $('.box').eq(counter).css('border', '1px solid black'); counter++; } and here's my problem, it's this line of code: $('.box').eq(counter).attr('class','hidden'); if it's active the scripts target the even/2nd divs only. I know I can use .addClass instead, I tried it and works okay. but I'm just trying to understand what is really going on what am I missing? html, css and js file can be found here http://jsfiddle.net/33bjnjza/1/
tagged with: attr
downvote count: 2
has title: Weird Behavior when eq() is followed by attr()
has comment: http://stackoverflow.com/comment/41505496

http://stackoverflow.com/comment/41393735
comment on: http://stackoverflow.com/q/26368179
score: 0
type: Comment
type: QuestionComment
has text: Way too much code man.. And you're supposed to post code in the question, not on jsfiddle

http://stackoverflow.com/q/26479204
has body: I have a data grid which is bound to a ItemFileReadStore. In my case, I have a "prioritize" column to shift the rows up-down as per user's selection. The prioritization order is stored in DB table. Currently I have achieved it by sending AJAX request on each Up-Down arrow click and getting the updated data in JSON object and reloading the entire data in the data grid. But I think that's too much of data carrying. what I am looking for is: after updating the data in DB, if the update was successful, I would just pass a success flag to the calling JS method and I would update the data locally in the store at client side. That would make the response faster and will take less network load. I know it can be done in ExtJS (http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.data.Record-set) but not sure how to get in Dojo. I went through the documentation but could not find anything helpful. Can anyone please guide me thought this?
type: UnansweredQuestion
tagged with: dojox.grid
tagged with: dojo
has title: Updating Dojo store data on client end
type: Question
tagged with: dojox.grid.datagrid
tagged with: javascript
has answer: http://stackoverflow.com/a/26490225
score: 0
answer count: 1

http://stackoverflow.com/a/26391131
has body: The best way to implement this is using the AngularStraps addon and using typeaheads: http://mgcrea.github.io/angular-strap/##typeaheads
type: Answer
accepted answer of: http://stackoverflow.com/q/26370160
answers question: http://stackoverflow.com/q/26370160
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26469396
type: AcceptedAnswer
has body: The problem you have is that the variable event height will be reset in the first each loop with the height of the next event div, so essentially you will be left with the height of the final div. You need to store the height of each div in an array or object and then retrieve it. HTML Use a unique identifier in the html e.g. an id &lt;div class="event event-1925"&gt; &lt;div id="event-1" class="event-details"&gt; ..... &lt;/div&gt; &lt;/div&gt; Javascript $(function() { //create array to store all the event div heights var eventHeights = []; $('.event').each(function() { var eventHeight = $(this).find('.event-details').height(); console.log( eventHeight ); //get the id of the event div var id = $(this).find('.event-details').attr('id'); //store the height with reference to the div id eventHeights[id] = eventHeight; $('.more').on('click', function (e) { e.preventDefault(); $(this).parent('.event').toggleClass('show'); //get the id of the event div var id = $(this).parent('.event').find('.event-details').attr('id'); //use id to get the event div's height from array $('.show &gt; .event-details').css( 'height', eventHeights[id]); }); }); $('.event-details').css( 'height', '126' ); }); I have not tested this and it could do with being optimised but hopefully it gives you the idea.
type: Answer
accepted answer of: http://stackoverflow.com/q/26468858
score: 0
answers question: http://stackoverflow.com/q/26468858

http://stackoverflow.com/comment/41506387
comment on: http://stackoverflow.com/q/26429466
score: 0
has text: @torazaburo That's about as verbose as the ES6 approach. Still more than I would like to have to type. Admittedly, your suggestion does not introduce a new scope. @Volune I might, but Chrome/V8/Node makes it a method, which is my primary use case. @ThanasisGrammatopoulos Yes, you missed the part where I am trying to make things less verbose. I use Promises all over the place and I don't want to have to keep a global `err` around because I do this a lot.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41535914
has text: How is the OP confusing `setTimeout` and `setInterval`? What the OP wants to do is not impossible. You could use generators to suspend a function midway. I don't see how promises could possibly help. This answer doesn't add anything valuable. It should be a comment instead.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26446702
type: AnswerComment

http://stackoverflow.com/a/26474035
score: 0
has body: It could be a timing issue because the html editor, when it loads, does have some javascript to run. You could try window.setTimeout(document.getElementById("ContentPlaceHolder1_Editor1_ctl02").contentWindow.innerHTML = "Some value from db",0); to place your code at the end of the stack.
type: Answer
answers question: http://stackoverflow.com/q/26463067

http://stackoverflow.com/comment/41462278
comment on: http://stackoverflow.com/q/26406747
score: 0
type: Comment
has text: `$scope.init()` does not exist from where you are calling it. Call it after setting it, i.e. first `$scope.init = function...` and *then* `$scope.init()`. And you may even not need to put `init()` in scope, running it inline may suffice.
type: QuestionComment

http://stackoverflow.com/q/26446298
has comment: http://stackoverflow.com/comment/41535194
has answer: http://stackoverflow.com/a/26446394
type: AnsweredQuestion
has title: How can I detect and parse from one of these string formats in JavaScript?
tagged with: string-parsing
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26446394
has body: I am writing a JavaScript function (no jQuery), which will receive a string with one of the following formats: [Blah] [Read this] [Blah] [Optional blah] [Blah] Read this [Blah] Optional blah I want to pick the "Read this" string out of the rest. The "Optional blah" bits may or may not be present (along with the accompanying square brackets in the first case), but they shouldn't matter. Any ideas on how to write a function that does this?
tagged with: substring
has comment: http://stackoverflow.com/comment/41535189
score: 0
answer count: 1
tagged with: string

http://stackoverflow.com/q/26407148
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41511660
tagged with: php
tagged with: google-analytics-api
downvote count: 0
answer count: 0
score: 1
type: Question
tagged with: google-analytics
has body: I've created a dashboard of Google Analytics data that pulls in conversion rate, visits etc and also I have a connection to Magento Api that pulls in sales data. This is all great but I want all of the Api calls to be refreshed every 10minutes say. I have one big class with all the Analytics Api calls, and then the functions within this class are called on an index.php page How do I go about refreshing the data or the page using Ajax as I don't want the page to actually reload? I've tried using a simple setInternal() that uses .load() to refresh the main div that is wrapped around everything but I don't think this is the correct way to do it. I'm unsure of what i have to do but I feel like I need to refresh the Api calls and then each div that is echoing out the data Correct me if I'm wrong as I'm quite new to Ajax Thanks Adi
has title: Refreshing Google Analytics API data with Ajax
tagged with: javascript
upvote count: 1
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/41569241
type: Comment
score: 1
has text: @joelharkes said everything. You should also return the result you get in your parse.php and then catch it with `$post()` to display result wherever you want. So, instead of doing `echo` in your loop `for`, you add those data to the `$name` variable, and return it. Then, in you DOM you catch this by $post() and you're done.
comment on: http://stackoverflow.com/q/26465494
type: QuestionComment

http://stackoverflow.com/q/26444792
has comment: http://stackoverflow.com/comment/41532939
tagged with: arrays
downvote count: 0
tagged with: traversal
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41532433
has body: I am trying to write javascript that will map all the unique paths from root to leaf, each node can connect to the adjacent node on the next line. For example the root can connect to next row as 4,2 or 4,4. A unique path the the leaf would be 4,2,4,2,1 4 2 4 6 4 2 7 4 2 1 9 4 2 1 4 I was able to convert the triangle into a 2D array that is structured like this. a[0] = [4] a[1] = [2,4] a[2] = [6,4,2] a[3] = [7,4,2,1] a[4] = [9,4,2,1,4] I want to find all the paths from root to leaf such as 4,2,6,7,9 4,2,6,7,4 4,2,6,4,4 I'm new to Depth First Search and Breadth first search. Could this be achieved with those algorithms?
accepted answer: http://stackoverflow.com/a/26445316
tagged with: breadth-first-search
upvote count: 2
tagged with: depth-first-search
has title: How can I find all paths in 2D array?
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26445316
type: Question

slider
tags question: http://stackoverflow.com/q/26478267
tags question: http://stackoverflow.com/q/26355930
tags question: http://stackoverflow.com/q/26421733
tags question: http://stackoverflow.com/q/26489947
tags question: http://stackoverflow.com/q/26357707
tags question: http://stackoverflow.com/q/26403703
tags question: http://stackoverflow.com/q/26398752
tag name: slider
tags question: http://stackoverflow.com/q/26385733
tags question: http://stackoverflow.com/q/26508333
tags question: http://stackoverflow.com/q/26428029
tags question: http://stackoverflow.com/q/26459279
tags question: http://stackoverflow.com/q/26360830
tags question: http://stackoverflow.com/q/26429321
type: Tag
tags question: http://stackoverflow.com/q/26378181

http://stackoverflow.com/q/26408388
tagged with: state
upvote count: 69
downvote count: 0
has body: Let me preface this by saying I am a novice to ReactJS. I am trying to learn by making a simple site that populates data using React. I have a JSON file that contains link data that will be looped through with map. I have tried setting it as the components state then passing it to the navbar links via a prop but I am getting "Uncaught TypeError: Cannot read property 'data' of null" I tried to look around for solutions but could not find anything. Note: When I try to hard code an object and map through it that way it returns map is undefined. However I am not sure that is directly related to the setState error. /** @jsx React.DOM */ var conf = { companyName: "Slant Hosting" }; var NavbarLinks = React.createClass({ render: function(){ var navLinks = this.props.data.map(function(link){ return( {link.text} ); }); return( {navLinks} ) } }); var NavbarBrand = React.createClass({ render: function(){ return( {conf.companyName} ); } }); var Navbar = React.createClass({ getInitalState: function(){ return{ data : [] }; }, loadNavbarJSON: function() { $.ajax({ url: "app/js/configs/navbar.json", dataType: 'json', success: function(data) { this.setState({ data: data }); console.log(data); console.log(this.state.data); }.bind(this), error: function(xhr, status, err) { console.error(this.props.url, status, err.toString()); }.bind(this) }); }, componentDidMount: function(){ this.loadNavbarJSON(); }, render: function(){ return( <NavbarBrand /> <NavbarLinks data={this.state.data} /> ); } }); var Header = React.createClass({ render: function(){ return( <Navbar /> ); } }); React.renderComponent( , document.getElementById('render') );
tagged with: javascript
has answer: http://stackoverflow.com/a/35121888
favorite count: 0
answer count: 5
type: UnansweredQuestion
has title: ReactJS this.state null
has comment: http://stackoverflow.com/comment/41477078
score: 69
has comment: http://stackoverflow.com/comment/50060084
has answer: http://stackoverflow.com/a/30180732
has answer: http://stackoverflow.com/a/44375247
has comment: http://stackoverflow.com/comment/41469023
has answer: http://stackoverflow.com/a/57311731
has answer: http://stackoverflow.com/a/35504962
type: Question
tagged with: reactjs
has comment: http://stackoverflow.com/comment/41502621

http://stackoverflow.com/q/26407720
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: Im using this code (jsfiddle) - JSFIDDLE When an item is dragged to a correct box , it disables the original one from being dragged again. The problem is that it causes the css to stick so that the green of boxes that accept the dragged item dosent go away . It also produces this error in the console : Uncaught Error: cannot call methods on draggable prior to initialization; attempted to call method 'disable'. Any help would be good. Also how can i change the colour of the disabled box to grey . JS : $(".DragItem").draggable({ revert: 'invalid', helper: "clone" }); $(".drop1").droppable({ accept: '#1,#2,#3', activeClass: 'DropTargetValid', drop: function (ev, ui) { $(ev.target).draggable( 'disable' ); $(ev.target).append(ui.draggable.clone()); } }); $(".drop2").droppable({ accept: '#2,#3', activeClass: 'DropTargetValid', drop: function (ev, ui) { $(ev.target).draggable( 'disable' ); $(ev.target).append(ui.draggable.clone()); } }); $(".drop3").droppable({ accept: '#3,#4', activeClass: 'DropTargetValid', drop: function (ev, ui) { $(ev.target).draggable( 'disable' ); $(ev.target).append(ui.draggable.clone()); } }); $(".drop4").droppable({ accept: '.DragItem', activeClass: 'DropTargetValid', drop: function (ev, ui) { $(ev.target).draggable( 'disable' ); $(ev.target).append(ui.draggable.clone()); } });
has answer: http://stackoverflow.com/a/26408236
type: Question
tagged with: javascript
tagged with: jquery
has title: Jquery causes error and css to stick
has answer: http://stackoverflow.com/a/26408155
score: 0
answer count: 2

http://stackoverflow.com/a/26406596
has comment: http://stackoverflow.com/comment/41463438
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26406510
has comment: http://stackoverflow.com/comment/41462144
downvote count: 0
type: Answer
has body: In your drop down, add an onchange event calling showDialog('newShipTo').

http://stackoverflow.com/q/26376009
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has body: Hello fellow stackoverflow. I'm up with a new question, here goes. I would like to stuff the cookie of the following function in my ajax or javascript but I keep on failing to do , Here's my javascript function : &lt;script&gt; function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&amp;"); for (var i=0;i&lt;vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } } &lt;/script&gt; Now I would like it to appear like something like the below :- setTimeout(function(){window.location = "https://www.something.com/index.html?affid=" + getQueryVariable("affid");}, 3000); Is it possible to cookied the affid ?? So i would use something like this : setTimeout(function(){window.location = "https://www.something.com/index.html?affid=" + getCookie("affid");}, 3000);
has answer: http://stackoverflow.com/a/26376246
has title: Cookie a function via javascript or jQuery
has answer: http://stackoverflow.com/a/26376221
type: Question
tagged with: cookies
score: 0

http://stackoverflow.com/a/26430142
accepted answer of: http://stackoverflow.com/q/26429659
type: Answer
has body: Just place your JSON on a variable in your factory and close over it in your functions. http://plnkr.co/edit/gWklBTEZWqxPzQjhV19D?p=preview {{myData}}
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26429659
has comment: http://stackoverflow.com/comment/41505969

http://stackoverflow.com/a/26503412
upvote count: 1
answers question: http://stackoverflow.com/q/26503266
score: 1
downvote count: 0
has body: Use the ListBoxproperty AutoPostback! Simply set it to false: &lt;asp:ListBox ID="ListBoxID" AutoPostback="false"&gt; If you want to achieve this from JavaScript you should add: ListBoxID.Attributes.Add("onchange", "return false;");
type: Answer

http://stackoverflow.com/comment/41587292
has text: Is that `ng-show` condition within the `ng-repeat`?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26474930

http://stackoverflow.com/a/26379529
has comment: http://stackoverflow.com/comment/41414344
has comment: http://stackoverflow.com/comment/41414958
has comment: http://stackoverflow.com/comment/41419168
has comment: http://stackoverflow.com/comment/41416418
answers question: http://stackoverflow.com/q/26378121
has comment: http://stackoverflow.com/comment/41418651
has comment: http://stackoverflow.com/comment/41415890
has comment: http://stackoverflow.com/comment/41417888
has comment: http://stackoverflow.com/comment/41414686
downvote count: 0
has comment: http://stackoverflow.com/comment/41416972
has comment: http://stackoverflow.com/comment/41416384
has comment: http://stackoverflow.com/comment/41416184
has comment: http://stackoverflow.com/comment/41414915
has body: Handle the change event of your dropdown and make an ajax call to return a partial view that you can add to the DOM using jquery .load(). Note in your view remove the @foreach so you just have &lt;div id="summary"&gt;&lt;/div&gt; which is where the returned html will be displayed Script $('#mydropdown').change(function() { var selectedID = $(this).val(); var url = '@Url.Action("Details", "YourController")'; $('#summary').load(url, { ID: selectedID }); }); Controller public ActionResult Details(int ID) { var model = // Get the details based on the selected ID return PartialView("Details", model); } Note also, remove the onchange="onChange() from your &lt;select&gt;. I also recommend you learn to use @Html.DropDownListFor() for generating you &lt;select&gt; controls
has comment: http://stackoverflow.com/comment/41415189
has comment: http://stackoverflow.com/comment/41415725
type: Answer
has comment: http://stackoverflow.com/comment/41440354
has comment: http://stackoverflow.com/comment/41415395
score: 1
has comment: http://stackoverflow.com/comment/41417068
upvote count: 1

http://stackoverflow.com/q/26445828
has comment: http://stackoverflow.com/comment/41535390
tagged with: require
has comment: http://stackoverflow.com/comment/41557035
tagged with: browserify
answer count: 1
has comment: http://stackoverflow.com/comment/41577727
favorite count: 0
tagged with: backbone.js
has body: I have this code which, for reasons I can't understand, produces an empty object when using require(). My file structure is like this: src |__ public |__ javascript |__ collections | categories.js | listings.js &lt;-- Always an empty object |__ models | category.js | employer.js | listing.js | location.js | routing | templates | tests | ui-components | views The problem file is collections/listings.js, which seems to simply output as an empty object when required like so: var ListingsCollection = require('../collections/listings') src/public/javascript/collections/listings.js looks like this: var $ = require('jquery'), _ = require('underscore'), Backbone = require('backbone'), Listing = require('../models/listing'); Backbone.$ = $; module.exports = Backbone.Collection.extend({ url: '/listings', model: Listing, parse: function (response) { return response.listings; } }); Here is an example of where things go wrong: var $ = require('jquery'), _ = require('underscore'), Backbone = require('backbone'), LocationModel = require('../models/location'), ListingsCollection = require('../collections/listings'); Backbone.$ = $; console.log(ListingsCollection); // &gt; Object {} module.exports = Backbone.Model.extend({ urlRoot: '/employers', model: { location: LocationModel, listings: ListingsCollection }, parse: function (response) { var employer = response.employer; // Create the child listings employer.listings = new ListingsCollection; return employer; }, toJSON : function () { var json = _.clone(this.attributes); _.each(_.keys(this.model), function (child) { if (this.get(child)) { json[child] = this.get(child).toJSON(); } }.bind(this)); return json; } }); So there it is - That collection never requires into the employer model such that it can be used to create a child collection for the parent model. I've looked at the source and researched this issue but I'm coming up with nothing so far... It's perplexing.
has title: Browserify require returns an empty object
has comment: http://stackoverflow.com/comment/41534832
has comment: http://stackoverflow.com/comment/41535542
has comment: http://stackoverflow.com/comment/41534784
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27746696
has comment: http://stackoverflow.com/comment/41534724
score: 24
upvote count: 24
type: Question
has comment: http://stackoverflow.com/comment/41534758
has comment: http://stackoverflow.com/comment/41534753
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27746696
has comment: http://stackoverflow.com/comment/41534655
has comment: http://stackoverflow.com/comment/41536034

http://stackoverflow.com/comment/41629056
has text: @SteveK - A simple object to encapsulate functionality sounds to me like all the variables should just be wrapped in the IIFE including the functions. However, your examples are far too abstract to be useful for analysis here. To get better feedback it would be helpful if you could actually create code which reproduces or compares and contrasts an issue you are facing.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26497884

http://stackoverflow.com/a/26368702
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26368084
answers question: http://stackoverflow.com/q/26368084
has comment: http://stackoverflow.com/comment/41424721
type: AcceptedAnswer
has body: Try var test = ["1111","2222"] // , test2 = ["2222", "1111"]; // `test2 === test.reverse()` -&gt; utilized same variable (`test`) for OR check var res = $.grep(rooms, function(v, k) { return (String(v.memberID) === (String(test) || String(test.reverse()))) }); var rooms = [ {roomID:'room1',memberID:['1111','2222']}, {roomID:'room2',memberID:['1111','3333']}, {roomID:'room2',memberID:['3333','1111']}] , test = ['1111','2222'] //, test2 = ["2222", "1111"] , res = $.grep(rooms, function(v, k) { return (String(v.memberID) === (String(test) || String(test.reverse()))) }); console.log(res); document.write(JSON.stringify(res)) &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/41495303
has text: Not a solution yet, but what I can definetely tell is that it has to do with the `series.update()` function. This function sets all properties of object `this` to `null`. As it says in the doc: `For a clean and precise handling of new options, all methods and elements from the series is removed, and it is initiated from scratch.` Obviously, this interferes with the other events that are called in the meantime.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26403063

http://stackoverflow.com/comment/41507063
type: Comment
type: QuestionComment
has text: If the one that takes a long time does a lot of synchronous things, yes, you'll have a problem, but if it's asynchronous, such as reading a file or writing a file, other requests will continue to be processed while waiting for the asynchronous action to complete. javascript runs in an event loop. Because of this, you should avoid using synchronous actions on a node.js application that is serving requests.
score: 0
comment on: http://stackoverflow.com/q/26431146

http://stackoverflow.com/a/26440080
score: 0
has comment: http://stackoverflow.com/comment/41523755
type: AcceptedAnswer
has body: Here's how you can do it: function loadHard() { drawImage('image.png', 268, 5); console.log('idle'); // Clears the interval based on the id clearInterval(intervalId); // This will reset minutesLabel.innerHTML = secondsLabel.innerHTML = "00"; } var minutesLabel = document.getElementById("minutes"); var secondsLabel = document.getElementById("seconds"); var totalSeconds = 0; // Notice we assign setInterval to an id // The id can be used to clear the interval var intervalId = setInterval(setTime, 1000); function setTime() { ++totalSeconds; secondsLabel.innerHTML = pad(totalSeconds%60); minutesLabel.innerHTML = pad(parseInt(totalSeconds/60)); } Alternatively, if you just wanted to reset the timer but keep the clock ticking, you could do: function loadHard() { drawImage("image.png", 268, 5); totalSeconds = -1; setTime(); // Updates the time to 0 }
answers question: http://stackoverflow.com/q/26440054
type: Answer
accepted answer of: http://stackoverflow.com/q/26440054
has comment: http://stackoverflow.com/comment/41524069

http://stackoverflow.com/a/26428153
score: 1
has comment: http://stackoverflow.com/comment/41501567
has comment: http://stackoverflow.com/comment/41501324
has body: You can use the result variable which gets passed in to your AJAX call's success function: success: function(result) { // result here is your JSON data which has already been parsed } You can access the individual arrays using either dot or bracket notation: var HUM = result.HUM; // or var HUM = result["HUM"];
has comment: http://stackoverflow.com/comment/41501275
upvote count: 1
has comment: http://stackoverflow.com/comment/41501609
type: Answer
answers question: http://stackoverflow.com/q/26428092
has comment: http://stackoverflow.com/comment/41501432
downvote count: 0
has comment: http://stackoverflow.com/comment/41501494

http://stackoverflow.com/comment/41525436
comment on: http://stackoverflow.com/q/26440770
score: 0
type: Comment
type: QuestionComment
has text: Plus, who knows. Maybe what you did try and it did not work, may very well be the reason **why** it did not work. Use the standard quotes as I've noted above and try it again and see with what you tried.

http://stackoverflow.com/comment/41484034
has text: @AvinashRaj: Possible, but not with JS regex. http://stackoverflow.com/questions/15268504/collapse-and-capture-a-repeating-pattern-in-a-single-regex-expression/15418942#15418942
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26418580

http://stackoverflow.com/comment/41468280
type: Comment
type: QuestionComment
has text: I don't want every checkbox (there are about 30+ on the page) to be highlighted, just the checked ones.
score: 0
comment on: http://stackoverflow.com/q/26409987

http://stackoverflow.com/q/26404164
type: Question
tagged with: google-rich-snippets
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27994630
tagged with: schema.org
answer count: 1
has title: Google’s sitelinks search box for Google Custom Search
favorite count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
tagged with: google-custom-search
has body: I’m completely flumped here on how to use Google’s sitelinks search box with Google’s custom search. Would anyone know how I even begin connecting the 2? For the site links search box Google give the following code: &lt;script type="application/ld+json"&gt; { "@context": "http://schema.org", "@type": "WebSite", "url": "https://www.example-petstore.com/", "potentialAction": { "@type": "SearchAction", "target": "https://query.example-petstore.com/search?q={search_term_string}", "query-input": "required name=search_term_string" } } &lt;/script&gt; And then you have Google’s custom search code: &lt;script&gt; (function() { var cx = '006674923042857018221:WMX2084923030'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); &lt;/script&gt; How on earth do I connect the 2? Hope you can point me in the right direction.

http://stackoverflow.com/comment/41397284
type: QuestionComment
has text: Where are you making the request?
comment on: http://stackoverflow.com/q/26370009
score: 0
type: Comment

http://stackoverflow.com/a/28656565
upvote count: 3
has body: In node, we can create a readable stream from a file (fs.createReadableStream()) and pipe it to the zlib.createGunzip(). The readable stream reads the data chunk-by-chunk and then pass it through to the gunzip sink. Hence, if we put a gzip-ed file into this setup; we will get the extracted data chunk-by-chunk. With the browserify's help, we can do this inside the browser. e.g. using this main.js file // browserify automatically replaces the node's native zlib with this: // https://www.npmjs.com/package/browserify-zlib var zlib = require('zlib'); var drop = require('drag-and-drop-files'); var createReadStream = require('filereader-stream'); var gunzip = zlib.createGunzip(); drop(document.getElementById('drop'), function(files) { var first = files[0]; createReadStream(first).pipe(gunzip); gunzip.on('data', function(data){ // read the data chunk-by-chunk console.log(data.toString()); }); gunzip.on('end', function(){ console.log('done'); }); }); To make it work inside the browser, we should put the browserify charm on it. $ browserify app.js &gt; bundle.js And then, we can load up an index.html with bundle.js in it (don't forget the drop-zone). I quickly put together the poc (the streaming part, maybe we need to play with the webworker API to cope with a very big file) on this repo.
score: 3
has comment: http://stackoverflow.com/comment/63898756
downvote count: 0
answers question: http://stackoverflow.com/q/26497797
type: Answer

http://stackoverflow.com/comment/41456302
has text: Why you are using ajax? Simply redirect to your desired page when you done processing on server-side on submit button.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26403173

http://stackoverflow.com/comment/41525328
type: Comment
has text: We should have solar power and the great rewrite but we can't right now. I think that solar power and "the great rewrite" are very good ideas. But they are large project and long-term projects. Economically we can't do it right now. A technically inferior solution can be more profitable right now. In the long term I believe we will have solar powered cheap energy and a great rewrite with svg maps, but the onlye maps I found with svg used heavy loads of javscript. I also tried with google maps but they can't allow a custom design. So it will be svg maps but we can't right now.
type: AnswerComment
comment on: http://stackoverflow.com/a/26392505
score: 0

http://stackoverflow.com/comment/41627033
has text: Hi @kei thanks, I do not mean to sound rude but there are... I just looked at them to double check lol :) thanks though
type: QuestionComment
comment on: http://stackoverflow.com/q/26496966
score: 0
type: Comment

http://stackoverflow.com/a/26375173
answers question: http://stackoverflow.com/q/26374504
has comment: http://stackoverflow.com/comment/41443893
type: Answer
score: 1
has body: you can update the grid inside the grid-cell directive: app.controller('MainCtrl', function($scope) { $scope.dimension = [1,2,3,4,5,6,7,8,9]; $scope.grid = []; for (var i = 1; i&lt;=$scope.dimension.length; i++) { $scope.grid[$scope.grid.length] = ['','','','','','','','','']; } $scope.submit = function() { // insert sudoku-solving algorithm here }; }); app.directive('gridCell', function() { return { restrict: "EA", template: '&lt;input type="text" ng-model="value" /&gt;', replace: true, scope: { row: '&amp;', col: '&amp;', grid: '=' }, link: function(scope, elem, attrs) { elem.bind('blur', function() { scope.$apply(function () { if (scope.value) { scope.grid[scope.row()][scope.col()] = scope.value; } }); }); } } }); html: &lt;tr ng-repeat="row in dimension"&gt; &lt;td ng-repeat="col in dimension"&gt; &lt;grid-cell row="row" col="col" grid="grid"&gt;&lt;/grid-cell&gt; &lt;/td&gt; &lt;/tr&gt; http://plnkr.co/edit/peDjFbKGm6ydO4E45b5u?p=preview
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/26406091
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26405936
has comment: http://stackoverflow.com/comment/113680640
has comment: http://stackoverflow.com/comment/121667091
type: Answer
score: 6
accepted answer of: http://stackoverflow.com/q/26405936
downvote count: 0
has body: As @anthonyGist has pointed out in the comments, set invisible elements to disabled: $(':hidden').prop('disabled', true);
upvote count: 6

http://stackoverflow.com/comment/41526865
type: AnswerComment
type: Comment
has text: Yeah I realized that a bit after I posted the comment, so I deleted it.
comment on: http://stackoverflow.com/a/26441564
score: 0

http://stackoverflow.com/comment/41525624
comment on: http://stackoverflow.com/a/26441053
score: 0
type: AnswerComment
has text: Nice `$('#-' + $(this))` concatenates the parent ID with current option. `.val().split([separator][, limit])` specifies the character(s) to use for separating the string and sets limit on the number of splits to be found.
type: Comment

http://stackoverflow.com/comment/41614823
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26485176
has text: i needed to do little changes to your code, and wallah my problem solved. You are awesome. Thankyou. Many Many Thanks again.

http://stackoverflow.com/comment/41639355
has text: Finally Problem solved jQuery(response.responseText).filter(".responseid").each(function(i){ jScript+=jQuery(this).html(); });
score: 0
comment on: http://stackoverflow.com/q/26485218
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41513440
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26434265
has text: Currently it looks like it's only enabled for click - I don't see any hover based actions.

http://stackoverflow.com/a/26382688
has comment: http://stackoverflow.com/comment/41420042
upvote count: 2
has comment: http://stackoverflow.com/comment/41420701
answers question: http://stackoverflow.com/q/26382474
has comment: http://stackoverflow.com/comment/41420584
type: Answer
has body: Putting the style overflow:hidden; on the div would hide all that's outside of the div.
score: 2
has comment: http://stackoverflow.com/comment/41420962
downvote count: 0
has comment: http://stackoverflow.com/comment/41420292

http://stackoverflow.com/a/26493488
has comment: http://stackoverflow.com/comment/41621292
type: Answer
has body: A paragraph can only contain inline elements. Where your is a block element, when your browser renders your code, it places a paragraph either side of your ordered list, the ordered list is not a child of the paragraph: How about having the list follow the paragraph: $(document).ready(function () { $('.hidable').click(function () { $(this).next('ol').toggle(); }); }); title text item item
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26493330
score: 4
answers question: http://stackoverflow.com/q/26493330
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41489820
type: QuestionComment
has text: If you are doing it in 3 separate html pages, you would need to store the score on the server. If you want to do it on a http://en.wikipedia.org/wiki/Single-page_application, declare a var and keep track of the score as the user answers
comment on: http://stackoverflow.com/q/26421220
score: 0
type: Comment

http://stackoverflow.com/comment/133144086
has text: This should be marked as the right solution, `findIndex()` is definitely the way to go for the request on this question.
comment on: http://stackoverflow.com/a/55259281
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26433184
has comment: http://stackoverflow.com/comment/41521798
has comment: http://stackoverflow.com/comment/41511294
tagged with: d3.js
has title: Polygons in d3.js not filling/building correctly
has body: I have been tasked with drawing up a set of features that are given to me in a wkt format that translates to EPSG 4326 coordinates, changing those to EPSG 3857 then with the new coordinates producing a rough map of the features for the sake of displaying information directly related to them. I have accomplished all of the tasks save one, correctly drawing the polygons for lots, (we have data for poles overhead lines and land parcels)I can only provide the coordinates for some of these. I am using proj4js for the translation from 4326 to 3857 and wellknown.js to parse from wkt to the 4326 coordinates. The drawing of lots is being done by d3, and the click events are taken care of with a mix of jquery and d3. I feel it is also worth mentioning this is all housed in a standalone application that uses cefsharp as it's window for viewing the map(so no server side script is possible, nor is a command line). The following is data I am originally passed. { "Information" : { "ALLE31113" : [{ "PK_UID" : "7129", "geoText" : "MULTIPOLYGON(((-9035602.307487 4363592.799839, -9035646.762385 4363669.887824, -9035684.243076 4363735.247325, -9035735.642396 4363822.429784, -9035770.281248 4363805.006812, -9035824.253019 4363751.636147, -9035848.197629 4363727.726674, -9035907.876876 4363697.629949, -9035963.84742 4363668.909586, -9036035.632131 4363644.776346, -9036072.4994 4363631.941562, -9036069.614947 4363716.726557, -9036066.914278 4363816.281436, -9036063.645231 4363922.511598, -9036058.844839 4364080.084017, -9036080.477324 4364071.671115, -9036123.477431 4364031.843033, -9036147.132026 4364076.760663, -9036178.631235 4364136.90146, -9036175.954358 4364137.843585, -9036106.35999 4364162.548467, -9036069.892896 4364176.634671, -9036038.196664 4364190.140612, -9036002.855712 4364199.448907, -9035989.071442 4364203.007609, -9035964.978261 4364209.268322, -9035955.739394 4364210.944745, -9035942.912073 4364213.175299, -9035936.588774 4364214.003407, -9035928.837657 4364214.458878, …
has answer: http://stackoverflow.com/a/26508771
accepted answer: http://stackoverflow.com/a/26508771
has comment: http://stackoverflow.com/comment/41523888
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41511449
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41511364
answer count: 1
has comment: http://stackoverflow.com/comment/41511498
linked to: http://stackoverflow.com/q/18380701

http://stackoverflow.com/comment/41655396
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26507447
has text: @Billy thanks for taking the time. Can you elaborate a bit more, how you think skins would help here?
score: 0

http://stackoverflow.com/q/26358832
favorite count: 0
has answer: http://stackoverflow.com/a/26359238
tagged with: angularjs
has body: What I'm trying to achieve: wrapping cordova native handlers inside an angular directive I would like to implement handlers for Cordova's native events using a directive wrapper (in order to listen to the body load event). I have the following directive boilerplate: angular.module('vitaApp') .directive('cordovaNative', function () { return { restrict: 'A', compile: function (element, attrs, transcludeFn) { alert('compile fired'); element.bind('load', function(){ alert('load occured'); }); }, link: function postLink(scope, element, attrs) { alert('link fired'); element.bind('load', function(){ alert('load occured'); }); } }; }); Which is instantiated in the following way: &lt;body ng-app="vitaApp" ng-controller="metaCtrl" ng-swipe-right="showMenu()" ng-swipe-left="hideMenu()" cordova-native&gt; Compile function for cordovaNative directive fires, but the link function doesn't. Could it have something to do with the ng-swipe directives (e.g. '{terminal: true}')? Note: I am not trying to use compile and link together, I am trying to demonstrate that non of them works for the purpose of subscribing to the load event separately.
has title: AngularJS Direcitve - link function doesn't fire
possible better answer: http://stackoverflow.com/a/26359246
tagged with: cordova
has answer: http://stackoverflow.com/a/26359246
upvote count: 3
accepted answer: http://stackoverflow.com/a/26359238
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/26359235
answer count: 3
downvote count: 0

http://stackoverflow.com/a/26442123
type: Answer
score: 3
downvote count: 0
has body: If you really want to do this without ajax then you can try this... function setNotification(e){ targetUrl = $(this).attr('href'); id = $(this).attr('id'); $('&lt;form/&gt;').append('&lt;input name="id" value="'+ id +'"/&gt;&lt;input name="view_id" value="12"/&gt;').attr('action', targetUrl ).attr('method', 'POST').appendTo('body').submit(); return false; };
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26441052
has comment: http://stackoverflow.com/comment/41977841
answers question: http://stackoverflow.com/q/26441052

http://stackoverflow.com/comment/41484408
score: 0
type: AnswerComment
has text: could you post a trace? (what alerts get fired?). Also, there's no need to focus the element twice. Only do it after the alert.
comment on: http://stackoverflow.com/a/26417714
type: Comment

underscore.js
tags question: http://stackoverflow.com/q/26471098
tags question: http://stackoverflow.com/q/26429260
tags question: http://stackoverflow.com/q/26383786
tags question: http://stackoverflow.com/q/26450956
tags question: http://stackoverflow.com/q/26439519
tags question: http://stackoverflow.com/q/26471049
type: Tag
tags question: http://stackoverflow.com/q/26399766
tags question: http://stackoverflow.com/q/26490264
tags question: http://stackoverflow.com/q/26455019
tags question: http://stackoverflow.com/q/26356839
tags question: http://stackoverflow.com/q/26466653
tag name: underscore.js
tags question: http://stackoverflow.com/q/26410701
tags question: http://stackoverflow.com/q/26503593
tags question: http://stackoverflow.com/q/26378739
tags question: http://stackoverflow.com/q/26391841
tags question: http://stackoverflow.com/q/26461535
tags question: http://stackoverflow.com/q/26423442
tags question: http://stackoverflow.com/q/26366211
tags question: http://stackoverflow.com/q/26363193
tags question: http://stackoverflow.com/q/26390662
tags question: http://stackoverflow.com/q/26432324

http://stackoverflow.com/comment/41574967
type: Comment
type: QuestionComment
has text: What does your code drawing the polygon look like?
score: 0
comment on: http://stackoverflow.com/q/26468023

twitter-bootstrap-3
tags question: http://stackoverflow.com/q/26365954
tags question: http://stackoverflow.com/q/26397017
tags question: http://stackoverflow.com/q/26440554
tags question: http://stackoverflow.com/q/26391611
tags question: http://stackoverflow.com/q/26399702
tags question: http://stackoverflow.com/q/26405178
tags question: http://stackoverflow.com/q/26436042
tags question: http://stackoverflow.com/q/26384250
tag name: twitter-bootstrap-3
tags question: http://stackoverflow.com/q/26434830
tags question: http://stackoverflow.com/q/26373470
tags question: http://stackoverflow.com/q/26468559
tags question: http://stackoverflow.com/q/26374256
tags question: http://stackoverflow.com/q/26416078
tags question: http://stackoverflow.com/q/26426170
tags question: http://stackoverflow.com/q/26506225
tags question: http://stackoverflow.com/q/26380980
type: Tag
tags question: http://stackoverflow.com/q/26370887
tags question: http://stackoverflow.com/q/26501616
tags question: http://stackoverflow.com/q/26391255
tags question: http://stackoverflow.com/q/26432210
tags question: http://stackoverflow.com/q/26380094
tags question: http://stackoverflow.com/q/26359990
tags question: http://stackoverflow.com/q/26438466
tags question: http://stackoverflow.com/q/26489582
tags question: http://stackoverflow.com/q/26489655
tags question: http://stackoverflow.com/q/26494972
tags question: http://stackoverflow.com/q/26370691
tags question: http://stackoverflow.com/q/26501929
tags question: http://stackoverflow.com/q/26477594
tags question: http://stackoverflow.com/q/26423406
tags question: http://stackoverflow.com/q/26474918
tags question: http://stackoverflow.com/q/26407048
tags question: http://stackoverflow.com/q/26504307
tags question: http://stackoverflow.com/q/26406964

http://stackoverflow.com/a/26432973
upvote count: 1
answers question: http://stackoverflow.com/q/26432707
type: Answer
has body: Here's an actually accurate timer (in that it actually shows the correct amount of time left). setInterval will never call every 1 ms regardless of what you ask for because the actually resolution isn't that high. Nor can you rely on consistency because it's not running in a real-time environment. If you want to track time, compare Date objects: var count=60000; var start = new Date(); var counter=setInterval(timer, 1); //1000 will run it every 1 second function timer(){ var left = count - (new Date() - start); if (left &lt;= 0){ clearInterval(counter); document.getElementById("timer").innerHTML = msToTime(0) + " seconds"; return; } document.getElementById("timer").innerHTML = msToTime(left) + " seconds"; // watch for spelling } function msToTime(s) { var ms = s % 1000; s = (s - ms) / 1000; return s + ':' + pad(ms, 3); } function pad(n, width, z) { z = z || '0'; n = n + ''; return n.length &gt;= width ? n : new Array(width - n.length + 1).join(z) + n; } &lt;div id='timer'&gt;&lt;/div&gt; Borrowing from @Cheery's fiddle as a starting point.
downvote count: 0
score: 1

http://stackoverflow.com/comment/41380896
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26358144
has text: You should probably pass the state as props to the children
score: 0

http://stackoverflow.com/a/26404889
score: 2
has body: You forgot a closing parenthesis: $(".asd").hover(function(){ alert("hey"); }); But really, if you're adding the element dynamically, you should change your hover event to one that uses mouseover and mouseout, and use event delegation so that your event can be caught as it bubbles up the event ladder (or whatever it's called): $(document).on('mouseover', '.asd', function () { console.log('on') }).on('mouseout', '.asd', function () { console.log('off') }); And you if you're going to use jQuery I'd suggest that you use it for all your DOM manipulation. Using document.createElement and jQuery is kinda strange. DEMO
has comment: http://stackoverflow.com/comment/41458649
has comment: http://stackoverflow.com/comment/41458766
upvote count: 3
has comment: http://stackoverflow.com/comment/41458482
has comment: http://stackoverflow.com/comment/41458858
downvote count: 1
has comment: http://stackoverflow.com/comment/41458612
answers question: http://stackoverflow.com/q/26404816
type: Answer

http://stackoverflow.com/comment/41548131
type: Comment
type: QuestionComment
score: 6
has text: "*when that `isSafari` variable is `true` I want to execute some [jQuery] (NOT [JavaScript]!) code*" - but jQuery *is* JavaScript.
comment on: http://stackoverflow.com/q/26453678

uiwebview
tags question: http://stackoverflow.com/q/26480121
tag name: uiwebview
tags question: http://stackoverflow.com/q/26494284
tags question: http://stackoverflow.com/q/26508535
tags question: http://stackoverflow.com/q/26412104
type: Tag

http://stackoverflow.com/comment/41399346
has text: Why are you passing arguments (`roundToHundredths(x)`) if you don't use them? (`function roundToHundredths() {}`)
type: QuestionComment
comment on: http://stackoverflow.com/q/26370710
type: Comment
score: 1

http://stackoverflow.com/q/26398727
has title: How to Get Only Day Name or Number in a Week in JavaScript Date()
has answer: http://stackoverflow.com/a/76899365
has answer: http://stackoverflow.com/a/26399097
possible better answer: http://stackoverflow.com/a/26398870
has answer: http://stackoverflow.com/a/26399017
favorite count: 0
has answer: http://stackoverflow.com/a/26398840
accepted answer: http://stackoverflow.com/a/26398840
score: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26398870
has answer: http://stackoverflow.com/a/26398864
downvote count: 0
has answer: http://stackoverflow.com/a/26398847
has comment: http://stackoverflow.com/comment/41448234
type: Question
has answer: http://stackoverflow.com/a/26398853
answer count: 8
has body: I am using following code snippets to get the First and last Day of month which working fine but what I need is getting only the Name string like "Fri", "Wed", "Sun" and the code is returning a long Date format as: Fri Oct 31 2014 00:00:00 GMT-0700 (Pacific Daylight Time) var today = new Date(); var lastOfMonth = new Date(today.getFullYear(),today.getMonth()+1, 0); var today = new Date(); var firstOfMonth = new Date(today.getFullYear(),today.getMonth(), 1); Can you please let me know how I can get ONLY the Name or Number of the day in a week (using getDay()) of the First day?
upvote count: 6
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41510252
type: QuestionComment
comment on: http://stackoverflow.com/q/26401809
score: 1
has text: Hmm that actually makes a lot of sense. How can I create separated views of the same array? AFAIK, `new Float64Array(foo)` creates a new copy. Edit: NVM, but what about the different sizes? That is, there is no "Uint64Array"...
type: Comment

http://stackoverflow.com/q/26370160
tagged with: javascript
score: 0
answer count: 1
has title: Implementation of text search with dropdown answers in Angular and Bootstrap
has answer: http://stackoverflow.com/a/26391131
tagged with: angularjs
tagged with: twitter-bootstrap
has body: What is the correct implementation of a text search (triggering on key up) to display a list of Countries that the user can then select as a choice. I've come up with some code below but couldn't see any other examples online. At present selecting the link in the repeated list will not inject into the model, but I can't see a way of making bootstrap work with a traditional select in this way? Please see example code below: Country {{country}}
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26391131
type: Question

http://stackoverflow.com/comment/41578326
type: Comment
type: QuestionComment
has text: I see it now, thanks. I'm purposely not doing it that way though, due to Ilya Grigorik's research on the most efficient way to include scripts. Check out the link I posted in the question description. Anyway I don't think the problem is so much in how the scripts themselves are loaded, I think running the scripts is the slow part.
comment on: http://stackoverflow.com/q/26433558
score: 0

http://stackoverflow.com/comment/41641397
has text: The last block of input controls just had various syntax to see if I had something wrong. My knowledge of knockout is patchy as its only day 2, having ran though a number of tutorials and such. The last div (the one without a databind) would be akin to the ones in the first QuestionBox where they would be databound with data-bind="visible: adr_nextquestionyesid().adr_answertype.Value == 1 for example
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26504568

http://stackoverflow.com/q/26398015
answer count: 1
has body: I'm experiencing a huge memory increase when I'm doing a duration test with navigation between our webpages in our webapplication. It's not a single-page-application, so I'm navigating with: window.location.href = "linkToOtherPage.html"; This should clear all used memory right? What I notice in Chrome, is that then type=renderer process (the tab in Chrome) claims way too much memory. When navigating once each 2 seconds, it will eat 1000MB overnight. (Starts at 30MB). Analyzing the js heap will result in a size of 4-5MB, so it's not in the JS-heap. Is it so that a memory-leak caused in JS/DOM will keep on living till you close the browser? I would've thought it would be cleared when you navigate to another page.
favorite count: 0
has answer: http://stackoverflow.com/a/26398435
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/50560879
score: 2
has comment: http://stackoverflow.com/comment/41447213
tagged with: dom
type: Question
tagged with: browser
has comment: http://stackoverflow.com/comment/41450505
downvote count: 0
tagged with: javascript
has title: Javascript memory leak when navigating
tagged with: memory-leaks
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26411633
answers question: http://stackoverflow.com/q/26411500
score: 1
has body: If you want to repeat some lines of code over a set interval, then you should look at window.setInterval(). For your case you could do var scrollInterval = window.setInterval(function () { window.scrollTo(0,document.body.scrollHeight) }, 1500); Although that's probably not the best way to go about it because god help you if you do it on a page that has thousands of posts available like facebook. If ever you want to stop it you can enter into the console: window.clearInterval(scrollInterval);
accepted answer of: http://stackoverflow.com/q/26411500
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41471313
type: Answer
has comment: http://stackoverflow.com/comment/41471268
upvote count: 1

http://stackoverflow.com/a/26378616
accepted answer of: http://stackoverflow.com/q/26373133
answers question: http://stackoverflow.com/q/26373133
has comment: http://stackoverflow.com/comment/41414221
has comment: http://stackoverflow.com/comment/41414907
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41414926
score: 0
has body: I can see a few things: It looks like you're overcomplicating the nest. You should only need to nest a single level. The max value that you're calculating will only ever be the maximum of a single element of the stack, when you actually want the maximum to be the total of the stack. The group elements that you're creating (g), seem to be grouped the "wrong" way. You generally want to group the same "bit" of each stack. That is, you want the first rect of each stack to be in the same group as the other first rects. Then the second one in each stack will be grouped with the other second rects and so on. This is probably due to the nesting error in the first point. You actually need to calculate the valueOffset, which you've got in your fiddle, but is commented out. This value is used to set the relative position when constructing the stack. To help, I've put together what seems right based on what you've written. Check out the snippet below. var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = 400 - margin.left - margin.right, height = 400 - margin.top - margin.bottom; var color = d3.scale.category10(); var data = [ { "period":201409, "type":"MONTH", "amount":85.0 }, { "period":201409, "type":"ENTRY", "amount":111.0 }, { "period":201410, "type":"MONTH", "amount":85.0 }, { "period":201410, "type":"ENTRY", "amount":55.0 } ]; var x = d3.scale.ordinal().rangeRoundBands([0, width], .1, 0); var y = d3.scale.linear().range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .orient("left").ticks(10); var svg = d3.select("#chart") .append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); data.forEach(function(d) { d["period"] = d["period"]; d["amount"] = +d["amount"]; d["type"] = d["type"]; }); var nest = d3.nest() .key(function(d) { return d["type"];}); var dataByTyp…
type: Answer

http://stackoverflow.com/q/26467096
tagged with: user-agent
linked to: http://stackoverflow.com/q/1307013
answer count: 1
tagged with: qunit
tagged with: chutzpah
has body: We have some QUnit javascript tests running in Visual Studio using the Chutzpah test adapter. Everything was working fine until we changed our api (the one being tested by the js files) recently, and added some validations over the UserAgent http header. When I tried to update the tests to change/mock the user agent I realized it was not directly possible even by overriding the default browser property. After a few days of scavenging, I finally found what exactly is happening. Chutzpah is creating a phantomjs page object for the test files to run on. This is being done on a base javascript file (chutzpahRunner.js) located at the Chutzpah adapter installation path. These are the last lines on the file, that effectively start the tests: ... // Allows local files to make ajax calls to remote urls page.settings.localToRemoteUrlAccessEnabled = true; //(default false) // Stops all security (for example you can access content in other domain IFrames) page.settings.webSecurityEnabled = false; //(default true) page.open(testFile, pageOpenHandler); ... Phatomjs supports changing the user agent header by specifying it in the page settings object. If I edit this chutzpahRunner.js file in my machine, and manually set the user agent there, like this: page.settings.userAgent = "MyCustomUserAgent"; My tests start to work again. The problem is that this is not in the project itself, and thus cannot be shared with the rest of the team. Is it possible to change the properties of the phantomjs objects created by Chutzpah to run the tests? I'd like to either change them from inside my own tests, or from another script file I could embed on the pipeline.
type: AnsweredQuestion
tagged with: phantomjs
has answer: http://stackoverflow.com/a/26476186
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41572087
has title: How do I change the underlying Phantomjs object settings using Chutzpah?
linked to: http://stackoverflow.com/q/23963354
score: 0
accepted answer: http://stackoverflow.com/a/26476186

http://stackoverflow.com/q/26393430
type: AnsweredQuestion
type: Question
has title: data-XXX does not return what it is supposed to. Keeps coming back as undefined
has answer: http://stackoverflow.com/a/26393551
has body: I am running the following javascript: $('.change-month').on('click', function(){ if($(this).data('month') == true) show_last_month = true; else show_last_month = false; console.log($(this).html()); $.post('index.php?module=MTDTransactions&action=esajaxContactData', { id: user_id, show_last_month: show_last_month }, function(data){ $('#transaction').html(data); // resizes IFrame var iFrame = window.parent.document.getElementById('dashboardContent'); iFrame.style.height = iFrame.contentWindow.document.body.scrollHeight + 'px'; }); }); $(this).data('month') is undefined. Here is my element: This Month's Oh yeah I a running jquery-1.11.0 and the above is enclosed in a document.ready function
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26393551
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41439617

http://stackoverflow.com/a/26434406
accepted answer of: http://stackoverflow.com/q/26434354
has body: Try var getDomain = "http://" + window.location.hostname + "/";
answers question: http://stackoverflow.com/q/26434354
type: Answer
downvote count: 0
score: 1
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/a/26494293
has body: Split the words in the search string with a regex like searchString.split(/\W/); and do a OR search over each of the words in the resulting array. Updated fiddle var searchStrings = str_needle.split(/\W/); for (var i = 0, len = searchStrings.length; i &lt; len; i++) { var currentSearch = searchStrings[i].toUpperCase(); if (currentSearch !== "") { nameDivs = document.getElementsByClassName("name"); for (var j = 0, divsLen = nameDivs.length; j &lt; divsLen; j++) { if (nameDivs[j].textContent.toUpperCase().indexOf(currentSearch) !== -1) { nameDivs[j].style.display = "block"; } } } }
type: Answer
accepted answer of: http://stackoverflow.com/q/26493665
has comment: http://stackoverflow.com/comment/41622124
answers question: http://stackoverflow.com/q/26493665
has comment: http://stackoverflow.com/comment/93473158
upvote count: 4
type: AcceptedAnswer
score: 4
downvote count: 0

http://stackoverflow.com/q/26407488
tagged with: cordova-3
has answer: http://stackoverflow.com/a/46283812
type: Question
downvote count: 0
tagged with: ios
tagged with: javascript
has body: I develop a mobile application with cordova, and I really need to be able to play inline youtube video. I tried to resolve it for a while: I set the attribute playsinline to 1 in the youtube iframe API I put &lt;preference name="AllowInlineMediaPlayback" value="true"/&gt; in my config.xml Then I set AllowsInlineMediaPlayback to true in the plist in Xcode I even try to put webkit-playsinline directly on the iframe The results are weird. When I play my video the first time, it goes fullscreen. So I inspect my HTML via the remote developer tools to check if the attribute is well set. It is! I do as I would edit it, I leave it without modification, and the magic happen: my video plays inline! Obviously, I can't ask my users to do this trick. Someone have an idea to solve this out? It's kind of an emergency issue...
favorite count: 0
has answer: http://stackoverflow.com/a/76368966
has answer: http://stackoverflow.com/a/49644823
upvote count: 6
answer count: 4
linked to: http://stackoverflow.com/q/34002561
has answer: http://stackoverflow.com/a/59870184
type: UnansweredQuestion
score: 6
has title: Inline youtube video doesn't work in cordova application on iOS
tagged with: youtube-api
tagged with: youtube
has comment: http://stackoverflow.com/comment/55775958

http://stackoverflow.com/a/40317718
type: Answer
has body: For the full screen on YouTube iFrame First of all you have to use the YouTube Iframe Api By Adding Include iframe as For Button Fullscreen Then the code for full-screen the YouTube Video $(document).ready(function () { var player = new YT.Player('youtube_videos_url'); $('#fs').on('click', function () { player.playVideo(); var $$ = document.querySelector.bind(document); var iframe = $$('#youtube_videos_url'); var req = iframe.requestFullscreen || iframe.webkitRequestFullscreen || iframe.mozRequestFullScreen || iframe.msRequestFullscreen; req.call(iframe); }); }); I hope with this function will help you.
score: 0
answers question: http://stackoverflow.com/q/26456453

http://stackoverflow.com/comment/41553582
type: QuestionComment
has text: Can you post more code or a JSFiddle?
comment on: http://stackoverflow.com/q/26456514
score: 0
type: Comment

http://stackoverflow.com/a/26387406
accepted answer of: http://stackoverflow.com/q/26386814
score: 7
has body: Just try the following code: {{$select.selected.synonym}} {{cp.synonym}} Your problem is that you try to show {{$item}} instead of {{$select.selected.synonym}} Hope, this will resolve your problem. Working demo: http://plnkr.co/edit/B3HTozs0MniWBpEj8L50?p=preview
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 7
answers question: http://stackoverflow.com/q/26386814

http://stackoverflow.com/comment/41370805
has text: @Sprottenwels I added some explanation : )
type: AnswerComment
comment on: http://stackoverflow.com/a/26355768
score: 0
type: Comment

http://stackoverflow.com/comment/41485753
type: AnswerComment
has text: If the problem solved, you can mark it as answer. :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26358197

http://stackoverflow.com/comment/41396102
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26369447
score: 3
has text: Why not [jQuery + AJAX call](http://api.jquery.com/jQuery.get/)? Using an ` ` seems super mega hack.

http://stackoverflow.com/comment/41538911
comment on: http://stackoverflow.com/a/26417199
score: 0
type: AnswerComment
has text: @Rudie Yes, it's fine AFAIK. You can also put `#` in the `href`. Then you should call `event.preventDefault()` in the `onclick` handler.
type: Comment

http://stackoverflow.com/comment/41539073
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26448675
has text: Use a class instead of an ID, and use DOM navigation functions like `.parent()` and `.next()` to find the DIV that's after the one that was clicked.
score: 0

http://stackoverflow.com/a/26418511
has comment: http://stackoverflow.com/comment/41483939
score: 0
type: AcceptedAnswer
has body: Try this in your JS $(function() { $("button").click(function(){ $("#demo").html("text"); }); });
has comment: http://stackoverflow.com/comment/41484062
has comment: http://stackoverflow.com/comment/41483976
answers question: http://stackoverflow.com/q/26418479
has comment: http://stackoverflow.com/comment/41484104
type: Answer
accepted answer of: http://stackoverflow.com/q/26418479

http://stackoverflow.com/comment/41559596
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26459515
type: AnswerComment
has text: The problem I have is that I create date1 as: var date1 = new Date("2014-09-28T00:00:00"); date1.setDate(date1.getDate() + 30) and then compare the result to another date. Though the date is now past October 26th the resulting date still carries GMT+02 instead of GMT+01.

http://stackoverflow.com/q/26388722
tagged with: web-worker
accepted answer: http://stackoverflow.com/a/26407614
has body: I am having issues with web worker threads hanging randomly. This is only happening in Firefox (on version 32.0.3). I have a button that when clicked fetches a large list from my API and sorts it via a threaded mergesort implemented in web workers using a threadpool via threadpool.js. The entire system works extremely well in Chrome, but 1 out of maybe every 10 executions hangs in Firefox. If I click the button to cause another fetch/sort to happen while the previous one is hung (each execution creates a new threadpool and therefore new workers), it will then come back to life and finish executing. What is even more interesting, is that I can run a log command as the first line in the function that is executed as the worker when the hang happens and I do not get execution of that line until after it has been "woken up" like I described above. Does anyone have any insight into why this may be happening or some suggestions on tracking it down? I have tried this with and without firebug enabled (since newer versions of firebug hijack some web worker code allowing for console output) in case there was an error on their end, but I get the same results either way.
type: AnsweredQuestion
tagged with: multithreading
has title: Web Worker threads randomly hanging in Firefox
upvote count: 1
tagged with: google-chrome
type: Question
score: 1
has answer: http://stackoverflow.com/a/26407614
tagged with: firefox
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/9339892
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/26408294
answers question: http://stackoverflow.com/q/26408186
type: Answer
has body: Just create a single function to accomplish the same thing twice, or you could just loop over the code for each you wish to setup. function setUp(name){ $(".settings-"+name).hide(); $("#"+name).click(function() { $(".data-tab").hide(); $(".settings-"+name).toggle(); $("li").removeClass("active"); $(this).addClass("active"); }); } setUp('blog'); setUp('twitter');
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/41465490
accepted answer of: http://stackoverflow.com/q/26408186
has comment: http://stackoverflow.com/comment/41465354

http://stackoverflow.com/comment/41593943
score: 0
comment on: http://stackoverflow.com/q/26478541
type: Comment
type: QuestionComment
has text: You say javascript isn't working. There is no javascript in the code you posted. And "isn't working" is very little information. Please create a jsFiddle that demonstrates your problem.

kendo-ui
tags question: http://stackoverflow.com/q/26419297
tags question: http://stackoverflow.com/q/26471969
tags question: http://stackoverflow.com/q/26497275
tags question: http://stackoverflow.com/q/26390230
tags question: http://stackoverflow.com/q/26412245
tags question: http://stackoverflow.com/q/26459438
type: Tag
tags question: http://stackoverflow.com/q/26486943
tag name: kendo-ui
tags question: http://stackoverflow.com/q/26397142
tags question: http://stackoverflow.com/q/26513543
tags question: http://stackoverflow.com/q/26469209
tags question: http://stackoverflow.com/q/26440781
tags question: http://stackoverflow.com/q/26404876
tags question: http://stackoverflow.com/q/26419319
tags question: http://stackoverflow.com/q/26401092
tags question: http://stackoverflow.com/q/26378710
tags question: http://stackoverflow.com/q/26418219
tags question: http://stackoverflow.com/q/26390487
tags question: http://stackoverflow.com/q/26380267
tags question: http://stackoverflow.com/q/26511432
tags question: http://stackoverflow.com/q/26465312

http://stackoverflow.com/q/26385357
tagged with: javascript
has comment: http://stackoverflow.com/comment/41425044
score: 0
has body: I have a problem with jQuery. I want that the header change when you scroll on a website. But my problem is that i can't change the header multiple times. I have a beginning, it works. But now i want that if tou scroll less than 304 pixels ONLY the opacity will be gone. This is my code $(function() { var header = $(".clearHeader"); $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll &gt;= 170 &amp;&amp; scroll &lt;= 305) { header.removeClass('clearHeader extraHeader').addClass('darkHeader'); } else if (scroll &gt;= 305) { $('.aanvraag-button').css({"opacity":"1"}); } else { header.removeClass('darkHeader extraHeader').addClass('clearHeader'); } }); }); Everything just works fine, but i want that the opcaity will be gone if you go under the 304 pixels. I did try it with multiple things like remove the class or set opacity on "" (empty) or "0" but this didn't work. Hope you guys can help me.
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26386787
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: jquery remove class type with scroll
tagged with: scroll
type: Question

http://stackoverflow.com/q/26476226
possible better answer: http://stackoverflow.com/a/58216219
has body: Running into a bizarre bug when trying to make modular gulp tasks by splitting them into separate files. The following should execute the task css, but does not: File: watch.js var gulp = require('gulp'); var plugins = require('gulp-load-plugins')(); gulp.task('watch', function () { plugins.watch('assets/styl/**/*.styl', ['css']); // PROBLEM }); Declaring ['css'] in plugins.watch() should technically run the following task next: File: css.js var gulp = require('gulp'); var plugins = require('gulp-load-plugins')(); gulp.task('css', function () { return gulp.src('assets/styl/*.styl') .pipe(plugins.stylus()) .pipe(gulp.dest('/assets/css')); }); File: gulpfile.js var gulp = require('gulp'); var requireDir = require('require-dir'); requireDir('./gulp/tasks', { recurse: true }); gulp.task('develop', ['css', 'watch']); Folder structure - gulp/ - tasks/ - css.js - watch.js - gulpfile.js Expected behavior gulp develop should run tasks css and watch (it does). On file changes, watch should detect them (it does) and then run the css task (it's does not). One solution Not terribly fond of this solution as gulp.start() is being deprecated in the next release, but this does fix it: File: watch.js plugins.watch('assets/styl/**/*.styl', function() { gulp.start('css'); });
has answer: http://stackoverflow.com/a/58216219
answer count: 2
downvote count: 0
tagged with: gulp
favorite count: 0
accepted answer: http://stackoverflow.com/a/26480579
has title: gulp.watch() not running subsequent task
type: AnsweredQuestion
tagged with: frontend
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26480579
tagged with: javascript

http://stackoverflow.com/q/26457561
has comment: http://stackoverflow.com/comment/41555417
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26457628
has comment: http://stackoverflow.com/comment/41555416
has body: I am trying to write a program that will check to see how many weeks have passed from a certain day. I am using JQuery and JavaScript this code somewhat works in the sense that it does give a result that I want but the results skip 4 weeks at a time for example it goes from #Tip0 to #Tip4 how would I fix this var today = new Date(); var date_start = new Date('2014-07-19'); //date to check from var timeinmilisec = today.getTime() - date_start.getTime(); //check time past var weeks = Math.floor(timeinmilisec / (1000 * 60 * 60 * 24)) / 7 ; // calculate weeks setInterval( //update every 100 miliSec function () { for( i = 0; i &lt; 20; i++) { if (i &lt; weeks ) { i--; $("#Tip" + i).hide() i++; $("#Tip" + i).show() } } }, 100);
type: Question
has answer: http://stackoverflow.com/a/26457628
tagged with: javascript
has title: Check how many weeks have past
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/41466937
type: QuestionComment
comment on: http://stackoverflow.com/q/26408961
score: 1
has text: Cute username, but shouldn't that be `Inverted ɐɯɐll` or even `ɐɯɐll pǝʇɹǝʌuI` :)
type: Comment

http://stackoverflow.com/comment/41581976
type: QuestionComment
comment on: http://stackoverflow.com/q/26472174
score: 0
has text: @SterlingArcher -1 is what I'm getting, but why I do not know..
type: Comment

http://stackoverflow.com/a/26435561
has comment: http://stackoverflow.com/comment/41515812
answers question: http://stackoverflow.com/q/26435441
score: 0
has body: This function will give you an object representing the elements around the selected element at x, y in the matrix matrix: function getSurroundingElements(x, y, matrix) { var x_limit = matrix.length; if (x_limit == 0) return null; //matrix is empty var y_limit = matrix[0].length; //Assumes all rows in the matrix are of same length (otherwise, not a matrix, right?) return { 'tl':((x-1 &gt;= 0 &amp;&amp; y-1 &gt;= 0)?matrix[x-1][y-1]:null), 'tc':((y-1 &gt;= 0)?matrix[x][y-1]:null), 'tr':((x+1 &lt; x_limit &amp;&amp; y-1 &gt;= 0)?matrix[x+1][y-1]:null), 'ml':((x-1 &gt;= 0)?matrix[x-1][y]:null), 'mr':((x+1 &lt; x_limit)?matrix[x+1][y]:null), 'bl':((x-1 &gt;= 0 &amp;&amp; y+1 &lt; y_limit)?matrix[x-1][y+1]:null), 'bc':((y+1 &lt; y_limit)?matrix[x][y+1]:null), 'br':((x+1 &lt; x_limit &amp;&amp; y+1 &lt; y_limit)?matrix[x+1][y+1]:null) }; } NOTE: null is returned if the matrix is empty and null is the value set for illegal values (i.e. edge cases) - Thanks to Troy Gizzi for pointing out a complete solution.
type: Answer
has comment: http://stackoverflow.com/comment/41515797

http://stackoverflow.com/comment/41384862
score: 0
type: Comment
has text: both not working and also ajax do not allow domain level
comment on: http://stackoverflow.com/a/26363285
type: AnswerComment

http://stackoverflow.com/q/26373326
tagged with: javascript
has comment: http://stackoverflow.com/comment/41403495
has answer: http://stackoverflow.com/a/26373394
has comment: http://stackoverflow.com/comment/41403251
has answer: http://stackoverflow.com/a/26373628
answer count: 2
has comment: http://stackoverflow.com/comment/41404205
downvote count: 2
has comment: http://stackoverflow.com/comment/41403642
favorite count: 0
has comment: http://stackoverflow.com/comment/41403256
type: UnansweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41404171
has title: Overcoming Javascript Floating point issues
has comment: http://stackoverflow.com/comment/41403651
has comment: http://stackoverflow.com/comment/41404260
type: Question
has comment: http://stackoverflow.com/comment/41403259
score: -2
has body: parseInt(1.164 * 100000) === 116399 I know that the max number of decimal places is 5. Is there a way to make sure to remove all rounding errors? EDIT: I am getting a few down votes so I wanted to clarify the issue a bit more I know the max decimal is 5 because I know that it is not possible for the database to return a float with more than 5 decimal places There are no strings involved. It is a float. I don't want to use a precision library because it is too heavy to include a library to fix a small bug for the front end. I am wondering if I use Math.round and I will still have issues. For instance, the bug here is 1.164 becomes 1.16399999 (so I can fix the issue by rounding up) but is it possible for 1.164 become 1.6400000001. In this case, if I round up, round it to 116401.

http://stackoverflow.com/a/26463754
downvote count: 0
has comment: http://stackoverflow.com/comment/41566086
type: Answer
has comment: http://stackoverflow.com/comment/41566678
has comment: http://stackoverflow.com/comment/41565918
upvote count: 1
score: 1
has body: Refer this Fiddle You need to use \\? instead of ?.
answers question: http://stackoverflow.com/q/26463620
has comment: http://stackoverflow.com/comment/41566062

http://stackoverflow.com/q/26374706
upvote count: 1
has answer: http://stackoverflow.com/a/26374805
answer count: 1
has title: Hide object's field in JavaScript
accepted answer: http://stackoverflow.com/a/26374805
tagged with: javascript
tagged with: encapsulation
has body: I defined a blueprint for a simple stopwatch object with this function constructor: function StopWatch() { function now() { var d = new Date(); return d.getTime(); } this.start = now(); this.elapsed = function() { return Math.round((now() - this.start) / 1000); } } I can now save the reference to a new stopwatch in s: var s = new Stopwatch(); And obtain the time elapsed in seconds: s.elapsed(); But the start property is also accessible. How can I hide it?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41405678
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41405707
type: Question
tagged with: oop

http://stackoverflow.com/a/26517652
upvote count: 1
has body: It looks like a scope issue. The 'this' inside handleOrientation will refer to 'window'. window.addEventListener("deviceorientation", this.handleOrientation, true); handleOrientation: function(e) { var x = e.gamma; // range [-90,90] var y = e.beta; // range [-180,180] // looking for reference to ball on the window object this.ball.body.velocity.x -= x*2; this.ball.body.velocity.y -= y*4; } One way round this is to 'bind' the handleOrientation method to the current scope like so: window.addEventListener("deviceorientation", this.handleOrientation.bind(this), true); handleOrientation: function(e) { var x = e.gamma; // range [-90,90] var y = e.beta; // range [-180,180] // this now refers to the game object this.ball.body.velocity.x -= x*2; this.ball.body.velocity.y -= y*4; }
answers question: http://stackoverflow.com/q/26495812
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41604478
type: Comment
comment on: http://stackoverflow.com/a/26484486
score: 0
type: AnswerComment
has text: Been trying to implement this solution but for some reason it wont work: ` `

http://stackoverflow.com/comment/41390035
has text: Thanks! You're right it was an SQL query that had those strange characters that carry on as object keys and then to the JSON
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26365831
type: Comment

pikaday
tags question: http://stackoverflow.com/q/26425878
tag name: pikaday
type: Tag

http://stackoverflow.com/a/26508927
type: Answer
has comment: http://stackoverflow.com/comment/41648427
accepted answer of: http://stackoverflow.com/q/26508868
upvote count: 5
has body: You can do: var arr = $(this).parent().find(':checkbox').map(function() { return this.checked; }).get(); That'll get the bool array, if you just want to see if all the children are checked: var areAllChecked = $(this).parent().find(':checkbox:not(:checked)').length === 0;
score: 5
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26508868
has comment: http://stackoverflow.com/comment/41648358

http://stackoverflow.com/a/26466063
has comment: http://stackoverflow.com/comment/41570596
has comment: http://stackoverflow.com/comment/41580481
has comment: http://stackoverflow.com/comment/41581418
answers question: http://stackoverflow.com/q/26465842
has comment: http://stackoverflow.com/comment/41580645
has comment: http://stackoverflow.com/comment/41570694
has comment: http://stackoverflow.com/comment/41581476
score: 0
has comment: http://stackoverflow.com/comment/41570533
has body: You can use the following: var color = {"In Progress": "yellow", "Pending": "red", "Completed": "green"}; $("#stat2").append(BP.status).css('background-color', color[BP.status]); For complete loop, I would recommend following var color = {"In Progress": "yellow", "Pending": "red", "Completed": "green"}; $.getJSON('http://localhost:8080/GChartServlet/data1.json', function(statusDataSet) { $.each(statusDataSet.AP, function(i, f) { if (f.status != undefined) { // New Code after edit $("#stat1").append(f.status).css('background-color', color[f.status]); } }); }); }); Please let me know if you require help in understanding any part of the solution or you face any issue with it. Also, I would recommend changing your data format to following, which is much easier to interpret: { "AP": {"name": "Autogen Program", "status": "Completed", "start": "2014-05-05", "end": "2014-05-05" }, "BP": { "name": "Backend Program", "status": "In Progress", "start": "2014-05-05", "end": "" } } If you are using my suggested format, the function will becoming something like this: var color = {"In Progress": "yellow", "Pending": "red", "Completed": "green"}; $(function() { $.getJSON('http://localhost:8080/GChartServlet/data1.json', function(index, statusDataSet) { $("#stat1").append(statusDataSet.status).css('background-color', color[statusDataSet.status]); }); });
type: Answer

http://stackoverflow.com/comment/41539544
has text: Maybe you can have a look on this subject http://stackoverflow.com/questions/18555020/js-in-rails-app-only-loads-the-first-time
comment on: http://stackoverflow.com/q/26447948
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41406506
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26374979
has text: http://codepen.io/anon/pen/rutDC Are you using
type: Comment

http://stackoverflow.com/a/26358755
type: Answer
upvote count: 53
has body: Adding a key to the element forces the element (and all its children) to be re-rendered when that key changes. (I set the value of 'key' to simply the timestamp of when the initial data was sent.) render: function() { return ( &lt;div key={this.state.timestamp} className="Commissioning"&gt; ...
answers question: http://stackoverflow.com/q/26358144
accepted answer of: http://stackoverflow.com/q/26358144
score: 53
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41582620
has text: @PabloMatíasGomez Gracias ;)
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26472477

http://stackoverflow.com/a/26355111
upvote count: 4
has comment: http://stackoverflow.com/comment/41370734
type: AcceptedAnswer
downvote count: 0
has body: You misspelled your selector. Change: jQuery('.navigaiton') To: jQuery('.navigation')
has comment: http://stackoverflow.com/comment/41369384
has comment: http://stackoverflow.com/comment/41369771
type: Answer
answers question: http://stackoverflow.com/q/26355097
has comment: http://stackoverflow.com/comment/41370262
has comment: http://stackoverflow.com/comment/41369747
accepted answer of: http://stackoverflow.com/q/26355097
score: 4

http://stackoverflow.com/a/26385577
type: Answer
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26385145
accepted answer of: http://stackoverflow.com/q/26385145
has body: Have a look at the async module, it provides great helpers for async programming. One of its key features is the waterfall, it combines async operations to a readable code, what you need would look like this: var mysql = require('mysql'); var async = require('async'); var connection = mysql.createConnection({ host : '100.100.100.100', user : 'userX', password: 'passwordX' }); connection.connect(); connection.query('use db1'); var macAddress; async.waterfall([ function(next){ require('getmac').getMac(next); }, function(ma, next){ macAddress=ma; // store it globaly for further usage connection.query("SELECT nick FROM users WHERE id=1", next); }, function(rows, fields, next){ if(rows.length!=0){ connection.query("UPDATE users SET mac = "+macAddress+" WHERE id = 1", next); } else { next(new Error("No Users found")); // do this if you want to stop here, else just call next(null); to proceed with the next function } }, function(res, next) { // im not sure what args u get in return from the update sql query, you need to replace res with them connection.query("SELECT COUNT(*) as Counter FROM users WHERE id = 1", next); } ], function (err, result) { // should probably be err, rows, fields if (err) console.log("Got Error:", err); console.log("Got Result:", result); });

http://stackoverflow.com/comment/41649957
has text: @Leonardo Don't put tags in title
comment on: http://stackoverflow.com/q/26508564
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26391165
has body: object JavaScriptRouters extends Controller{ def javascriptRoutes = Action { implicit request =&gt; import routes.javascript._ Ok( Routes.javascriptRouter("jsRoutes")( XyzController.getAbc ) ).as("text/javascript") } } I have the above function as per the documentation The XyzController is not an object but a class. I had a question about how to use this exact controller in the template. I tried to use the similar route here com.example.controllers.routes.javascript.XyzController.getAbc - In both the cases I get the same error. [error] found : play.core.Router.JavascriptReverseRoute [error] required: Int [error] com.example.controllers.routes.javascript.XyzController.getAbc [error] ^ [error] one error found [error] (compile:compile) Compilation failed Also I am using activator v1.2.10 Thanks.
answer count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: typesafe-activator
tagged with: playframework
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: scala
linked to: http://stackoverflow.com/q/26247312
upvote count: 1
has title: Play Framework 2.2.2: JavaScript routing error - required: Int

http://stackoverflow.com/a/26425215
has comment: http://stackoverflow.com/comment/41503518
upvote count: 1
has comment: http://stackoverflow.com/comment/41495728
type: Answer
has comment: http://stackoverflow.com/comment/41495494
has comment: http://stackoverflow.com/comment/41495755
downvote count: 0
has body: Well, you could do this: document.write(" button "); Side notes: You're falling prey to The Horror of Implicit Globals — declare your i variable. Normally barring a reason to do something else, in programming we start with 0 rather than 1: for (i = 0; i < 10; i = i + 1) You don't have to, but that's the normal thing to do. i = i + 1 can be written ++i ("increment i"): for (i = 0; i < 10; ++i) Again you don't have to, but that (or its cousin i++) would be much more common than i = i + 1. document.write is fine for small class assignments and such, but just FWIW, you probably wouldn't want to use it in the real world. Use the DOM instead: var btn = document.createElement("button"); btn.id = "btn" + i; document.body.appendChild(btn); HTH, as you're learning...
has comment: http://stackoverflow.com/comment/41495778
has comment: http://stackoverflow.com/comment/41496744
has comment: http://stackoverflow.com/comment/41495686
score: 1
answers question: http://stackoverflow.com/q/26425170

http://stackoverflow.com/comment/41786168
type: Comment
score: 0
type: AnswerComment
has text: Ahh ok. That makes sense. You left off one piece of the JS code, which was the top part with this: `$('LI.tree-item-name').has('ul').click(function() {`. How would I convert that section to this new structure? Sorry...JS noob :|
comment on: http://stackoverflow.com/a/26584524

http://stackoverflow.com/comment/41436248
has text: That's really not that bad... just verbose.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26391595

http://stackoverflow.com/comment/41375652
score: 0
has text: Another side-note, a bit of refactoring (especially on your if statements) I believe would improve performance, which would be more suited for codereview.stackexchange.com
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26358667

http://stackoverflow.com/comment/41533897
score: 0
comment on: http://stackoverflow.com/q/26445541
type: Comment
type: QuestionComment
has text: Fixed it! Just removed the alert and now it says `var create_name = string1 + surname; Writedata(create_name); // now write our username menu_function();` and it works!

http://stackoverflow.com/q/26401105
has body: I have a Jquery multiselect control $(function () { $(".multiselect").multiselect().multiselectfilter({ filter: function (event, matches) { if (matches.length != null &amp;&amp; !matches.length) { // do something } } }); }); And this is linked to a DropDownListFor @Html.DropDownListFor(x =&gt; x.ID, new MultiSelectList(Model.Employees, "Id", "Name"), "Please Select", new {multiple = "multiple", @class = "multiselect"}) When I press a button to post, the strongly typed model does send whoever has been selected in the list. Good. However, after the post, it only displays the first selected item in the DropDownListFor and not the others. I do send the model back when the post has happened with the IDs that are selected // Model.ID which is a `int[]` is bounded to the `DropDownListFor` above has multiple values inside it. return View("View" Model) Do I need to do something to the Jquery or the razor side to display the other selected items on postback? Thanks
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/41452967
tagged with: c#
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/41456033
tagged with: javascript
has comment: http://stackoverflow.com/comment/41453338
has comment: http://stackoverflow.com/comment/41457606
has comment: http://stackoverflow.com/comment/41452439
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41452816
has comment: http://stackoverflow.com/comment/41456778
has comment: http://stackoverflow.com/comment/41457202
tagged with: jquery
has comment: http://stackoverflow.com/comment/41452507
tagged with: asp.net
has title: Jquery multiselect comes back with one selected after POST
has comment: http://stackoverflow.com/comment/41452089
has answer: http://stackoverflow.com/a/26405102
has comment: http://stackoverflow.com/comment/41458904
has comment: http://stackoverflow.com/comment/41457925
has comment: http://stackoverflow.com/comment/41452620
has answer: http://stackoverflow.com/a/26402349

http://stackoverflow.com/a/26376090
score: 5
accepted answer of: http://stackoverflow.com/q/26371847
answers question: http://stackoverflow.com/q/26371847
type: AcceptedAnswer
upvote count: 5
has comment: http://stackoverflow.com/comment/41417361
has comment: http://stackoverflow.com/comment/41414028
type: Answer
has comment: http://stackoverflow.com/comment/41417651
downvote count: 0
has body: Yes, the basic idea of ray casting is that we project a ray perpendicular to the plane we find out the list of objects that the ray has intersected. So all you have to do to access the first element is adding the following piece of code. var intersects = raycaster.intersectObjects(objects); if (intersects.length &gt; 0) { var firstIntersectedObject = intersects[0]; // this will give you the first intersected Object if there are multiple. } Here is one of my other SO post in which I have explained things in a bit more detailed way, you can refer it to better understand how raycasting functions.
has comment: http://stackoverflow.com/comment/41416099

http://stackoverflow.com/comment/41440220
comment on: http://stackoverflow.com/q/26393629
score: 0
has text: @jfriend00: It doesn't fix all that is wrong in the world. It only fixes that which was presented in the question.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41401715
type: Comment
comment on: http://stackoverflow.com/a/26363080
score: 0
type: AnswerComment
has text: would be great if you could provide an explanation when downvoting

http://stackoverflow.com/q/26424389
accepted answer: http://stackoverflow.com/a/26424469
answer count: 1
has title: using the time as a dynamic variable to compare values
has answer: http://stackoverflow.com/a/26424469
has body: I am working on programming a page in JS that grabs calendar data from an outside source, imports it into a multidimensional array and uses it to display who is currently working along with their photo, phone number, etc. Right now I have it set up so that the page reloads every 15 minutes. I'd prefer to have this all done dynamically so that when, say, the clock strikes 5pm the page knows to update without having to wait until the 15 minute refresh is triggered. All of the work times are pulled from the other calendar in 24 hour format (so 5pm is 1700). Here's how I'm generating the current time to compare with the start/end times in the calendar: //Get the current date and time var dateTime = new Date(); var month = dateTime.getMonth() + 1; var day = dateTime.getDate(); var dayOfWeek = dateTime.getDay(); var year = dateTime.getYear() + 1900; //converting hours and minutes to strings to form the 24h time var hours = dateTime.getHours().toString(); if (hours.length === 1) { var hours = '0' + hours }; var minutes = dateTime.getMinutes().toString(); if (minutes.length === 1) { var minutes = '0' + minutes }; var time = hours + minutes; //convert the 24h time into a number to read from later var timeNumber = parseInt(time); I then use if statements to compare the start/end times from the imported schedule with timeNumber to determine who is currently working and push that to an array that is eventually displayed on the page with this code: //figure out who is currently working and put them in the workingNow array var workingNow = []; for (i = 0; i &lt; workingToday.length; i++){ //convert time strings to numbers to compare var startTime = parseInt(workingToday[i][7]); var endTime = parseInt(workingToday[i][8]); //compare start and end times with the current time and add those who are working to the new list if(startTime &lt; timeNumber &amp;&amp; timeNumber &lt; endTime){ workingNow.push(workingToday[i]); } }; I guess I have just been trying to figure out how to make th…
type: AnsweredQuestion
type: Question
tagged with: arrays
tagged with: javascript
score: 0

http://stackoverflow.com/a/26437250
type: Answer
answers question: http://stackoverflow.com/q/26437235
has body: Use val() bacause you are getting form input fields values $('#btn_res').click(function(){ $('#calculate').find("input[type=text]").each(function(){ str+=$(this).val(); }) $('#result').text(str); });
score: 0

http://stackoverflow.com/comment/41629964
type: Comment
has text: Is it not undesirable for any app/website not to be able to render if somehow somebody refreshed the page? This is case I face if I use Router. Or I do not know to overcome this refresh issue and use routers at the same time. In my app this pages exist together in the DOM and they just come to the screen by a full page slide(if do not try to implement otherwise i.e. they are fetched every time). It has the feel of the same page inbetween sliding.Answers to three questions are almost totally no for each.I was just trying to attain best practices.Thought it was use of routers here,as controller.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26498454

http://stackoverflow.com/q/26454541
tagged with: wordpress
tagged with: php
type: Question
has body: I have applied a mega menu in one of my websites i.e. http://www.risenotes.com but when I try to convert it into a single and shortened menu for mobile view, it does not work. I succeeded initially for mobile view but only either of the two views work. Can anyone guide about any javascript code for displaying mega menu as regular mobile menu. I tried using the below javascript but it succeeded me in my work on mobile version only while regular website version failed. Also, please that I have installed a mobile menu on http://www.risequotes.com which works perfect. That website is built in wordpress while my mega menu site is a php based website. Is there a way to apply my wordpress menu style to my php site? I mean some script. I have tried below script which worked for conversion into mobile menu (including icons) but I need a bit more sophisticated version. My current use of CSS hides the menu for mobile view and displays only parent Lists.
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26457158
has title: Mega menu conversion to mobile dropdown
score: 0
tagged with: css
type: UnansweredQuestion

http://stackoverflow.com/a/26502506
downvote count: 0
has comment: http://stackoverflow.com/comment/41655977
has comment: http://stackoverflow.com/comment/41643442
upvote count: 6
has comment: http://stackoverflow.com/comment/115275265
has body: There doesn't seem to be a built in way to do that. It does have "Path.Arc(start, through, end);" which make much more sense in most cases. However, with that you could just engineer a way: function getCreateArcInfo(degrees,center,radius){ return { from: { x:center.x + radius, y: center.y }, through: { x: center.x + Math.cos(degrees/2) * radius, y: center.y + Math.sin(degrees/2) * radius }, to: { x: center.x + Math.cos(degrees) * radius, y: center.y + Math.sin(degrees) * radius }, strokeColor: 'black' } } var arcValues = getCreateArcInfo(4, {x:253,y:334}, 160) var myArc = new Path.Arc(arcValues) http://goo.gl/YDQQl3
has comment: http://stackoverflow.com/comment/41643538
answers question: http://stackoverflow.com/q/26485801
score: 6
type: Answer

http://stackoverflow.com/a/26466141
type: Answer
accepted answer of: http://stackoverflow.com/q/26466045
upvote count: 4
score: 4
type: AcceptedAnswer
downvote count: 0
has body: You can use replace to convert'\n' or '\n\r' characters with ' ' Here an example: var myString = 'some text \n'; var parsed= myString.replace(/\n\r?/g, ' '); console.log(parsed); Fully working example here: http://jsfiddle.net/r6xrf5wh/1/ Just inspect the "the red box" to see the automatically inserted when using line break in the input field. Click Me! x
answers question: http://stackoverflow.com/q/26466045

http://stackoverflow.com/comment/41516855
comment on: http://stackoverflow.com/q/26436090
score: 0
type: QuestionComment
has text: the variable that im specifiying in the view
type: Comment

http://stackoverflow.com/q/26511267
has answer: http://stackoverflow.com/a/26511318
tagged with: promise
type: Question
has comment: http://stackoverflow.com/comment/41652671
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26511428
has body: I am new to jQuery Promises but I am using them fine in other parts of the app, but this one does not seem to be working as expected. Seems it is not waiting for the return before executing the next code. function setActivityOnGrid(){ ...snip... var sameActivityCnt = $(actId).length; if(sameActivityCnt){ sameActivityDialog().then(function(retVal) { if(retVal == true){ activityid += "-"+sameActivityCnt++; } }); } //code here is being executed before the dialog is even shown } function sameActivityDialog(){ var deferred = $.Deferred(); bootbox.confirm("You have already added this activity. Would you like to add it again?", function(result) { deferred.resolve(result); }); return deferred.promise(); }
has title: Why is this Promise not working correctly?
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/26511318
has answer: http://stackoverflow.com/a/26511428

http://stackoverflow.com/comment/41641332
score: 0
type: QuestionComment
type: Comment
has text: There is no reliable way to do what you want.
comment on: http://stackoverflow.com/q/26505204

http://stackoverflow.com/comment/41616472
type: AnswerComment
type: Comment
has text: sorry, I wanted to put `script` tag around it!!
score: 1
comment on: http://stackoverflow.com/a/26491273

http://stackoverflow.com/q/26420511
has comment: http://stackoverflow.com/comment/41502121
has body: A static page with pure JS and HTML and a svg file inserted in an "object" tag, everything is fine, but in one point I have noticed a stack of errors in the console. Everything works, but anyway I would like to understand the origin of it. I tried to move file, clear cache, attaching svg using JS code at the end of page load, removing all of JS leaving file in pure HTML, removing reference to the CSS file in the svg itself, the error is always the same and it doesn't show only when the svg is out. Google Chrome Version 38.0.2125.58 beta on linux peppermint os three, I didn't noticed anything like that in FF and I didn't test other browsers. Greetings Error in event handler for (unknown): Cannot read property 'addEventListener' of null Stack trace: TypeError: Cannot read property 'addEventListener' of null at initialize (chrome-extension://mdgdbmohcdjfbglkepkiaabaieenhhhc/inject.js:367:16) at handleMessage (chrome-extension://mdgdbmohcdjfbglkepkiaabaieenhhhc/inject.js:58:5) at EventImpl.dispatchToListener (extensions::event_bindings:397:22) at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:93:26) at EventImpl.dispatch_ (extensions::event_bindings:379:35) at EventImpl.dispatch (extensions::event_bindings:403:17) at Event.publicClass.(anonymous function) [as dispatch] (extensions::utils:93:26) at dispatchOnMessage (extensions::messaging:304:22) extensions::uncaught_exception_handler:9 handler extensions::uncaught_exception_handler:9 exports.handle extensions::uncaught_exception_handler:15 EventImpl.dispatch_ extensions::event_bindings:384 EventImpl.dispatch extensions::event_bindings:403 target.(anonymous function) extensions::SafeBuiltins:19 publicClass.(anonymous function) extensions::utils:93 dispatchOnMessage extensions::messaging:304
answer count: 0
has title: SVG cause a row of errors thrown in Chrome console
tagged with: google-chrome
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41487634
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41488869
has comment: http://stackoverflow.com/comment/41510714
tagged with: css

http://stackoverflow.com/a/26475770
type: Answer
accepted answer of: http://stackoverflow.com/q/26475445
has comment: http://stackoverflow.com/comment/90267761
answers question: http://stackoverflow.com/q/26475445
has body: An alternative to disabling the button would be to use the .one() method and re-bind the event handler after callback: var clickHandler = function(e){ $.ajax({ url: url, type: 'POST', async: true, dataType: 'json', enctype: 'multipart/form-data', cache: false, success: function(data){ $('#button1').one('click', clickHandler); }, error: function(){} }); e.stopImmediatePropagation(); return false; } $('#button1').one('click', clickHandler);
downvote count: 0
upvote count: 45
has comment: http://stackoverflow.com/comment/113245193
has comment: http://stackoverflow.com/comment/49153750
score: 45
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/107101445

requirejs
tags question: http://stackoverflow.com/q/26359990
tags question: http://stackoverflow.com/q/26472617
tag name: requirejs
tags question: http://stackoverflow.com/q/26506305
tags question: http://stackoverflow.com/q/26381105
tags question: http://stackoverflow.com/q/26497988
type: Tag
tags question: http://stackoverflow.com/q/26445318
tags question: http://stackoverflow.com/q/26474595
tags question: http://stackoverflow.com/q/26505925
tags question: http://stackoverflow.com/q/26455132
tags question: http://stackoverflow.com/q/26381030
tags question: http://stackoverflow.com/q/26379625
tags question: http://stackoverflow.com/q/26375015
tags question: http://stackoverflow.com/q/26437787
tags question: http://stackoverflow.com/q/26410397
tags question: http://stackoverflow.com/q/26430393
tags question: http://stackoverflow.com/q/26358845
tags question: http://stackoverflow.com/q/26474247
tags question: http://stackoverflow.com/q/26400585
tags question: http://stackoverflow.com/q/26406226
tags question: http://stackoverflow.com/q/26459857
tags question: http://stackoverflow.com/q/26403551
tags question: http://stackoverflow.com/q/26446433

http://stackoverflow.com/comment/41407965
has text: There is no JS Math function to do that. You're going to have to write something yourself.
comment on: http://stackoverflow.com/q/26363702
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26445608
has body: I am trying to set up a Grunt task to ssh into a remote server and perform some operations using grunt-ssh. I am using git bash on a windows machine. The relevant parts of my Gruntfile.js are the following: grunt.initConfig({ sshconfig: { portfolioServer: { host: 'myWebsite.com', username: 'root', agent: process.env.SSH_AUTH_SOCK, } }, sshexec:{ deploy:{ command: [ 'cd portfolio', 'git pull' ].join(' &amp;&amp; ') }, options:{ config: 'portfolioServer' } }, ........etc. grunt.loadNpmTasks('grunt-ssh'); My problem is that when I run my grunt deploy task, i get the following error: Running "sshexec:deploy" (sshexec) task Warning: Connection :: error :: Error: Malformed cygwin unix socket file Use --force to continue. Aborted due to warnings. If I then run using the --force flag, I get the following output: Running "sshexec:deploy" (sshexec) task Warning: Connection :: error :: Error: Malformed cygwin unix socket file Used --force, continuing. Warning: Connection :: error :: Error: Authentication failure. Available authentication methods: publickey,password Used --force, continuing. Done, but with warnings. This seems to suggest I have either set up my SSH authentication incorrectly, or that the commands I have used to get the command line to recognize my keys are poorly formed. This confuses me a little, as I have followed the instructions here to set up SSH keys on the command line, and am able to successfully ssh into my server by typing ssh root@myWebsite.com What is going wrong?
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: windows
tagged with: ssh
has comment: http://stackoverflow.com/comment/44672549
has title: Grunt-SSH error: Malformed cygwin unix socket file
answer count: 0
score: 1
upvote count: 1
tagged with: git-bash
type: Question
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/48283752

http://stackoverflow.com/comment/41553377
has text: about my comment in javascript. No you don't need to add anything there. `$.post` IS ajax request. Using jQuery to send an ajax request is extremely easy if you look into it and give it an hour of dedicated practice. Read more about it here. http://api.jquery.com/jquery.post/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26411332

http://stackoverflow.com/comment/41460177
type: Comment
has text: Its a list inside an overflow:hidden And the content of the list is also rendered by javascript
comment on: http://stackoverflow.com/q/26405138
score: 0
type: QuestionComment

http://stackoverflow.com/a/26396807
answers question: http://stackoverflow.com/q/26396073
has body: Try this var html = ' bam '; var doc = (new DOMParser).parseFromString(html, 'text/html'); #document bam
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/41446157

php
tags question: http://stackoverflow.com/q/26440939
tags question: http://stackoverflow.com/q/26360337
tags question: http://stackoverflow.com/q/26495880
tags question: http://stackoverflow.com/q/26456871
tags question: http://stackoverflow.com/q/26425110
tags question: http://stackoverflow.com/q/26412182
tags question: http://stackoverflow.com/q/26407433
tags question: http://stackoverflow.com/q/26501566
tags question: http://stackoverflow.com/q/26386136
tags question: http://stackoverflow.com/q/26449956
tags question: http://stackoverflow.com/q/26420648
tags question: http://stackoverflow.com/q/26469996
tags question: http://stackoverflow.com/q/26475105
tags question: http://stackoverflow.com/q/26354484
tags question: http://stackoverflow.com/q/26394893
tags question: http://stackoverflow.com/q/26490571
tags question: http://stackoverflow.com/q/26460679
tags question: http://stackoverflow.com/q/26510645
tags question: http://stackoverflow.com/q/26480807
tags question: http://stackoverflow.com/q/26448752
tags question: http://stackoverflow.com/q/26418777
tags question: http://stackoverflow.com/q/26495410
tags question: http://stackoverflow.com/q/26397924
tags question: http://stackoverflow.com/q/26360116
tags question: http://stackoverflow.com/q/26387096
tags question: http://stackoverflow.com/q/26460211
tags question: http://stackoverflow.com/q/26474600
tags question: http://stackoverflow.com/q/26440781
tags question: http://stackoverflow.com/q/26354472
tags question: http://stackoverflow.com/q/26500529
tags question: http://stackoverflow.com/q/26410422
tags question: http://stackoverflow.com/q/26462023
tags question: http://stackoverflow.com/q/26452397
tags question: http://stackoverflow.com/q/26501521
tags question: http://stackoverflow.com/q/26510254
tags question: http://stackoverflow.com/q/26500721
tags question: http://stackoverflow.com/q/26450230
tags question: http://stackoverflow.com/q/26407208
tags question: http://stackoverflow.com/q/26466365
tags question: http://stackoverflow.com/q/26461926
tags question: http://stackoverflow.com/q/26416276
tags question: http://stackoverflow.com/q/26436090
tags question: http://stackoverflow.com/q/26354459
tags question: http://stackoverflow.com/q/26406110
tags question: http://stackoverflow.com/q/26387749
tags question: http://stackoverflow.com/q/26447827
tags question: http://stackoverflow.com/q/26389801
tags question: http://stackoverflow.com/q/26459546
tags question: http://stackoverflow.com/q/26430843
tags question: http://stackoverflow.com/q/26500065
tags question: http://stackoverflow.com/q/26433358
tags question: http://stackoverflow.com/q/26443167
tags question: http://stackoverflow.com/q/26423053
tags question: http://stackoverflow.com/q/26379771
tags question: http://stackoverflow.com/q/26435159
tags question: http://stackoverflow.com/q/26443825
tags question: http://stackoverflow.com/q/26407148
tags question: http://stackoverflow.com/q/26383548
tags question: http://stackoverflow.com/q/26419711
tags question: http://stackoverflow.com/q/26436508
tags question: http://stackoverflow.com/q/26386404
tags question: http://stackoverflow.com/q/26490919
tags question: http://stackoverflow.com/q/26386973
tags question: http://stackoverflow.com/q/26477924
tags question: http://stackoverflow.com/q/26389545
tags question: http://stackoverflow.com/q/26510574
tags question: http://stackoverflow.com/q/26449227
tags question: http://stackoverflow.com/q/26373197
tags question: http://stackoverflow.com/q/26416356
tags question: http://stackoverflow.com/q/26465335
tags question: http://stackoverflow.com/q/26493450
tags question: http://stackoverflow.com/q/26398164
tags question: http://stackoverflow.com/q/26399741
tags question: http://stackoverflow.com/q/26398254
tags question: http://stackoverflow.com/q/26356869
tags question: http://stackoverflow.com/q/26397095
tags question: http://stackoverflow.com/q/26362306
tags question: http://stackoverflow.com/q/26375638
tags question: http://stackoverflow.com/q/26488622
tags question: http://stackoverflow.com/q/26378569

http://stackoverflow.com/a/26369391
has comment: http://stackoverflow.com/comment/41396095
type: AcceptedAnswer
downvote count: 0
has body: Remember this: Always, whatever be the value of the variable string (including empty string) string.search("") = 0 So, check for length of the string! if (string.length == 0) // Empty string
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26369069
answers question: http://stackoverflow.com/q/26369069

http://stackoverflow.com/comment/41414298
type: QuestionComment
comment on: http://stackoverflow.com/q/26378925
has text: Why don't you use `document.addEventListener( "DOMContentLoaded", function(e) { document.getElementById("toggled").innerHTML = "ready"; alert("Stop!"); }, false );`?
type: Comment
score: 0

http://stackoverflow.com/q/26472050
tagged with: javascript
score: 0
has body: I am using the rectangular library with angular.js. I currently have a service called me that represents the currently authenticated user. services/me I also have a service called desk that represents that user's current location by returning a single desk object. services/me/desk I want to be able to delete the desk to remove a person's current location, by calling a delete request on it. However, whenever I do, restangular adds the id of the desk as a parameter making the url: services/me/desk/:id I can't for the life of me figure out how to get it to send a delete request without automatically appending the ID. Please let me know if there is a way to do this within the library. Thanks!
tagged with: restangular
tagged with: angularjs
has answer: http://stackoverflow.com/a/26475107
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26475107
has title: Restangular - Delete Request Without ID
answer count: 1

http://stackoverflow.com/comment/41505574
type: QuestionComment
has text: do a try{}catch(){} around the checking process instead of throwing an error.. They're a little more expensive but will ensure the service doesn't fatally collapse..
type: Comment
comment on: http://stackoverflow.com/q/26428704
score: 0

http://stackoverflow.com/comment/41467901
has text: I don't really understand what you want to achieve. Please provide more details.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26409596

http://stackoverflow.com/comment/41585466
type: Comment
has text: maybe there is a syntax error in the css above, so it is not being recognised. can you post more of the css ?
score: 0
comment on: http://stackoverflow.com/q/26473804
type: QuestionComment

http://stackoverflow.com/a/26432903
type: Answer
has body: Inside your click-function this refers to the clicked element, so $(this) and $("#BNOCM_tab") is always the same. Also your second if should be an else, because now you just swap the classes from "in" to out as @wwwmarty pointed to. So yours (inside $(document).ready) could look like this: &lt;div id="BNOCM_tab" class="out"&gt;&lt;/div&gt; // add class 'out to the tab var $Wrap = $("#CMTabWrap"), // create a jQuery object only once, store it $Tab = $("#BNOCM_tab"); $Tab.click(function () { var contentWidth = $('#CMContent').width(); // use .hasClass() for class check, note there's no dot in the name if ($Tab.hasClass('out')) { $Tab.removeClass('out').addClass('in'); $Wrap.animate({left: '+=' + contentWidth}, "slow"); } else { $Tab.removeClass('in').addClass('out'); $Wrap.animate({left: '-=' + contentWidth}, "slow"); }; }); If that won't work, add the relevant part of your html to your question or/and make a fiddle and post what exactly went wrong.
has comment: http://stackoverflow.com/comment/41574004
answers question: http://stackoverflow.com/q/26432414
score: 0

http://stackoverflow.com/comment/41599161
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26481676
has text: use d3.js, it is free. http://datamaps.github.io/

http://stackoverflow.com/a/26378072
has comment: http://stackoverflow.com/comment/41413224
has comment: http://stackoverflow.com/comment/41412994
has comment: http://stackoverflow.com/comment/41413348
has comment: http://stackoverflow.com/comment/41412020
has comment: http://stackoverflow.com/comment/41413434
has comment: http://stackoverflow.com/comment/41413299
answers question: http://stackoverflow.com/q/26377648
score: 0
has comment: http://stackoverflow.com/comment/41412257
has comment: http://stackoverflow.com/comment/41415741
has body: I can't provide you the actual code right now, but here it goes. You have the following options for your dropdown. &lt;option value="@lLMMI.Key.Product.PCode"&gt; @locItem.Key.Loc.N (@lLMMI.Key.Loc.Code) &lt;/option&gt; For example, you want to show @lLMMI.Key.Product.PCode + @lLMMI.Key.Product.PName + @lLMMI.Key.Product.PAddress. Why not load what you will show to your options' values and show them when selected? Like: &lt;option value="@lLMMI.Key.Product.PCode + @lLMMI.Key.Product.PName + @lLMMI.Key.Product.PAddress"&gt; @locItem.Key.Loc.N (@lLMMI.Key.Loc.Code) &lt;/option&gt; And change the function to: function onChange() { var myDropDown = document.getElementById("mydropdown"); var myValue = myDropDown.options[myDropDown.selectedIndex].value; var myDiv = document.getElementById("summary"); fieldNameElement.innerHTML = myValue; } As others mentioned, you cannot play with Razor (server side) and Javascript (client side) like that. Think of Razor code running only once at the page load. If you want to do stuff after the page load, you need to assign your Razor variables to some client side elements and operate with client side code, JavaScript in your example.
has comment: http://stackoverflow.com/comment/41413063
type: Answer
has comment: http://stackoverflow.com/comment/41412798
has comment: http://stackoverflow.com/comment/41412377

http://stackoverflow.com/a/26380171
accepted answer of: http://stackoverflow.com/q/26379938
has body: If you're using HTML5 &lt; video > tag (let's suppose it has "myVideo" as ID) you can get/set its time with the command var vid = document.getElementById("myVideo"); vid.currentTime = 5; alert(vid.currentTime); and video duration with alert(vid.duration) There's also a direct way to check if a video, by adding a Javascript listener. document.getElementById('myVideo').addEventListener('ended',myHandler,false); function myHandler(e) { if(!e){ e = window.event; } alert("Ended."); //Replace this with the code you need to execute when video ends } Sources and examples: currentTime, duration.
has comment: http://stackoverflow.com/comment/41416023
answers question: http://stackoverflow.com/q/26379938
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41419998
downvote count: 0
score: 1

http://stackoverflow.com/q/26504307
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/26505226
tagged with: twitter-bootstrap-3
type: AnsweredQuestion
score: 0
has body: Here's the link The header works perfectly on chrome + opera but is broken on firefox + IE. This is build using bootstrap 3.2. I've spent 2 hours to solve this but could not find any issues in code. may be I missed something, any help would be appreciated.
accepted answer: http://stackoverflow.com/a/26505226
type: Question
has title: bootstrap 3.2 header broken in firefox and IE. Works fine in chorme + opera
tagged with: javascript

http://stackoverflow.com/q/26392841
has body: I'm trying to create a HTML button that when pressed, it changes the color of my simple triangle object in webgl. I have the button set up in a way that when pressed, a new vec4 set to green, blue, or red is assigned and then sends that data to the buffer again but I am doing something very wrong as the color does not change. any pointers? This is a homework assignment so I don't want full answers, just pointed in the next direction.
has answer: http://stackoverflow.com/a/26409448
answer count: 1
favorite count: 0
has title: Using buttons to change color in WebGL
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26409448
score: 1
tagged with: webgl
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41581495
type: QuestionComment
has text: It's a fair argument, but I kinda like the testability feature of angular modules. Besides I'd like the whole code to be modular using angular module system.
comment on: http://stackoverflow.com/q/26471939
score: 0
type: Comment

http://stackoverflow.com/comment/41525486
type: Comment
type: QuestionComment
has text: Yes, [there is no `Uint64Array`](http://stackoverflow.com/q/6041124/1048572), because it's not ([yet?](https://esdiscuss.org/topic/proposal-for-new-floating-point-and-integer-data-types)) possible to have 64bit integer values in JS.
comment on: http://stackoverflow.com/q/26401809
score: 0

http://stackoverflow.com/q/26471582
answer count: 1
has answer: http://stackoverflow.com/a/30708889
tagged with: terminal
tagged with: linux
type: AnsweredQuestion
has body: I'm implementing a web-based, shared Linux terminal (using term.js), and one issue I'm facing is the potential screen size differences of various connected users. For e.g. if I set export COLUMNS=160, then people with small screens have badly formatted output when they do a ls etc. I know screen allows you to share terminals - how does screen account for change in resolutions of individual users?
accepted answer: http://stackoverflow.com/a/30708889
has title: Shared linux terminal - accounting for resolution differences
type: Question
tagged with: javascript
tagged with: gnu-screen
score: 0

http://stackoverflow.com/q/26390866
type: Question
upvote count: 0
has title: Scraping an xls file from javascript (web page) in R
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/r
has answer: http://stackoverflow.com/a/26391118
has body: I am attempting to create an R script that specifically details how to acquire the data I am using for analysis in R for reproducability reasons. Usually the first step is as simple as assigning a url for the xls file to a variable in R and proceeding from there, but the website I am scraping from seems to produce its xls files via javascript (A language I have no knowledge of). Follow these steps to get to an example XLS: Go to http://hcupnet.ahrq.gov/HCUPnet.jsp?Id=B08F84A071883804&amp;Form=SelDXPR&amp;JS=Y&amp;Action=%3E%3ENext%3E%3E&amp;_DXPR=DX1 Click "Principal Diagnosis" Type "599.0" in the text box (without the quotation marks) and leave the radio button for "Each code separately" checked Click "Next" On this page check all of the radio buttons Click "Next" On this page check all of the radio buttons Click "Next" On this page you should see all of the data, as well as some links. One of these links is titled "Save results as an Excel spreadsheet". Clicking on this link will download an XLS file with the data to your computer. I've inspected the element and can clearly see that it is querying a database, I'm just not entirely sure how to get that query into my R script to pull the xls file down. Any help is much appreciated.
type: UnansweredQuestion
score: -3
downvote count: 3
has comment: http://stackoverflow.com/comment/41439900
has comment: http://stackoverflow.com/comment/41435415

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/26471138
tags question: http://stackoverflow.com/q/26451049
tags question: http://stackoverflow.com/q/26388789
tags question: http://stackoverflow.com/q/26501521
tags question: http://stackoverflow.com/q/26369674
tags question: http://stackoverflow.com/q/26465842
tags question: http://stackoverflow.com/q/26450359
tags question: http://stackoverflow.com/q/26496079
tags question: http://stackoverflow.com/q/26466270
tags question: http://stackoverflow.com/q/26420714
tags question: http://stackoverflow.com/q/26461926
tags question: http://stackoverflow.com/q/26487692
tags question: http://stackoverflow.com/q/26394061
tags question: http://stackoverflow.com/q/26405394
tags question: http://stackoverflow.com/q/26459546
tags question: http://stackoverflow.com/q/26409735
tags question: http://stackoverflow.com/q/26500105
tags question: http://stackoverflow.com/q/26481216
tags question: http://stackoverflow.com/q/26422807
tags question: http://stackoverflow.com/q/26422036
tags question: http://stackoverflow.com/q/26436037
tags question: http://stackoverflow.com/q/26456248
tags question: http://stackoverflow.com/q/26369069
tags question: http://stackoverflow.com/q/26433663
tags question: http://stackoverflow.com/q/26447477
tags question: http://stackoverflow.com/q/26465916
tags question: http://stackoverflow.com/q/26416356
tags question: http://stackoverflow.com/q/26403342
tags question: http://stackoverflow.com/q/26423205
tags question: http://stackoverflow.com/q/26432134
tags question: http://stackoverflow.com/q/26376223
tags question: http://stackoverflow.com/q/26353984
tags question: http://stackoverflow.com/q/26440590
tags question: http://stackoverflow.com/q/26419443
tags question: http://stackoverflow.com/q/26369808
tags question: http://stackoverflow.com/q/26419379
tags question: http://stackoverflow.com/q/26414584
tags question: http://stackoverflow.com/q/26508129
tags question: http://stackoverflow.com/q/26504568
tags question: http://stackoverflow.com/q/26464089
tags question: http://stackoverflow.com/q/26366387
tags question: http://stackoverflow.com/q/26411350
tags question: http://stackoverflow.com/q/26444640
tags question: http://stackoverflow.com/q/26431948
tags question: http://stackoverflow.com/q/26437657
tags question: http://stackoverflow.com/q/26500449
tags question: http://stackoverflow.com/q/26511705
tags question: http://stackoverflow.com/q/26484137
tags question: http://stackoverflow.com/q/26498043
tags question: http://stackoverflow.com/q/26401950
tags question: http://stackoverflow.com/q/26455801
tags question: http://stackoverflow.com/q/26353928
tags question: http://stackoverflow.com/q/26385717
tags question: http://stackoverflow.com/q/26406110
tags question: http://stackoverflow.com/q/26463297
tags question: http://stackoverflow.com/q/26404785
tags question: http://stackoverflow.com/q/26442617
type: Tag
tags question: http://stackoverflow.com/q/26400463
tags question: http://stackoverflow.com/q/26393371
tags question: http://stackoverflow.com/q/26478090
tags question: http://stackoverflow.com/q/26431010
tags question: http://stackoverflow.com/q/26383040
tags question: http://stackoverflow.com/q/26473739
tags question: http://stackoverflow.com/q/26471788
tags question: http://stackoverflow.com/q/26480808
tags question: http://stackoverflow.com/q/26458866
tags question: http://stackoverflow.com/q/26366269
tags question: http://stackoverflow.com/q/26488683
tags question: http://stackoverflow.com/q/26460456
tags question: http://stackoverflow.com/q/26405553
tags question: http://stackoverflow.com/q/26361841
tags question: http://stackoverflow.com/q/26441476
tags question: http://stackoverflow.com/q/26377268
tags question: http://stackoverflow.com/q/26374099
tags question: http://stackoverflow.com/q/26421933
tags question: http://stackoverflow.com/q/26373133
tags question: http://stackoverflow.com/q/26424337
tags question: http://stackoverflow.com/q/26458269
tags question: http://stackoverflow.com/q/26434934

http://stackoverflow.com/comment/41498837
has text: iframes, or ajax calls to replace parts of the main page with the "next" page.
comment on: http://stackoverflow.com/q/26426960
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26500721
has comment: http://stackoverflow.com/comment/41634115
tagged with: tags
has comment: http://stackoverflow.com/comment/41639738
tagged with: tag-it
downvote count: 0
tagged with: javascript
has title: Tag-it variable cannot pass as post variable in html form
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41643094
favorite count: 0
has body: I Use below html page for tag-it. But when i submit the form, i can't get the value from form. Untitled Document But when i submit the form, i can't get input "test1" value. But i can get input "q" value. This is my display.php page <?php $Category=$_POST['test1']; $q=$_POST['q']; echo $q; //exit(); $allCourse=NULL; $count=0; foreach($Category as $Cat) { $count=$count+1; $allCourse=$allCourse.'~'.$Cat; } $allCourse=$allCourse.'~'; echo $allCourse; ?> How can i get my tag-it value from html form..
answer count: 0
has comment: http://stackoverflow.com/comment/41633739
type: UnansweredQuestion
upvote count: 1
tagged with: php
type: Question
score: 1

http://stackoverflow.com/a/26379971
score: 0
type: Answer
has body: Your code is working perfectly at my end just one error is you are not properly selecting divs. Here is your code $(document).ready(function() { $('#div1,#div2,#div3,#div4').mouseover(function() { $(this).css('opacity', .4).fadeTo(2000, 1.0); }).mouseout(function() { $(this).fadeTo(2000, 0.4); }); });
answers question: http://stackoverflow.com/q/26379784

http://stackoverflow.com/comment/41587923
comment on: http://stackoverflow.com/q/26474740
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63370/discussion-between-jason-and-matthias-h).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26399236
has comment: http://stackoverflow.com/comment/41449246
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/15982654
has comment: http://stackoverflow.com/comment/41449857
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41450049
tagged with: ajax
has comment: http://stackoverflow.com/comment/41449530
upvote count: 1
has comment: http://stackoverflow.com/comment/41450638
favorite count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/41450004
has title: PHP - Can't check session while script is executing
tagged with: php
accepted answer: http://stackoverflow.com/a/26400765
has answer: http://stackoverflow.com/a/26399514
has comment: http://stackoverflow.com/comment/41449895
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41449652
score: 1
tagged with: session
has comment: http://stackoverflow.com/comment/41449507
possible better answer: http://stackoverflow.com/a/26399514
has answer: http://stackoverflow.com/a/26400765
has body: I'm writing a php script that has a long execution time, and I want to be able to tell the client the scripts progress. I can't do it with output buffering because the script is called via AJAX (and I'd like to keep it that way). I stumbled upon a solution where you save the progress to a $_SESSION variable and make continuous calls to another PHP script to get the progress from the $_SESSION. However, in my implementation, these calls do not execute until the main (long) process is done. In the Chrome dev tools window, the calls are showing as "Pending" along with the main AJAX call, and they all return the progress instantly after the main call finishes. This is the main long script (test code): &lt;?php @session_start(); for($i=0; $i&lt;10; $i++) { $_SESSION["progress"] = $i; sleep(2); } This is the updating script &lt;?php if(isset($_SESSION["progress"])) echo $_SESSION["progress"]; else echo 0; This is the javascript $("form#form-main").submit(function(e) { e.preventDefault(); var $form = $(this); var timeout_id; $form.find("div#popup-overlay").show(); $.ajax( { url: $form.attr("action"), type: $form.attr("method"), data: new FormData($form[0]), cache: false, contentType: false, processData: false, xhr: function() { //get the native XmlHttpRequest object var xhr = $.ajaxSettings.xhr(); //update progress xhr.upload.onprogress = function(e) { if(e.lengthComputable) { var progress = Math.ceil(e.loaded / e.total * 100); if(progress &lt; 100) $form.find("div#popup-content #status").text("UPLOADING " + progress + "%"); else { //start getting process progress from server timeout_id = setInterval( function() { $.post( "CheckProgress.php", function(data) { $form.find("div#popup-content #status").text("PROCESSED " + data + " pages"); } ); }, 300 ); } } }; //return the customized object return xhr; }, success: function(data) { $form.find("div#popup-content").html(data); } } ); }); What can I do to make the javascript client retrieve the progress?
has comment: http://stackoverflow.com/comment/41449188

http://stackoverflow.com/q/26411593
score: 0
has answer: http://stackoverflow.com/a/26411936
answer count: 1
type: UnansweredQuestion
type: Question
has title: JQuery issue with getting string from local file
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/6338797
has body: I found this solution for getting string from text file but when I try to alert it, the pop up says "Data Loaded: undefined". I put my file to the root directory, but I don't know hot to use local host on my computer. I am testing it in dreamweaver and did not send any updates to the server. Which url I should use for local testing on my Mac computer to get string from file.

http://stackoverflow.com/comment/41426177
type: Comment
comment on: http://stackoverflow.com/a/26383047
has text: I eagerly await :D so what else do i need to do? add anchor classes or can i take those out?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41480898
has text: there's an external resources tab on the left you can use to include bootstrap. With that said, I don't think anyone will mind if the example isn't styled :)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26416513
type: QuestionComment

http://stackoverflow.com/a/26508792
answers question: http://stackoverflow.com/q/26508564
downvote count: 0
has body: You can do this: {{date &amp;&amp; formatMyDate(date)}} will only execute the second case if the first condition exists and is different from null and undefined. Check this fiddle: http://jsfiddle.net/HB7LU/7512/
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/26432420
accepted answer of: http://stackoverflow.com/q/26432391
has comment: http://stackoverflow.com/comment/41509744
score: 4
has body: Just check the length of those elements, if less than or equal to 1, do nothing, else remove!: $("#remove-item").click(function() { if ($('.input-row').length &lt;= 1) { return false; } else { $('.input-row:last').remove(); } });
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26432391
type: Answer

http://stackoverflow.com/q/26408148
downvote count: 0
answer count: 0
score: 1
has body: I have the following simple Raphael code: var paper = Raphael('paper', '512', '512'); var draggableImage = paper.image("testimage.png", 10, 10 , 80, 80 ); var path = paper.path("..."); path.attr({ id: 'path', fill: 'none', stroke: '#000000', "stroke-width": '1', "stroke-linecap": 'butt', "stroke-linejoin": 'miter', "stroke-opacity": '1' }).data('id', 'path'); paper.freeTransform(draggableImage); I'd like to have draggableImage draggable just only into path. Pratically speaking, if, during moving it, you bring it partially outside the path I just want to see only the part which remain into the path. How can I achieve this tricky stuff?
type: Question
tagged with: javascript
tagged with: raphael
upvote count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has title: raphael bound image inside path
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41467654

http://stackoverflow.com/q/26478582
linked to: http://stackoverflow.com/q/14004117
has title: adding a div to css multiple columns
has comment: http://stackoverflow.com/comment/41593839
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41593821
tagged with: multiple-columns
score: 0
has body: Is this possible? I have, let's say, 15 divs distributed 3 each on a 5 columns multiple column CSS layout. I also have the equivalent responsive code to fluidly change the number of columns based on display size. Now, how can I add a div say between 12 and 13th div, programatically? Is there a way to get the position of the divs in a multiple columns css flow? Similar to adding something to a matrix(x.y).
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/4170774
has answer: http://stackoverflow.com/a/26478634
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/26371862
has body: Often times, code will include variables which are not strictly necessary, but are useful for improving readability or to reduce confusion. In this case, it is likely done to distinguish the locally scoped variable from the this.attributes property of the model.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26371689

http://stackoverflow.com/comment/41646991
comment on: http://stackoverflow.com/a/26507462
has text: If this is happening somewhere http://stackoverflow.com/questions/6157486/jquery-trap-all-click-events-before-they-happen
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26354459
accepted answer: http://stackoverflow.com/a/26355070
tagged with: php
answer count: 1
has title: Create dymanic textboxes in button onclick & save data to database
score: 0
has body: I am trying to create dynamic textboxes using php & jquery. I want to submit a paper for presentation, each presentation have more than one authors and each author have more than one affiliations. I tried to create dynamic text boxes for authors and their affiliations. I can create authors dynamically up to 10 but affiliations for only 1st author. Anybody please help me to correct this code. Thanks author Author Author 1 Name : Affiliation 1 :
has comment: http://stackoverflow.com/comment/41370944
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26355070
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question

http://stackoverflow.com/a/26451872
upvote count: 1
downvote count: 0
has body: Something like: var foo = '123456' ,bar = [foo.slice(0,3), foo.slice(3)]; //=&gt; bar now ["123", "456"] Extend the String prototype: String.prototype.splitAt = function(n) { return n &amp;&amp; n &lt; this.length ? [this.slice(0,n), this.slice(n)] : this; } // usages '123456'.splitAt(3); //=&gt; ['123', '456'] '123456'.splitAt(2); //=&gt; ['12', '3456'] '123456'.splitAt(12); //=&gt; '123456' '123456'.splitAt(); //=&gt; '123456'
has comment: http://stackoverflow.com/comment/41545175
type: Answer
answers question: http://stackoverflow.com/q/26451779
score: 1

dom
tags question: http://stackoverflow.com/q/26485742
tags question: http://stackoverflow.com/q/26442676
tags question: http://stackoverflow.com/q/26458337
type: Tag
tags question: http://stackoverflow.com/q/26396073
tags question: http://stackoverflow.com/q/26436656
tags question: http://stackoverflow.com/q/26371101
tags question: http://stackoverflow.com/q/26378925
tags question: http://stackoverflow.com/q/26382411
tags question: http://stackoverflow.com/q/26434241
tags question: http://stackoverflow.com/q/26356174
tags question: http://stackoverflow.com/q/26398015
tags question: http://stackoverflow.com/q/26361230
tags question: http://stackoverflow.com/q/26380086
tags question: http://stackoverflow.com/q/26415000
tags question: http://stackoverflow.com/q/26498313
tags question: http://stackoverflow.com/q/26381763
tags question: http://stackoverflow.com/q/26368874
tags question: http://stackoverflow.com/q/26476422
tags question: http://stackoverflow.com/q/26451389
tags question: http://stackoverflow.com/q/26453842
tags question: http://stackoverflow.com/q/26430165
tags question: http://stackoverflow.com/q/26378226
tags question: http://stackoverflow.com/q/26367356
tags question: http://stackoverflow.com/q/26373584
tags question: http://stackoverflow.com/q/26484554
tags question: http://stackoverflow.com/q/26464272
tags question: http://stackoverflow.com/q/26397279
tags question: http://stackoverflow.com/q/26488952
tags question: http://stackoverflow.com/q/26357214
tags question: http://stackoverflow.com/q/26375256
tags question: http://stackoverflow.com/q/26432078
tags question: http://stackoverflow.com/q/26473329
tags question: http://stackoverflow.com/q/26381376
tags question: http://stackoverflow.com/q/26477504
tags question: http://stackoverflow.com/q/26412095
tags question: http://stackoverflow.com/q/26470016
tags question: http://stackoverflow.com/q/26427586
tags question: http://stackoverflow.com/q/26456380
tags question: http://stackoverflow.com/q/26418127
tags question: http://stackoverflow.com/q/26416334
tags question: http://stackoverflow.com/q/26397772
tag name: dom
tags question: http://stackoverflow.com/q/26410959
tags question: http://stackoverflow.com/q/26371576
tags question: http://stackoverflow.com/q/26364134
tags question: http://stackoverflow.com/q/26459753
tags question: http://stackoverflow.com/q/26441730
tags question: http://stackoverflow.com/q/26476216
tags question: http://stackoverflow.com/q/26434382
tags question: http://stackoverflow.com/q/26452264
tags question: http://stackoverflow.com/q/26427923
tags question: http://stackoverflow.com/q/26358515
tags question: http://stackoverflow.com/q/26365868
tags question: http://stackoverflow.com/q/26367588

http://stackoverflow.com/comment/41387532
type: AnswerComment
score: 0
type: Comment
has text: thanks @milz but still the same, even if i copy paste all your code. Maybe im missing something on fullCalendar library.
comment on: http://stackoverflow.com/a/26363829

http://stackoverflow.com/comment/134844015
has text: Alot of the table/csv converters do require the object to be in the DOM. It looks like this one also requires that in the way he is creating the object: var table = document.createElement("table"); Otherwise the converter would fail.
score: 0
comment on: http://stackoverflow.com/a/26360372
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26510190
has comment: http://stackoverflow.com/comment/41650666
has body: With for...in you can iterate the properties of an object, but not the properties of all objects in an array. You can try var html = ''; for(var i=0; i<app.members.length; i++){ html += " "; var member = app.members[i]; for(var prop in member) if(member.hasOwnProperty(prop)) { html += " " + prop + ": " + member[prop] + " "; } html += " "; } output.innerHTML = html; However, note that when you iterate using for...in, you can't assume any order. That means that each app.members[i] could be iterated in a different way, and you don't want that. Therefore, I would use something like var html = '', props = ['id', 'user', 'name', 'email', 'age']; for(var i=0; i<app.members.length; i++){ html += " "; for(var j=0; j<props.length; j++){ html += " " + props[j] + ": " + app.members[i][props[j]] + " "; } html += " "; } output.innerHTML = html; Also note DOM operations (like innerHTML) are slow, so avoid using them at each iteration if you can. Better use a variable, and update the DOM at the end.
score: 1
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41650740
downvote count: 0
answers question: http://stackoverflow.com/q/26509976

http://stackoverflow.com/q/26462061
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41563357
has comment: http://stackoverflow.com/comment/41563031
downvote count: 3
has answer: http://stackoverflow.com/a/26462145
has comment: http://stackoverflow.com/comment/41563220
type: Question
has comment: http://stackoverflow.com/comment/41562989
tagged with: javascript
linked to: http://stackoverflow.com/q/263965
score: -1
has comment: http://stackoverflow.com/comment/41562987
has answer: http://stackoverflow.com/a/26462217
answer count: 2
duplicate of: http://stackoverflow.com/q/263965
has title: remove double quotes from string using javascript
tagged with: jquery
has body: I need to replace double quotes from string, in this case string declare to the variable like below var string = "false"; I need convert like this, var str = false; because I need boolean value. This is I have already tried, var string= data.creditAllowed; var str= string.replace(/"/g, '\\"'); but I have get like this, str = "false";
favorite count: 0
has comment: http://stackoverflow.com/comment/41562970
has comment: http://stackoverflow.com/comment/41563334
tagged with: regex
upvote count: 2

http://stackoverflow.com/comment/41523553
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26439805
has text: @Alxandr Which one should I use?

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/26478456
tags question: http://stackoverflow.com/q/26454579
tags question: http://stackoverflow.com/q/26481709
tag name: google-oauth

http://stackoverflow.com/comment/92062454
type: Comment
has text: This does not account for CSS transforms.
type: AnswerComment
score: 4
comment on: http://stackoverflow.com/a/26423749

http://stackoverflow.com/comment/41420240
type: Comment
type: QuestionComment
has text: jsfiddle of current code: http://jsfiddle.net/Ryanous/ddrwkstr/1/
comment on: http://stackoverflow.com/q/26382474
score: 0

http://stackoverflow.com/a/26431835
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26430640
score: 1
upvote count: 1
has body: Does your $scope object have a window property? If yes, go with Maxim's answer. If not, try this: angular.forEach($scope.posts, function (item) { // counter increment counter++; var idPage = 'feed' + counter; FeedService.parseFeed(url).then(function(res) { $scope[idPage] = res.data.responseData.feed.entries; }); }); Edit: Working plunkr: http://plnkr.co/edit/eVLJKIspLwKPCYAg7L8w?p=preview
accepted answer of: http://stackoverflow.com/q/26430640

http://stackoverflow.com/q/26464469
has body: I am trying to link 35 webpages with math.random. However I dont want it to go to each site more then once. So I have this: function myFunction() { var pages = ['sang1.html', 'sang2.html', 'sang3.html', 'sang4.html', 'sang5.html', 'sang6.html', 'sang7.html', 'sang8.html', 'sang9.html', 'sang10.html', 'sang11.html', 'sang12.html', 'sang13.html', 'sang14.html', 'sang15.html', 'sang17.html', 'sang18.html', 'sang19.html', 'sang20.html', 'sang21.html']; var page, visitedPages = JSON.parse(localStorage.getItem("visitedPages")); if (visitedPages === null) { visitedPages = []; } if (pages.length !== visitedPages.length) { for (var i = 0; i < pages.length; i++) { page = pages[Math.floor((Math.random() * pages.length) + 1)]; if (visitedPages.indexOf(page) === -1) { //unvisited yet localStorage.setItem("visitedPages", JSON.stringify(visitedPages.push(page))); window.location.href = page; break; } } } else {window.location.href = score.html //All pages visited at once } } a random page: Gæt en sang Gæt sangen og hejs flagstangen! Hvilken sang er dette? Ghost busters Poltergeist Something strange Who are you gonna call so I have a button you press and then it starts myfunction. This goes for all my sites. However when i press my button it always goes to page 2. And only from page 1. Any suggestions to what is wrong?
has comment: http://stackoverflow.com/comment/41567139
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26464882
has comment: http://stackoverflow.com/comment/41567388
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41567588
has title: changing webpage randomly without getting the same page twice
type: Question
has comment: http://stackoverflow.com/comment/41567086
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26467542
tagged with: http://stackoverflow.com/tag/json
tagged with: google-maps-api-3
type: Question
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/26467693
answer count: 1
tagged with: javascript
has title: JSON Markers with Google map v3
score: 0
has body: I don't understand why my markers does not appear with JSON i would like to display all the markers from my JSON File This is the structure of my JSON file : [{"number":31705,"name":"31705 - CHAMPEAUX (BAGNOLET)","address":"RUE DES CHAMPEAUX (PRES DE LA GARE ROUTIERE) - 93170 BAGNOLET","position":{"lat":48.8645278209514,"lng":2.416170724425901},"banking":true,"bonus":true,"status":"OPEN","contract_name":"Paris","bike_stands":50,"available_bike_stands":47,"available_bikes":3,"last_update":1413809069000},{"number":10042,"name":"10042 - POISSONNIÃˆRE - ENGHIEN","address":"52 RUE D'ENGHIEN / ANGLE RUE DU FAUBOURG POISSONIERE - 75010 PARIS","position":{"lat":48.87242006305313,"lng":2.348395236282807},"banking":true,"bonus":false,"status":"OPEN","contract_name":"Paris","bike_stands":33,"available_bike_stands":6,"available_bikes":27,"last_update":1413809252000}] and this is my html test But if i test this JSON it work [{"lat":48.8645278209514,"lng":2.416170724425901},{"lat":48.87242006305313,"lng":2.348395236282807}]
has answer: http://stackoverflow.com/a/26467693
type: AnsweredQuestion

http://stackoverflow.com/a/26512586
type: Answer
has body: you have to do it something like this: $(function () { $("#delete").click(function () { $("#tablaNorma tbody tr").each(function () { if ($(this).find("input:checkbox:checked").length > 0) $(this).remove(); }) }) $(".toggleCheckbox").change(function(){ $("#tablaNorma tbody tr").find("input:checkbox").prop("checked",this.checked); }) }) Nro. Norma Año Comité 814002983 Harum. 1979 Non asperiores. 90234555 Ea in sequi. 1994 Ad modi ea in. 29 Eos tempore. 1970 Eaque error. 93 Earum ut. 2014 Earum ut.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26512386

http://stackoverflow.com/q/26462465
tagged with: javascript
tagged with: jquery
has title: get count of second td for each tr in my code
has body: Excuse me (I cant write good English!), i want to get sum of count product for each category and append to category column. how i can get sum of count of product for each tr and append to current tr in this CODE? $(function() { function groupTable($rows, startIndex, total) { if (total === 0) { return; } var i, currentIndex = startIndex, count = 1, lst = []; var tds = $rows.find('td:eq(' + currentIndex + ')'); var ctrl = $(tds[0]); lst.push($rows[0]); for (i = 1; i <= tds.length; i++) { if (ctrl.text() == $(tds[i]).text()) { count++; $(tds[i]).addClass('deleted'); lst.push($rows[i]); } else { if (count > 1) { ctrl.attr('rowspan', count); groupTable($(lst), startIndex + 1, total - 1) } count = 1; lst = []; ctrl = $(tds[i]); lst.push($rows[i]); } } } groupTable($('#myTable tr:has(td)'), 0, 3); $('#myTable .deleted').remove(); }); Category Product Category-1 Product-1 Category-1 Product-1 Category-1 Product-2 Category-1 Product-2 Category-2 Product-3 Category-2 Product-3 Category-2 Product-3 Category-2 Product-4 Category-3 Product-5 Category-3 Product-5 Category-3 Product-5 Category-4 Product-6 Category-4 Product-6
has comment: http://stackoverflow.com/comment/41563735
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41564129
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41565448
score: 2
answer count: 0
upvote count: 3
has comment: http://stackoverflow.com/comment/41564986
has comment: http://stackoverflow.com/comment/41564065
downvote count: 1
type: Question

http://stackoverflow.com/a/26508997
answers question: http://stackoverflow.com/q/26508868
score: 1
has body: I want check if all children checkbox are checked I suppose you can use this syntax to accomplish that, rather than involving an array of booleans. var allAreChecked = ($(this).parent().find(':checkbox').not(':checked').length === 0);
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41372600
type: AnswerComment
has text: I'm not sure why you we're downvoted for this answer, it seems perfectly fine to me!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26356836

http://stackoverflow.com/comment/41531212
type: Comment
has text: For displaying data row by row can try below code `$counter = count( $_POST['myInputs_d']);` and your for and foreach loop like this. `for( $c = 0; $c < $counter; $c++ ){ foreach( $myInputs_all as $all_inputs ){ echo $all_inputs[$c].' '; } echo ' '; }`
comment on: http://stackoverflow.com/a/26417349
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41575397
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26468695
has text: actually that js code is from ajax response ,so the response will bind the data to the chart.
type: Comment

http://stackoverflow.com/q/26360414
has answer: http://stackoverflow.com/a/26360745
has comment: http://stackoverflow.com/comment/41378834
has answer: http://stackoverflow.com/a/26361620
upvote count: 23
has title: How to correct indentation in HTML string?
has comment: http://stackoverflow.com/comment/41378756
possible better answer: http://stackoverflow.com/a/26360745
accepted answer: http://stackoverflow.com/a/26361620
answer count: 3
has comment: http://stackoverflow.com/comment/41379083
has comment: http://stackoverflow.com/comment/41379390
tagged with: javascript
has answer: http://stackoverflow.com/a/26361603
has comment: http://stackoverflow.com/comment/41378908
has comment: http://stackoverflow.com/comment/130960579
has body: Given a string like this: ' \n \n \nHello\n\n\n \n \n \n ' I'd like to format it like this: Hello i.e. the result should be: (assume 2 spaces for indentation) ' \n \n \n Hello\n \n \n \n ' What's the most elegant way to achieve this? Is there an established way to do that? Note: I'm not looking for HTML syntax highlighting, just indentation correction I'm not looking to support the whole HTML spec, correcting basic HTML like the example above would suffice
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41378843
has comment: http://stackoverflow.com/comment/41378720
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/41379038
has comment: http://stackoverflow.com/comment/41379198
favorite count: 0
score: 23
has comment: http://stackoverflow.com/comment/41378906
type: Question
has comment: http://stackoverflow.com/comment/41379259
has comment: http://stackoverflow.com/comment/41378797
has comment: http://stackoverflow.com/comment/41378800

http://stackoverflow.com/comment/41496355
type: Comment
has text: I have updated my answer does it work? do Chrome show a message when he block the window.open?
comment on: http://stackoverflow.com/a/26425327
type: AnswerComment
score: 0

http://stackoverflow.com/a/26430684
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26430529
has comment: http://stackoverflow.com/comment/41551639
accepted answer of: http://stackoverflow.com/q/26430529
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41527257
has body: Store the marker in a global variable/outside the function, then in your function do the following: marker.setMap(null); // set up new marker Then assign your new marker.

http://stackoverflow.com/a/26423291
upvote count: 8
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/41492427
answers question: http://stackoverflow.com/q/26423230
accepted answer of: http://stackoverflow.com/q/26423230
type: AcceptedAnswer
downvote count: 0
has body: http://jsfiddle.net/TrueBlueAussie/ot0kxs0z/2/ $(".Downloadscontainer li").click(function (e) { e.stopPropagation(); $(this).children('ul').toggle(); }); notes: You do not need to each to attach handlers to multiple elements in jQuery. You just need to stop the child click propagating to the parent LI in DOM As @George suggests you may be better off attaching to the anchor click. Taking the anchor approach I would suggest the following as DOM-change friendly: http://jsfiddle.net/TrueBlueAussie/ot0kxs0z/5/ $(".Downloadscontainer a").click(function (e) { e.preventDefault(); $(this).closest('li').children('ul').toggle(); }); Notes: It finds the closest LI to the anchor clicked, then drills down to the child ULs (rather than navigate via next, which required a known arrangement. preventDefault will stop blank bookmark links (href="#" in your example) from scrolling to the top of the page. If they were full links they would stop them navigating, so you may need an additional check if you add page links. e.g you can check if the link is a blank bookmark and allow other links to fire normally: http://jsfiddle.net/TrueBlueAussie/ot0kxs0z/7/ $(".Downloadscontainer a").click(function (e) { if ($(this).attr("href") == '#') { e.preventDefault(); $(this).closest('li').children('ul').toggle(); } }); This fiddle has an external link to Google, as well as the # links.

http://stackoverflow.com/q/26452712
has comment: http://stackoverflow.com/comment/41546454
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26452743
has body: I'm currently generating an hyperlink so I can redirect people to correct webpages. The problem is that a correct hyperlink like: www.reddit.com/r/magicTCG/comments/2ific1/sam_pardee_on_the_modern_jeskai_ascendancy_combo/' in the href, redirects me to exp/rdt/www.reddit.com/r/magicTCG/comments/2ific1/sam_pardee_on_the_modern_jeskai_ascendancy_combo/' where exp/rdt is the path to the original index file on my ftp. Here's the code I'm using: var hyperlink = "'www.reddit.com" + post.data.permalink + "'"; $("#searchesTable").append(' ' + post.data.title + ' ' + post.data.ups + ' ' + post.data.downs + ' ' + formattedTime + ' ' + post.data.subreddit + ' ' + post.data.permalink + ' Visit! '); The problem, I think, comes from this bit of code: Visit! Any idea on how to solve this?
type: Question
has answer: http://stackoverflow.com/a/26452740
tagged with: javascript
has answer: http://stackoverflow.com/a/26455767
has title: href adding extra information to the hyperlink

http://stackoverflow.com/q/26432246
score: 1
has answer: http://stackoverflow.com/a/26432553
possible better answer: http://stackoverflow.com/a/26432572
linked to: http://stackoverflow.com/q/7763327
linked to: http://stackoverflow.com/q/802854
type: Question
has comment: http://stackoverflow.com/comment/41509325
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41509153
upvote count: 2
answer count: 2
has title: jQuery/Javascript month date subtract from current month
downvote count: 1
has answer: http://stackoverflow.com/a/26432572
has comment: http://stackoverflow.com/comment/41509703
has comment: http://stackoverflow.com/comment/41509121
has comment: http://stackoverflow.com/comment/41509239
favorite count: 0
has comment: http://stackoverflow.com/comment/41509578
has body: I am trying to use jquery/js code that has the user select there birth month then calculate to the next birth month (from today)? I am new to javascript and can not figure out this date stuff.. I keep getting a invalid date error I want the user to select a month and it to subtract from now().. to figure out how many months are left until there next birthday. Not worrying about days or years just dealing with months.. Any suggestions? get to the next birth month (from today)? January February March April May June July August September October November December
accepted answer: http://stackoverflow.com/a/26432553
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41509313

angular-promise
tags question: http://stackoverflow.com/q/26445725
tags question: http://stackoverflow.com/q/26409778
tags question: http://stackoverflow.com/q/26495900
tags question: http://stackoverflow.com/q/26362295
tags question: http://stackoverflow.com/q/26372129
tags question: http://stackoverflow.com/q/26463193
tags question: http://stackoverflow.com/q/26444024
tags question: http://stackoverflow.com/q/26357277
tags question: http://stackoverflow.com/q/26356839
tags question: http://stackoverflow.com/q/26432377
tags question: http://stackoverflow.com/q/26447458
tags question: http://stackoverflow.com/q/26366348
tag name: angular-promise
tags question: http://stackoverflow.com/q/26385862
tags question: http://stackoverflow.com/q/26440555
tags question: http://stackoverflow.com/q/26361124
type: Tag
tags question: http://stackoverflow.com/q/26380554

http://stackoverflow.com/q/26426360
has answer: http://stackoverflow.com/a/26426737
tagged with: css
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26426554
possible better answer: http://stackoverflow.com/a/26426737
tagged with: javascript
tagged with: jquery
has title: 2 column bootstrap div - left should be fix on top and right should be scrollable
has answer: http://stackoverflow.com/a/26426554
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to create a layout like this : I wrote html like this : container of menu item, which should be fix on top Div Scrollable How could i achieve this ?? please help me
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26438092
downvote count: 0
favorite count: 0
has body: I want to create a custom scrollbar using just pure JavaScript and I'm having problem with making the pointer to reach the end of the scrollbar when I reach the bottom of the page. Is there any way to do that without using jQuery? Demo on Fiddle HTML: first middle final JavaScript: var body = document.getElementsByTagName('body')[0]; var allDivs = document.getElementsByTagName('div'); var scrollBar = document.getElementById("scroll-bar"); var pointer = document.getElementById("pointer"); for (var i = 0; allDivs[i] != undefined; i++) { var last = i; } var pageHeight = allDivs[last].offsetHeight + allDivs[last].offsetTop; pointer.style.top = "7%"; function setPosition(e) { var pos = e.screenY * 86; var move = pos / scrollBar.offsetHeight - 10; if (move > 7 && move < 89) { pointer.style.top = move + "%"; } var scrollValue = move * pageHeight / 100; window.scrollTo(0, scrollValue); } function resetPosition() { scrollBar.removeEventListener('mousemove', setPosition); pointer.removeEventListener('mousemove', setPosition); } scrollBar.addEventListener('mousedown', function (event) { pointer.addEventListener('mousemove', setPosition); pointer.addEventListener('mouseup', resetPosition); scrollBar.addEventListener('mousemove', setPosition); scrollBar.addEventListener('mouseup', resetPosition); }); scrollBar.addEventListener('click', function (event) { setPosition(event); }); pointer.addEventListener('mousedown', function (event) { pointer.addEventListener('mousemove', setPosition); pointer.addEventListener('mouseup', resetPosition); scrollBar.addEventListener('mousemove', setPosition); scrollBar.addEventListener('mouseup', resetPosition); }); body.addEventListener("mousewheel", function () { scrollBy(0, -window.event.wheelDelta); }); body.addEventListener("DOMMouseScroll", function (e) { scrollBy(0, e.detail * 50); }); CSS: html { overflow: hidden; } .test { height: 100px; border-style: groove; border-width: 10px; border-color: red; } #scroll-bar { position: fixed; right: 0%;…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41523248
tagged with: http://stackoverflow.com/tag/html
has title: creating custom scroll bar
tagged with: css
answer count: 0
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41523220
tagged with: javascript

http://stackoverflow.com/comment/41457113
comment on: http://stackoverflow.com/a/26403931
type: Comment
has text: Thanks for saving all the cookies! :)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41380164
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26360817
has text: Thanks for the suggestion. I have tried using cookies but I am looking for the some solution using angular it self. Can you help on this.

http://stackoverflow.com/q/26371850
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/26371911
has answer: http://stackoverflow.com/a/26404059
tagged with: positioning
has comment: http://stackoverflow.com/comment/41400551
type: Question
tagged with: javascript
tagged with: image
has body: I'm in trouble positioning a website. I have a background image and according to it I want some texts that should stay in an exact position of this img. So if the image moves because the resolution is different, the text should move with the img(these gonna be menu items that's why I need them, and they should appear on the tentacles of an octopus). Also if the positioning of the img and the texts is fixed in css, then on smaller resolutions only a small part of the img appears. Scrolls appear but if I use them only these parts of the img can be seen anyhow. Help please! :( I would accept any kind of solution to this, even jquery or javascript, no matter how I have to solve this. Thank you! EDIT: I changed the site a bit: Now I have a background img, and on top of it a div(this is the base). Inside it another image of an octopus. I have menus(texts in divs) that should always stay on the tentacles. So I need the octopus and the menus move together and always be seen(the whole of it on any kind of resolution). The octopus now can be seen all time whole with this width/height:100% settig. I also need to center it but it doesn't work anyhow I try, but it's the smaller problem. The biggest are still the menus that should move with the picture(stay on the picture on the tentacles).
score: 0
answer count: 2
has title: Position text on an img-s exact spots and keep them there
tagged with: jquery

http://stackoverflow.com/comment/41439065
type: Comment
type: QuestionComment
has text: http://api.jquery.com/attribute-contains-selector/
comment on: http://stackoverflow.com/q/26393158
score: 3

http://stackoverflow.com/a/26441053
answers question: http://stackoverflow.com/q/26441007
has comment: http://stackoverflow.com/comment/41525740
has body: Use split() to get the number $(function() { $('#colorselector').change(function() { $('.colors').hide(); $('#-' + $(this).val().split('-')[1]).show(); }); }); Red Yellow Blue Black Div1... Div2..
has comment: http://stackoverflow.com/comment/41525661
accepted answer of: http://stackoverflow.com/q/26441007
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41525624
has comment: http://stackoverflow.com/comment/41525899
type: Answer
has comment: http://stackoverflow.com/comment/41525688
score: 2
upvote count: 2

http://stackoverflow.com/comment/41533640
comment on: http://stackoverflow.com/q/26445451
type: QuestionComment
type: Comment
has text: @Alper Cinar the test fuction is called when the user clicks on the submit button on a html form.
score: 0

http://stackoverflow.com/comment/41434864
type: Comment
type: QuestionComment
score: 3
has text: Some jQuery functions accept a function as a parameter, and that function receives context as parameter(s). I think that may be what you're getting at. See http://api.jquery.com/addclass/, the version that accepts a function.
comment on: http://stackoverflow.com/q/26390735

http://stackoverflow.com/a/26355947
has comment: http://stackoverflow.com/comment/41378439
answers question: http://stackoverflow.com/q/26355412
downvote count: 0
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/41372035
has comment: http://stackoverflow.com/comment/41493463
score: 2
has comment: http://stackoverflow.com/comment/41379254
has body: I think you are searching for this: $sub_menu.show().animate({ 'left' : '-=180px' }, 200)

http://stackoverflow.com/q/26433061
has comment: http://stackoverflow.com/comment/41511136
has comment: http://stackoverflow.com/comment/41512208
has body: I have a button in my app that is supposed to open a link to the Rails app that seems to block access based on the request's referrer header. When I use window.open('http://localhost/company?id=55', '_blank');, I get a 404 Not Found error, but when I paste the same URL in the browser tab, it opens just find. This suggests to me that the Rails app discriminates connections based on where they come from. Is it possible to replace that window.open action with an XMLHttpRequest (or anything else) that would open my URL in a new tab, and will pass to it custom referer header?
tagged with: xmlhttprequest
linked to: http://stackoverflow.com/q/8231366
has comment: http://stackoverflow.com/comment/41510990
has comment: http://stackoverflow.com/comment/41510938
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41510771
has comment: http://stackoverflow.com/comment/41511144
tagged with: ruby-on-rails
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/41510981
has comment: http://stackoverflow.com/comment/41510947
has comment: http://stackoverflow.com/comment/41511175
has comment: http://stackoverflow.com/comment/41511086
tagged with: javascript
tagged with: http-headers
has title: is it possible to replicate window.open(URL , '_blank') with XMLHttpRequest?
score: 0
has comment: http://stackoverflow.com/comment/41511087
has comment: http://stackoverflow.com/comment/41511269
has comment: http://stackoverflow.com/comment/41511019

http://stackoverflow.com/q/26444024
tagged with: angular-promise
accepted answer: http://stackoverflow.com/a/26448727
score: 2
type: AnsweredQuestion
has body: I've got a few nested directives: &lt;first-directive&gt; &lt;second-directive user="user"&gt; &lt;third-directive name="name"&gt; &lt;fourth-directive description="description"&gt; The template of the first directive has the second directive, template of the second directive has the third directive and so on. All directives have isolated scopes. The first directive sets user object on its own scope. If it does it in an synchronous way ($scope.user = {name: "Alice"}, then everything is fine. However, if it loads user in an asynchronous way (e.g. $http.get(url).then(function (user) { $scope.user = user }), then all other directives won't work, because e.g. when the controller function of the second directive is evaluated, user hasn't been set yet on its scope. The only solution I've found so far is to use $scope.$watch in all nested promises (e.g. $scope.$watch("user", function (user) { $scope.name = user.name} for the second promise), which sucks a lot, because if I want to use directive that I already use somewhere else inside &lt;first-directive&gt;, I need to rewrite it to use $scope.$watch as well... Is there any other way to fix it? I know that I could load data necessary for the first directive e.g. in resolve function of the route it's used in, but I'd like to be able to put this directive in any page without modifying any routes or controllers.
has comment: http://stackoverflow.com/comment/41530898
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41531241
has title: How to solve lack of promise unwrapping when writing nested directives
tagged with: javascript
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26448727
favorite count: 0
tagged with: angularjs
upvote count: 2

http://stackoverflow.com/a/26356347
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26355919
has comment: http://stackoverflow.com/comment/41372324
answers question: http://stackoverflow.com/q/26355919
type: Answer
has comment: http://stackoverflow.com/comment/41372431
has comment: http://stackoverflow.com/comment/41379648
has body: You can try this css this might be work #nav { border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; } #nav, #nav ul, #nav ul ul { list-style:none; padding:0; width:199px; } #nav ul, #nav ul ul { position:relative; z-index:-1; } #nav li { position:relative; z-index:100; } #nav ul li, #nav ul ul li { margin-top:-23px; -moz-transition: 0.4s linear 0.4s; -ms-transition: 0.4s linear 0.4s; -o-transition: 0.4s linear 0.4s; -webkit-transition: 0.4s linear 0.4s; transition: 0.4s linear 0.4s; } #nav li a { background-color:#d4d5d8; color:#000; display:block; font-size:12px; font-weight:bold; line-height:28px; outline:0; padding-left:15px; text-decoration:none; } #nav li a.sub { background:#d4d5d8 url("../images/down.gif") no-repeat; } #nav li a + img { cursor:pointer; display:none; height:28px; left:0; position:absolute; top:0; width:200px; } #nav li a img { border-width:0px; height:24px; line-height:28px; margin-right:8px; vertical-align:middle; width:24px; } #nav li a:hover { background-color:#bcbdc1; } #nav ul li a, #nav ul ul li a { background-color:#eee; border-bottom:1px solid #ccc; color:#000; font-size:11px; line-height:22px; } #nav ul li a:hover { background-color:#ddd; color:#444; } #nav ul li a img, #nav ul li ul a img { background: url("images/bulb.png") no-repeat; border-width:0px; height:16px; line-height:22px; margin-right:5px; vertical-align:middle; width:16px; } #nav ul li:nth-child(odd) a img, #nav ul ul li:nth-child(odd) a img { background:url("images/bulb2.png") no-repeat; } #nav a.sub:focus { background:#bcbdc1; outline:0; } #nav a:focus ~ ul li ul li{ margin-top:-23px; } #nav a:focus ~ ul li { margin-top:0; -moz-transition: 0.4s linear; -ms-transition: 0.4s linear; -o-transition: 0.4s linears; -webkit-transition: 0.4s linears; transition: 0.4s linear; } #nav ul a:focus ~ ul li { margin-top:0; -moz-transition: 0.4s linear; -ms-transition: 0.4s linear; -o-transition: 0.4s linears; -webkit-transition: 0.4s linears; transition: 0.4s linear; …
has comment: http://stackoverflow.com/comment/41388017
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41372541
upvote count: 1

http://stackoverflow.com/a/26453307
has body: Is it an ajax call in a function. ?If so add a gif and text just inside the function then when the ajax is complete it will output to the page, overwriting the gif. I had something like function ajaxrequest() { var waitingimage="&lt;img src='js/ajax-loader.gif'&gt;"; document.getElementById('ajax_results').innerHTML =waitingimage; Then at the end overwrote it if (xhr.status == 200 &amp;&amp; xhr.status &lt; 300) { document. getElementById ('ajax_results').innerHTML = xhr.responseText;
type: Answer
answers question: http://stackoverflow.com/q/26453236
score: 0

http://stackoverflow.com/comment/41528450
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26442475
score: 0
has text: I can't replicate it. What version are you using? When you move your mouse far to the right, does your mouse go over the scroll bars (because then the `mousemove` event won't fire)?

smarty
tags question: http://stackoverflow.com/q/26358210
tag name: smarty
type: Tag

http://stackoverflow.com/q/26502144
has comment: http://stackoverflow.com/comment/41667615
score: 0
has comment: http://stackoverflow.com/comment/41668730
has comment: http://stackoverflow.com/comment/41669054
has comment: http://stackoverflow.com/comment/41636010
tagged with: protractor
has body: I want to write the function which substitute done object (string) into a certain variable. var fs = require( 'fs' ); var outFilePath = 'tmp.tsv'; describe( 'shokokaigisho', function () { browser.ignoreSynchronization = true; browser.get( 'http://meikan.yokkaichi-cci.or.jp/index.html' ); var result_company, shozaichi, denwaBango, daihyoSha, sougyouNengetsu, houjinSetsuritsuNengetsu, shihonkin, juugyouinSuu, gyoshu, eigyouNaiyou, jishaPr, url, bukai; var content; it( 'open company page', function () { $('input[name=submit]').click(); $('div#search_result_list:nth-of-type(2) a:nth-of-type(1)').click(); var getTextFromTable = function ( selector, index ) { return element.all( by.css( selector ) ).get( index ).getText(); }; $('.result_company').getText().then( function ( text ) { result_company = text; }); /* REDUNDANT CODE */ getTextFromTable( 'p', 6 ).then( function ( text ) { shozaichi = text; }); getTextFromTable( 'p', 8 ).then( function ( text ) { denwaBango = text; }); getTextFromTable( 'p', 10 ).then( function ( text ) { daihyoSha = text; }); getTextFromTable( 'p', 12 ).then( function ( text ) { sougyouNengetsu = text; }); getTextFromTable( 'p', 14 ).then( function ( text ) { houjinSetsuritsuNengetsu = text; }); getTextFromTable( 'p', 16 ).then( function ( text ) { shihonkin = text; }); getTextFromTable( 'p', 18 ).then( function ( text ) { juugyouinSuu = text; }); getTextFromTable( 'p', 20 ).then( function ( text ) { gyoshu = text; }); getTextFromTable( 'p', 22 ).then( function ( text ) { eigyouNaiyou = text; }); getTextFromTable( 'p', 24 ).then( function ( text ) { jishaPr = text; }); getTextFromTable( 'a', 2 ).then( function ( text ) { url = text; }); getTextFromTable( 'p', 28 ).then( function ( text ) { bukai = text; }); }); it( 'save data' , function () { content = [ result_company, shozaichi, denwaBango, daihyoSha, sougyouNengetsu, houjinSetsuritsuNengetsu, shihonkin, juugyouinSuu, gyoshu, eigyouNaiyou, jishaPr, url, bukai ].join('\t'); fs.writeFileSync(outF…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41670558
has title: write the function which substitute done object into a certain variable
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41635943
type: Question
has comment: http://stackoverflow.com/comment/41670255
has comment: http://stackoverflow.com/comment/41667594

http://stackoverflow.com/a/26423661
answers question: http://stackoverflow.com/q/26423635
score: 0
type: Answer
has body: From the documentation : Modules are cached after the first time they are loaded. This means (among other things) that every call to require('foo') will get exactly the same object returned, if it would resolve to the same file. This is especially convenient not only for performances but for module initialization. If you want different objects, change your module to a factory.

http://stackoverflow.com/a/26456494
has body: In JavaScript, the string literal '#PAT\.TID' is equivalent to '#PAT.TID'. You need to escape once for JavaScript, once for CSS: document.querySelector('#PAT\\.TID') And no, there’s no point in doing this except to make life miserable for other people.
downvote count: 0
score: 7
accepted answer of: http://stackoverflow.com/q/26456472
has comment: http://stackoverflow.com/comment/41553499
answers question: http://stackoverflow.com/q/26456472
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41553647
type: Answer

http://stackoverflow.com/q/26494948
has body: I am looking to know if there is a way to perform a button click automatically on an angularjs page once the page loads based on a querystring value. For example in a simple asp.net web forms page if a querystring in a url is true then I can simply call Button1_Click(sender,e); to handle the click event in the page load. But this HTML5 page uses angularjs and I just cant seem to figure out how to do it. Any help would be highly appreciated. EDIT: Maybe I wasnt clear enough in my explanation...my bad. But here goes..This is what I intend to do.[Since I cant post pictures yet...] http://host/app/Quik.aspx?Order=5779809 UI: TxtLookupNum: {{InputValue}} DdlWMS:{{WMSKey}} DdlWsNum: {{WorkStationName}} btnLookup:Submit Angular code: $scope.Lookup = function(WMSKey,InputValue,WSNum); When my aspx page has a query string parameter I'd like to automatically trigger a click event and pass the 3 parameters to my angular method like above. This is how I wrote it and it worked but: var inputVal = $('#txtLookupNum'); if (inputVal.val() != "") {$("#btnLookup").trigger("click");} But now I am getting the below error: TypeError: Cannot read property '0' of undefined [after stripping out all the stack trace]
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/15458609
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/26495541
type: Question
has title: automatically click button after page load in angularjs
linked to: http://stackoverflow.com/q/15458609
tagged with: javascript
tagged with: click
has answer: http://stackoverflow.com/a/26495113
answer count: 2
tagged with: button
downvote count: 0

http://stackoverflow.com/a/26454340
type: Answer
downvote count: 2
upvote count: 1
has body: So I have finally figured this out. The problem was, that despite my previous experiences, I was using jQuery. The native code works normally: var r = new XMLHttpRequest(); r.open("POST", 'https://api.imgur.com/3/image'); r.setRequestHeader("Authorization", 'Client-ID ' + APP_ID); r.setRequestHeader("Accept", 'application/json '); var data = new FormData(); data.append("type", "base64"); data.append("image", SavePage.getimgrc()); r.send(data); Lesson learned: The fact that the jQuery is included on the site doesn't mean it will help you.
score: -1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26454079
answers question: http://stackoverflow.com/q/26454079

http://stackoverflow.com/comment/41463488
score: 0
comment on: http://stackoverflow.com/q/26406738
type: Comment
type: QuestionComment
has text: please check updated JSfiddle. http://jsfiddle.net/b7u4635x/1/

http://stackoverflow.com/comment/41506536
has text: A part of my program is supposed to sort the items of a list based on how many shares each one got. I can check the number of successful responses but if someone clicks cancel, then that can't really be counted as a share (for obvious reasons).
comment on: http://stackoverflow.com/q/26410492
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26400735
type: AnsweredQuestion
upvote count: 3
tagged with: html5-appcache
accepted answer: http://stackoverflow.com/a/46114173
type: Question
has comment: http://stackoverflow.com/comment/41489292
tagged with: javascript
tagged with: caching
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/46114173
has body: Does App Cache work with files other than images and js/css/html ? I'm trying to cache .json files which are later called via XMLHttpRequest on a url like resources/data/countries.json, but the browser calls home and does not use the cached file. Inspecting the App Cache with Chrome, I can see the file. Regular files (js/css/html/images) work as expected. No error is thrown during the caching/load process. Is the reason this just doesn't work with App Cache or is it likely something else? Thanks!
score: 3
tagged with: http://stackoverflow.com/tag/html
has title: HTML5 App Cache for .json files?

http://stackoverflow.com/comment/41451462
comment on: http://stackoverflow.com/a/26399883
score: 1
type: AnswerComment
has text: I'm not sure I understand what you are saying, especially the first part about scrolling. In case of a complex page, I don't think there is a better solution, other than simplify the page, or use another approach, such as generating a print version of the page server-side.
type: Comment

http://stackoverflow.com/a/26591954
answers question: http://stackoverflow.com/q/26433558
has body: In the past I have had some success waiting until the page was fully loaded (which happens after DOM Ready). Any scripts that you load before window.load causes the browser to do more work on top of the parsing/rendering/resource loading it's already doing. Traditionally, we do everything on DOM ready - which can quickly give the browser a lot to deal with. Instead, split off any of your non-crucial functionality and let the browser deal with them after all the crucial stuff has been dealt with. Try taking your non-crucial scripts (eg. like buttons, anything not crucial to the page) and wait to load them until window.load. Then apply a fade-in effect or something else to ease-in the display. If window.load is too long to wait (ie. you have a bunch of images on your page), then you can do something like this: $(function() { var timer = setTimeout(loadThirdPartyScripts, 1200), $window = $(window); $window.on('load.third_party', loadThirdPartyScripts); function loadThirdPartyScripts() { clearTimeout(timer); $window.off('load.third_party'); /* load your scripts here */ } }); This will load all of your non-crucial scripts after the window has loaded or after 1.2 seconds - whichever comes first (adjust the timeout as needed). If you have a lot of images - I suggest lazy loading ones below the fold - the whole point being to get window.load to fire as soon as possible. Disclaimer: if you wait until window.load to load a dozen or two resources, you are still going to experience the same stutters that you are now.
type: Answer
score: 0

http://stackoverflow.com/comment/41443159
type: Comment
type: QuestionComment
score: 0
has text: Sorry for the confusion caused. I have updated the question. The Plunker example has `$modalInstance` as dependency which I am not able to use in my controller.
comment on: http://stackoverflow.com/q/26383766

http://stackoverflow.com/comment/41569145
type: AnswerComment
has text: Oh I got that working on my side as well. However it seems that force is not working properly. I will experiment more
type: Comment
comment on: http://stackoverflow.com/a/26462837
score: 0

http://stackoverflow.com/comment/41403377
type: QuestionComment
comment on: http://stackoverflow.com/q/26373427
score: 0
has text: you need to add the script in a [dom ready handler](http://learn.jquery.com/using-jquery-core/document-ready/)
type: Comment

http://stackoverflow.com/q/26486432
has title: get an alt attribute value of the sibling and store it into variable in jquery
accepted answer: http://stackoverflow.com/a/26503129
tagged with: siblings
possible better answer: http://stackoverflow.com/a/26486934
type: Question
score: 0
answer count: 2
has body: I'm new to jquery. I'm trying to make a simple drag and drop game. The html looks like this cinema post-office I want to make the .text draggable to the .box and then on drop I need to compare the .text text with the alt atribute of the image. So far I have this code for that: $(document).ready(function() { var txt = $(".text").draggable({ revert: "invalid" }); var Box = $(".box").droppable({activeClass: "highlight", drop: function( event, ui ){ $( this ).addClass("dropped"); } }); var draggedText = $(".text").mouseup( getText ); function getText (){ var t = $(this).text(); } var imageName = $(txt).on( "dragstop", function( event, ui ) { var imgName = $(this).siblings(".image").find("img").attr("alt"); alert(imgName); }); if (draggedText == imageName){ $(this).addClass("correct"); }else{ $(this).addClass("incorrect"); } }); I'm stuck with the getting var imageName value which should be the value of the alt tag of the image placed in this very set. alert returns me Undefined. I have searched through this forum and google but cannot find anything that solves my problem. I think that I also miss something in the code to define where the text was dropped, in which sibling should the function look for.... I would really appreciate your help! Thanks in advance.
has answer: http://stackoverflow.com/a/26503129
tagged with: javascript
tagged with: jquery
tagged with: attr
has answer: http://stackoverflow.com/a/26486934
linked to: http://stackoverflow.com/q/2975091
type: AnsweredQuestion

http://stackoverflow.com/comment/41454938
comment on: http://stackoverflow.com/q/26394629
type: Comment
type: QuestionComment
score: 1
has text: How your seriesData looks like? Can you update http://jsfiddle.net/4x136qxg/ with data, to recreate entire chart?

http://stackoverflow.com/a/26369939
upvote count: 4
has body: I think you need to escape your stringified JSON. var data = $(JSON.stringify(myJsonObject); function escapeHtml(text) { var map = { '&amp;': '&amp;amp;', '&lt;': '&amp;lt;', '&gt;': '&amp;gt;', '"': '&amp;quot;', "'": '&amp;#039;' }; return text.replace(/[&amp;&lt;&gt;"']/g, function(m) { return map[m]; }); } $('&lt;form enctype="application/json" action="/projects" method="POST"&gt;' + '&lt;input type="hidden" name="json" value="' + escapeHtml(data) + '"&gt;' + '&lt;/form&gt;').submit();
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26369674
answers question: http://stackoverflow.com/q/26369674
has comment: http://stackoverflow.com/comment/56323015
score: 4

http://stackoverflow.com/comment/41424038
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26373178
type: AnswerComment
has text: Anymore ideas? Can't seem to figure this out.

http://stackoverflow.com/comment/41391635
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26366566
has text: I did that but it won't work. I tried hiding it & then did .show() by appending it to the div but it does not append

http://stackoverflow.com/q/26490143
tagged with: jasmine
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26490274
tagged with: unit-testing
type: Question
has body: I am trying to unit test a angular controller that contains a dataService factory. The problem is that I get the error TypeError: 'undefined' is not an object (evaluating 'myScope.data.test') Can anyone see what I am doing wrong? /// &lt;reference path="../scripts/jasmine.js" /&gt; /// &lt;reference path="../scripts/angular.js" /&gt; /// &lt;reference path="../scripts/angular-mocks.js" /&gt; var app = angular.module('myApp', []); app.factory("dataService", ["$http", "$q", function ($http, $q) { var _test = function () { return "Hello world"; }; return { test: _test, }; }]); var testController = ["$scope", "dataService", function ($scope, dataService) { $scope.data = dataService; // This is similar to a DAL }]; describe('Tests my controller without mocks', function () { var myScope; var myDataService; beforeEach(inject(function ($rootScope, $httpBackend, $controller) { angular.module('myApp'); myScope = $rootScope.$new(); myDataService = $rootScope.dataService; $controller('testController', { $scope: myScope, dataService: myDataService }); })); it('should say Hello', function () { expect(myScope.data.test).toBe("Hello world"); }); });
tagged with: javascript
has title: Testing an Angular.js controller without mocking factory with Jasmine
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26490274

http://stackoverflow.com/comment/41375769
type: QuestionComment
comment on: http://stackoverflow.com/q/26358516
score: 0
has text: @George still it does not add class 'shown' to the others.
type: Comment

http://stackoverflow.com/comment/41616156
has text: on ln374 you have `return this.each(function(e) {` which initialized the code for hanlding click event three times, as `this` is an array with the three menu elements.
type: QuestionComment
comment on: http://stackoverflow.com/q/26491000
score: 1
type: Comment

http://stackoverflow.com/a/26355276
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26354477
type: Answer
accepted answer of: http://stackoverflow.com/q/26354477
upvote count: 1
score: 1
has body: * you start jquery click function* $("input[type=text]").click(function() { $(this).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true }); });

http://stackoverflow.com/a/26509269
has comment: http://stackoverflow.com/comment/41649487
score: 3
has comment: http://stackoverflow.com/comment/41649290
downvote count: 0
has body: You should use $timeout instead of setTimeout. Of course, you need to inject it in your controller/service. The benefit (in that case) is that $timeout involves a digest, in order to synchronize the scope's values. Otherwise, you would manually call apply like this (but not recommended) : setTimeout(function() { scope.$apply(function(){ scope.fileData.xmlData = "something"; }; }, 1000);
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26509046
answers question: http://stackoverflow.com/q/26509046
type: Answer
has comment: http://stackoverflow.com/comment/41649395

http://stackoverflow.com/q/26481645
tagged with: jquery
has comment: http://stackoverflow.com/comment/41602133
score: 27
linked to: http://stackoverflow.com/q/21755171
favorite count: 0
possible better answer: http://stackoverflow.com/a/52232755
has answer: http://stackoverflow.com/a/52232755
has comment: http://stackoverflow.com/comment/41601930
has answer: http://stackoverflow.com/a/67895946
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has body: I am currently working on a school management software that usually requires exporting of html contents that contains data tables and div tag. I have tried all possible means to write a code that will be able to export my html data in a good way, with css preferably. After checking some question and answers here, I tried using spdf, but no luck. It keeps destroying my table alignment, then I read about html2canvas but to implement it with jspdf was my problem, i would like to capture the content if a div tag with html2canvas then send the canvas to jspdf to export the canvas as pdf. Here is my code below: here is the js code var pdf = new jsPDF('p', 'pt', 'letter'); pdf.addHTML($('#ElementYouWantToConvertToPdf')[0], function () { pdf.save('Test.pdf'); });
has comment: http://stackoverflow.com/comment/41599116
has comment: http://stackoverflow.com/comment/41598978
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/62163798
has answer: http://stackoverflow.com/a/27370207
has comment: http://stackoverflow.com/comment/41599266
type: Question
upvote count: 27
tagged with: jspdf
accepted answer: http://stackoverflow.com/a/27370207
has title: how to use html2canvas and jspdf to export to pdf in a proper and simple way
has comment: http://stackoverflow.com/comment/41599776
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41449652
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26399236
has text: The onprogress has nothing to do with the AJAX. That's just to display the upload progress, not the php execution progress.
type: Comment

http://stackoverflow.com/comment/41557654
type: Comment
has text: By The End Points I Mean Only Corners Of A Rectangle. At MouseDown Event, I want when I click on any corner of rectangle and try to rotate(Drag in circular), it should change the rotate anticlockwise/clockwise.
comment on: http://stackoverflow.com/a/26438541
score: 0
type: AnswerComment

http://stackoverflow.com/q/26452885
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41547297
has comment: http://stackoverflow.com/comment/41547069
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/41546754
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41547365
downvote count: 0
has body: Javascript code for directive angular.directive('uiDatePicker', [function() { return { restrict: 'EA', scope: { ngModel: '=ngModel', ngChange: '=ngChange' }, templateUrl: 'complete/date-picker.tmp.html', replace: true, require: 'ngModel', link: function(scope, elem, attrs, ngModel) { if(scope.ngModel !== undefined) { scope.DatePicker = new DatePicker(new Date(scope.ngModel)); } else { scope.DatePicker = new DatePicker(); } scope.ngModel = scope.DatePicker.Value; } } }]) Javascript code for controller angular.controller('Main', ['$scope', function($scope) { $scope.Change = function(value) { console.log(value); }; $scope.Value = 1000; }]) Html code &lt;div ng-controller="Main"&gt; &lt;ui-date-picker ng-model="Date" ng-change="Change(Value)"&gt;&lt;/&gt; &lt;/div&gt; And my question: How to ng-change work ?. ngModel still work !
tagged with: javascript
has comment: http://stackoverflow.com/comment/41546918
has title: ng change with custom directive
has comment: http://stackoverflow.com/comment/41546858
favorite count: 0
has comment: http://stackoverflow.com/comment/41546830
tagged with: angularjs

http://stackoverflow.com/a/26402675
answers question: http://stackoverflow.com/q/26377890
upvote count: 1
type: AcceptedAnswer
has body: maybe you need to rewrite the path to make it context-relative. Try to use UrlUtils to get the context relative path: UrlUtils.rewriteToContextRelative("sounds/startMusic.mp3", RequestCycle.get()));
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41713670
accepted answer of: http://stackoverflow.com/q/26377890

http://stackoverflow.com/comment/41579860
type: QuestionComment
comment on: http://stackoverflow.com/q/26471142
score: 1
has text: You should try to keep your javascript out of your HTML as a general rule of thumb, and the three registrations are essentially the same. #3 is not jQuery, but used correctly it will accomplish the same thing.
type: Comment

http://stackoverflow.com/a/26355205
has comment: http://stackoverflow.com/comment/41370241
upvote count: 1
has comment: http://stackoverflow.com/comment/41370066
answers question: http://stackoverflow.com/q/26355097
downvote count: 0
type: Answer
has body: You can remove any css attribute completely from the markup using the code below $('your-selector').css('height', ''); Updated fiddle - http://jsfiddle.net/Aerious/6h30eL8q/
score: 1

http://stackoverflow.com/a/26495478
accepted answer of: http://stackoverflow.com/q/26495213
answers question: http://stackoverflow.com/q/26495213
score: 2
downvote count: 0
has body: Updated the fiddle - http://jsfiddle.net/nitincool4urchat/dxpowx27/76/ I prefer to use blur but you can change it back to keyup var MoviesCollection = Backbone.Collection.extend({ url: function () { return "http://api.themoviedb.org/3/search/movie?api_key=a8f7039633f2065942cd8a28d7cadad4&amp;query=" + this.query; }, setQuery:function(q){ this.query = q; }, parse: function (response) { return response.results; } }); var myCollection = new MoviesCollection(); MoviesView = Backbone.View.extend({ initialize: function (opts) { this.collection = opts.collection; this.render(); }, render: function () { var template = _.template($("#search_template").html(), {}); this.el.html(template); }, events: { 'blur input#search_input': 'doSearch' }, doSearch: function (event) { var that = this; this.collection.setQuery($(event.currentTarget).val()); this.collection.fetch().done(function(){ alert("Fetch Complete : " + that.collection.length); }); } }); var search_view = new MoviesView({ el: $("#search_container"), collection:myCollection });
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41708439
has comment: http://stackoverflow.com/comment/41627209
type: Answer
has comment: http://stackoverflow.com/comment/41687354

http://stackoverflow.com/comment/41630238
score: 0
has text: Not enough information provided. Did you try looking in this script to get the name of the variable, if any ( and if global )?
type: Comment
comment on: http://stackoverflow.com/q/26498747
type: QuestionComment

http://stackoverflow.com/a/26439010
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26438668
answers question: http://stackoverflow.com/q/26438668
has body: Those types of transitions/animations which are not affecting DOM elements structure (eg. CSS trasnform's or opacity) are recommended to increase animation speed (instead of changing eg width or top what will affect other DOM elements) and yes CSS animations are faster than JS. More information you can find HERE and HERE
upvote count: 1

http://stackoverflow.com/q/26365158
tagged with: google-maps-api-3
has body: I have written a JavaScript code. I wanted to use durationInTraffic in a request with Google Maps API V3. This feature is only available for Google Maps for Work customers. Here it says Maps for work customers should include their clientId and signature in their request. But where exactly do I put the clientId and signature in my request? Below is my code: --> : - - Dauer mit Vekehr: Dauer ohne Vekehr:
upvote count: 1
answer count: 1
favorite count: 0
has title: Where to put clientId and signature in your Google Map API V3 request?
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/26379455
type: Question
tagged with: google-maps
tagged with: javascript
has answer: http://stackoverflow.com/a/26379455

http://stackoverflow.com/a/26381201
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer
has body: Answering own question as I worked it out. I was using extend wrongly. The correct code is: vector.addEventListener("change", function () { if (bounds == null) { bounds = vectorSource.getExtent(); } else { bounds = ol.extent.extend(bounds, vectorSource.getExtent()); } map.getView().fitExtent(bounds, map.getSize()); });
accepted answer of: http://stackoverflow.com/q/26380760
downvote count: 0
answers question: http://stackoverflow.com/q/26380760
has comment: http://stackoverflow.com/comment/43901904
has comment: http://stackoverflow.com/comment/102545628

http://stackoverflow.com/a/26496746
answers question: http://stackoverflow.com/q/26496720
type: Answer
has body: When you add a comma, you are separating you selectors. Try $("#foo table, #foo tr, #foo td, #foo span, #foo p" ).addClass( Myclass );
score: 2
upvote count: 2
downvote count: 0

http://stackoverflow.com/comment/41636812
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26502214
score: 0
has text: I want to take the height of each child with JQuery and according to that height I would like to make changes to the template. But I do not want to create additional directives for every "ng-repeat".

http://stackoverflow.com/q/26404414
has body: I try to include external files for Javascript and CSS in the head tags in django template and they don't work. They work well when I put them before closing the body tag. Why? And another problem is that when I use inheritance, children don't see my external files. Can anybody help me please? {% load staticfiles %}
tagged with: javascript
has answer: http://stackoverflow.com/a/26406686
answer count: 3
has comment: http://stackoverflow.com/comment/41459220
downvote count: 0
has answer: http://stackoverflow.com/a/26437509
has comment: http://stackoverflow.com/comment/41459109
favorite count: 0
has comment: http://stackoverflow.com/comment/41457699
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41459824
tagged with: django
tagged with: python
tagged with: css
has comment: http://stackoverflow.com/comment/41459998
has comment: http://stackoverflow.com/comment/41461791
has title: Referencing external files using django template
score: 1
has answer: http://stackoverflow.com/a/26404628
upvote count: 1
has comment: http://stackoverflow.com/comment/41458862
type: Question

http://stackoverflow.com/comment/41463481
has text: Make sure the HTML is the same and that you have the new css rules for .green { background-color: green; }
type: AnswerComment
comment on: http://stackoverflow.com/a/26406922
score: 0
type: Comment

http://stackoverflow.com/q/26503654
tagged with: javascript
has comment: http://stackoverflow.com/comment/41653337
has body: I currently developping a Coffeescript with nodejs that would allows me to dump all images on a Tumblr. In a first loop it execute a request that will get a list of all the images on each page via the API. In a second loop, it download all the images. the problem is that, I don't know why, the first callback is never executed, the "start" counter is never incremented. Here is the code : xml2json = require "xml2json" fs = require "fs" util = require "util" request = require "request" tumblr_name = process.argv[2] api_endpoint = util.format "http://%s.tumblr.com/api/read", tumblr_name start = 0 num = 50 post_count = 50 download = (uri, filename) -&gt; request(uri).pipe(fs.createWriteStream(filename)) while post_count &gt; 0 console.log util.format "post_count: %s - num: %s", post_count, num page_uri = util.format "%s?type=photo&amp;start=%s&amp;num=%s", api_endpoint, start, num do (page_uri) -&gt; request page_uri, (error, response, body) -&gt; console.log util.format "Downloading %s", page_uri data_xml = body data_json = JSON.parse xml2json.toJson data_xml post_count = data_json["tumblr"]["posts"]["post"].length for post in data_json["tumblr"]["posts"]["post"] post_id = post["id"] post_date = post["date-gmt"].split(" ")[0] for photo in post["photo-url"] if photo["max-width"] == 1280 outname = util.format "%s-%s-%s.%s", tumblr_name, post_date, post_id, photo["$t"].split(".").slice(-1)[0] download photo["$t"], outname start = start + num
has comment: http://stackoverflow.com/comment/41649214
has comment: http://stackoverflow.com/comment/41648974
has title: NodeJS CoffeeScript variable scope and callbacks
has comment: http://stackoverflow.com/comment/41650983
tagged with: node.js
answer count: 0
type: UnansweredQuestion
score: 0
tagged with: coffeescript
type: Question

http://stackoverflow.com/q/26417816
has comment: http://stackoverflow.com/comment/42019003
favorite count: 0
type: UnansweredQuestion
has body: On ext.net grid panel mouse hover I am getting this error: Exception thrown not caught While debugging this line: throw "Element.alignToXY with an element that doesn't exist";
answer count: 0
score: 1
upvote count: 1
type: Question
has title: how to fix "Element.alignToXY with an element that doesn't exist" javascript error
tagged with: javascript
tagged with: ext.net
tagged with: gridpanel
has comment: http://stackoverflow.com/comment/41485220
downvote count: 0

http://stackoverflow.com/q/26398921
tagged with: android
has body: I have been using Titanium to develop an application for android.Last night i saw an unexpected behaviour. Every time i launch application,it just hangs for sometime and crashes after sometime.I checked the logs and its like below.Any help? [ERROR] : v8: [ERROR] : v8: # [ERROR] : v8: # Fatal error in JS [ERROR] : v8: # [ERROR] : v8: Allocation failed - process out of memory [ERROR] : v8: [ERROR] : v8: # [ERROR] : v8:
has title: v8: Allocation failed - process out of memory in Titanium Android
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41479981
tagged with: titanium
type: Question
has comment: http://stackoverflow.com/comment/41558003
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26465400
accepted answer: http://stackoverflow.com/a/26465400

http://stackoverflow.com/q/26458157
has answer: http://stackoverflow.com/a/26458173
tagged with: arrays
tagged with: javascript
tagged with: variables
tagged with: jquery
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26458452
has body: I have a variable that looks like this: var regVar="Right Left Right;" And then I split them: regVar.split(); So what I am trying to do is to make the variable called regVar to be turned into an array. I thought that there was an .array() method, but I couldn't figure out how it works. If there is a jQuery method, that would be fantastic as well as plain JS. Thanks for you help in advance!
upvote count: 4
has title: Variable to array?
answer count: 4
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26458796
has answer: http://stackoverflow.com/a/26458174
accepted answer: http://stackoverflow.com/a/26458174
type: Question
possible better answer: http://stackoverflow.com/a/26458173

http://stackoverflow.com/comment/41376065
score: 1
comment on: http://stackoverflow.com/q/26358925
type: QuestionComment
has text: Why do you bind it to keyup? Is that really necessary? Try to think about what you are actually trying to do, what is the logic and user experience you are trying to achieve. Don't just switch it to keydown either, really think about what you want to accomplish with this limitation and how you want it to work - when you have that, you can start to experiment.
type: Comment

http://stackoverflow.com/comment/55176527
score: 7
type: AnswerComment
has text: So what is the purpose of the `@` prefixed value then? "If the parameter value is prefixed with @ then the value for that parameter will be extracted from the corresponding property on the `data` object (provided when calling an action method). For example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam` will be `data.someProp`." Sounds like you should be able to pass in an `id` value and the resource would use it to populate the `productId` param. But this is not the case.
type: Comment
comment on: http://stackoverflow.com/a/26452879

http://stackoverflow.com/a/26389229
downvote count: 0
has body: I've updated your fiddle link basically you have to create new Menu and attach it as a popmenu item on Withdraw menu item as mentioned Below `var withdrawMenu = new Menu({ id: "withdrawMenu" }); withdrawMenu.addChild(new MenuItem({ id: "savings", label: "Savings Acc" }) ); withdrawMenu.addChild(new MenuItem({ id: "checking", label: "Checking Acc" }) ); var pSubMenu2 = new DropDownMenu({}); pSubMenu2.addChild(new MenuItem({ label: "Credit" })); pSubMenu2.addChild(new PopupMenuItem({ id: "withdraw", label: "Withdraw", popup: withdrawMenu }) );`
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26388797
answers question: http://stackoverflow.com/q/26388797
type: Answer
score: 2

http://stackoverflow.com/comment/41630445
type: QuestionComment
comment on: http://stackoverflow.com/q/26498666
has text: No it is not working.Thanks though
score: 0
type: Comment

http://stackoverflow.com/q/26469201
downvote count: 0
tagged with: asynchronous
favorite count: 0
accepted answer: http://stackoverflow.com/a/29672294
tagged with: lifecycle
upvote count: 1
has title: Polymer callbacks for template data binding
type: AnsweredQuestion
score: 1
type: Question
tagged with: polymer
tagged with: javascript
has answer: http://stackoverflow.com/a/29672294
has body: I have a template like: &lt;template id="container" repeat="{{ sheep, i in flock }}" is="auto-binding"&gt; &lt;svg id="sheep{{i}}"&gt;&lt;/svg&gt; &lt;/template&gt; then I load data asynchronously like: // ... ajaxHandler: function(e){ // this.flock = e.detail.response; this.$.container.flock = e.detail.response; draw.call(this); } }); function draw(){ // this.flock.forEach(function(sheep,i){ // this.$['sheep'+i].append(document.createElement("circle")); // }.bind(this)); this.$.container.flock.forEach(function(sheep,i){ this.$.container.$['sheep'+i].append(document.createElement("circle")); }.bind(this)); } But by the time draw is reached, this.$['sheep'+i] won't have been created yet. Is there a callback I can use to detect when the DOM elements have been inserted following a template binding? [EDIT] Have to use the template element as model instead of the this element instance when using auto-binding [EDIT] After doing more research it turns out that the template-bound event is only fired once when the template is created, but not when it is updated. Once the data is loaded, the model is updated and the draw function gets called synchronously afterward. I suspect the template updates asynchronously when the model observes a change, making this.$.container.$['sheep'+i] unavailable at the time the draw function will execute. I need the draw function to be run asynchronously, after the template has finished updating its nodes. [EDIT] See jsfiddle with code for testing
answer count: 1

http://stackoverflow.com/a/26376446
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26376293
has body: i had the same problem when i did my website responsive for any device resolution, the solution is simple, you write your jQuery as standard but u have to include a script that will allow the jQuery to work on touch devices. add this script into your website and check the magic result: http://touchpunch.furf.com/
downvote count: 0

http://stackoverflow.com/comment/41592015
comment on: http://stackoverflow.com/a/26463661
type: AnswerComment
score: 0
type: Comment
has text: yeah, you can just use ng-click="boom(input)" just @yoshi said. And also I need not to use model for some reason

http://stackoverflow.com/comment/75810597
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28369679
has text: Usman Iqbal ng-false-value and ng-true-value are the values you want to use instead of false and true... so on this case to be true (checked) you need the price and to be false(unchecked) just an empty string
type: AnswerComment

http://stackoverflow.com/a/26453509
has comment: http://stackoverflow.com/comment/41557992
has comment: http://stackoverflow.com/comment/41558034
downvote count: 0
has body: Store the system time when you start your timer in a cookie or in local storage. Each time your web page loads, you can read the previous system start time and initialize the clock appropriately. If the time needs to be less prone to tampering, then you would need to store the time on your server for each user and put the start time for that user in the page each time it is served from the server.
type: Answer
answers question: http://stackoverflow.com/q/26453439
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41558216

http://stackoverflow.com/comment/41526286
has text: @A.Wolff He said he wants to check for "sub url" as well, I'm not sure if that means a subdomain (in which case your suggestion would work) or a sub-directory (in which case it wouldn't). Left it like this to keep it safe.
comment on: http://stackoverflow.com/a/26441585
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27056953
upvote count: 9
has comment: http://stackoverflow.com/comment/120354530
answers question: http://stackoverflow.com/q/26360403
downvote count: 0
has body: It maybe that you are trying to save the file with the metadata. hence making the decoded data from base64 invalid. Here is what I mean: data:image/png;base64,iVBORw0KG.... The data:image/png;base64 is just meta and is not encoded using base64 so: You need to strip that from the sting then decode then save to disk. I use this handy function: function decodeBase64Image(dataString) { var matches = dataString.match(/^data:([A-Za-z-+\/]+);base64,(.+)$/), response = {}; if (matches.length !== 3) { return new Error('Invalid input string'); } response.type = matches[1]; response.data = new Buffer(matches[2], 'base64'); return response; } source: NodeJS write base64 image-file So a snip from how I use it: var decodedImg = decodeBase64Image(imgB64Data); var imageBuffer = decodedImg.data; var type = decodedImg.type; var extension = mime.extension(type); var fileName = "image." + extension; try{ fs.writeFileSync(".tmp/uploads/" + fileName, imageBuffer, 'utf8'); } catch(err){ console.error(err) } Where mime is the great node-mime lib. npm install mime.
type: Answer
has comment: http://stackoverflow.com/comment/120342832
score: 9

http://stackoverflow.com/a/26374299
has body: This is mathematically impossible unless you can guarantee that there will only be one y value per x value, which even on a unit rectangle you can't (for instance, {0,0},{1,0.6},{0,0.4},{1,1} will be rather interesting at the mid point!). We can solve this symbolically, as explained over on https://pomax.github.io/bezierinfo/#yforx, using Cardanos algorithm to find the roots of our x(t) function, but if you're going to do a lot of curve work, it might be faster to simply build a relatively small LUT and then approximate the result instead. For instance: var LUT_x = [], LUT_y = [], t, a, b, c, d; for(let i=0; i&lt;100; i++) { t = i/100; a = (1-t)*(1-t)*(1-t); b = (1-t)*(1-t)*t; c = (1-t)*t*t; d = t*t*t; LUT_x.push( a*x1 + 3*b*x2 + 3*c*x3 + d*x4 ); LUT_y.push( a*y1 + 3*b*y2 + 3*c*y3 + d*y4 ); } Now if you want to look up a x value for some y value, you can run through LUT_y until you find your y value, or more realistically until you find two values at index i and i+1 such that your y value lies somewhere in between them, and you will immediately know the corresponding x value because it'll be at the same index in LUT_x. For nonexact matches with 2 indices i and i+1 you simply do a linear interpolation (i.e. y is at distance ... between i and i+1, and this at the same distance between i and i+1 for the x coordinates) (But of course: if you want precision, implement Cardano's algorithm or just copy-paste it from the Primer on Bezier curves, and compute the exact value)
has comment: http://stackoverflow.com/comment/41427111
has comment: http://stackoverflow.com/comment/41406277
has comment: http://stackoverflow.com/comment/41407016
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41407773
has comment: http://stackoverflow.com/comment/41406265
score: 3
has comment: http://stackoverflow.com/comment/41406352
accepted answer of: http://stackoverflow.com/q/26373607
type: Answer
has comment: http://stackoverflow.com/comment/41405709
answers question: http://stackoverflow.com/q/26373607
upvote count: 3

http://stackoverflow.com/comment/41638999
has text: I just wanted to know if there is such a possibility.
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26503595

http://stackoverflow.com/a/26404673
has comment: http://stackoverflow.com/comment/41459945
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26399140
type: Answer
has comment: http://stackoverflow.com/comment/41459328
answers question: http://stackoverflow.com/q/26399140
score: 2
has comment: http://stackoverflow.com/comment/41460417
has comment: http://stackoverflow.com/comment/41476495
has comment: http://stackoverflow.com/comment/41460319
downvote count: 0
has comment: http://stackoverflow.com/comment/41458662
has body: Setting a variable in doActionand using it elsewhere is really bad sign and unnecessary. I refactored your code to use combined streams instead. var moveStart = this.mousedown .filter((e) =&gt;!e.altKey &amp;&amp; !e.metaKey) var move = moveStart.flatMap((e) =&gt; this.mousemove .takeUntil(this.mouseup) .startWith(this.getNearestPoint(e)) ); var startPoint = moveStart.map((e) =&gt; this.getNearestPoint(e)) var endPoint = move.map((e) =&gt; this.getNearestPoint(e)) var preview = startPoint.combine(endPoint, (start, end) =&gt; { preview: true, startPoint: start, previewEndPoint: end }) preview.onValue((state) =&gt; this.setState(state)); move.onEnd(this.endLine.bind(this));
has comment: http://stackoverflow.com/comment/41488128
type: AcceptedAnswer

http://stackoverflow.com/q/26423889
type: Question
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: webrtc
favorite count: 0
has answer: http://stackoverflow.com/a/26429044
has comment: http://stackoverflow.com/comment/55140358
tagged with: joomla
has comment: http://stackoverflow.com/comment/41505030
type: UnansweredQuestion
tagged with: pubnub
has title: How to Create WebRTC + PubNub Open Source Video Chat,voice chat, using Javascript
has body: Is it possible to Create live video and voice chat application in my website using WebRTC + PubNub. Any one can help me to find out a good existing code and how to integrate. I am using joomla 2.5. i need multiple and single channel video and audio streaming.
tagged with: javascript
linked to: http://stackoverflow.com/q/28740230

http://stackoverflow.com/a/26509266
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26509137
has comment: http://stackoverflow.com/comment/41649133
downvote count: 0
score: 1
has body: If you want to use your existing code just alter the height of #oScroll in the CSS

http://stackoverflow.com/q/26464786
tagged with: nvd3.js
has comment: http://stackoverflow.com/comment/41578009
has answer: http://stackoverflow.com/a/26472554
accepted answer: http://stackoverflow.com/a/26472554
type: Question
has body: I'm trying to customise pie chart's colors using angular-nvd3 extension. This is what I caught in plunker here. As you can see the color of the legend was being customised but the chart wasn't. I need the colors being passed inside the data object. Do you have any ideas how I can fix it?
linked to: http://stackoverflow.com/q/16191542
upvote count: 2
has comment: http://stackoverflow.com/comment/41569882
answer count: 1
tagged with: javascript
has title: custom pie chart colors in nvd3-angular
favorite count: 0
tagged with: angularjs
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/41518192
type: QuestionComment
has text: Anivash - that worked, partially. It turned z into an array, and if (z == true) { } does not work, the same for != or !== NULL. Any more advice? Thanks!
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26436857

http://stackoverflow.com/q/26485801
score: 3
has answer: http://stackoverflow.com/a/26502506
tagged with: math
tagged with: javascript
type: Question
answer count: 3
has title: Draw an arc of X degrees around center point in paperjs?
has body: I am struggling with the way paperjs specifies Arcs. I have no idea why there isn't something which is basically: var myArc = new Arc(degrees (radians?), center, radius); because I can't figure out the advantage of (from, through, to) as an Arc descriptor. At any rate, can someone tell me how to draw an Arc of say: 30 degrees from a fixed center point at a fixed radius? Let's say center point is: (cx, cy) and radius is 200. I don't care about orientation, since I can rotate it after the fact. TIA.
downvote count: 0
favorite count: 0
tagged with: paperjs
upvote count: 3
has answer: http://stackoverflow.com/a/26491046
has answer: http://stackoverflow.com/a/65153754
type: UnansweredQuestion

http://stackoverflow.com/a/26388040
has body: Check the official documentation on http://www.samsungdforum.com and http://www.samsungdforum.com/Guide. More relevant stuff here: Creating a Video Application Guideline for Smooth Streaming Application Developers Creating a Video Application With HAS (HTTP Adaptive Streaming) You can find a sample app there (check the first bullet link), here's the direct link: http://www.samsungdforum.com/Guide/_downloads/tut00055_tutorial_video_source_v1_31.zip Enjoy ^^
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/79808130
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/138997569
has comment: http://stackoverflow.com/comment/138988266
answers question: http://stackoverflow.com/q/26383562
has comment: http://stackoverflow.com/comment/42164556
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26383562

http://stackoverflow.com/a/26373282
has comment: http://stackoverflow.com/comment/41404194
upvote count: 2
has comment: http://stackoverflow.com/comment/41403569
accepted answer of: http://stackoverflow.com/q/26373208
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41404271
answers question: http://stackoverflow.com/q/26373208
downvote count: 0
has body: This is a common problem with asynchronous functions, before people grasp how they work. In your second code block, you define something to the result of addListener, which I believe is undefined, output that something (i.e. undefined) then some time later, the event gets triggered and something gets redefined to request.sentVariable. By this time, no-one cares. You can't return a variable from an async function. It cannot be done. You need to use the variable inside the function, or in a callback that the function will be invoking. Let me say this again, because it's that important: can someone walk me through how to return a value after a listener has successfully been called and generated some data within a function? No. Cannot be done. Impossible. Never. Nope. What you can do is this: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { console.log(sender.tab ? "from a content script:" + sender.tab.url : "from the extension" ); if (request.greeting == "hello") { gotSomething(request.sentVariable); ///**************/// sendResponse({farewell: "goodbye"}); } }); function gotSomething(something) { console.log(something); } EDIT: If you need two different values coming from different event handlers, use either promises, or if you don't want to deal with a promise library, it is easy enough to implement yourself for simple cases: var data1, data2; var listener1 = function(request, sender, sendResponse) { // ... -&gt; data data1 = data; handleData(); } var listener2 = function(request, sender, sendResponse) { // ... -&gt; data data2 = data; handleData(); } function handleData() { if (data1 &amp;&amp; data2) { // use data1 and data2 // clear data1 and data2 so we can expect the next pair data1 = void 0; data2 = void 0; } } // set listener1 and listener2 as listeners
has comment: http://stackoverflow.com/comment/41403415
has comment: http://stackoverflow.com/comment/41404303
has comment: http://stackoverflow.com/comment/41405098
type: Answer
score: 2

http://stackoverflow.com/q/26414584
possible better answer: http://stackoverflow.com/a/26414843
accepted answer: http://stackoverflow.com/a/26416281
has answer: http://stackoverflow.com/a/26414843
type: Question
tagged with: c#
type: AnsweredQuestion
has body: I have a class with a field that I want to skip when saving the object to the MongoDB. public class Person { public string name; public string ignorable; // I don't want this one to be saved to the db } I know about the BsonIgnore attribute, but that also ignores the property when serializing the object to be send to a client javascript application. I use the official C# driver and call this extension method diretly on the object to serialize to json: MongoDB.Bson.BsonExtensionMethods.ToJson()
has answer: http://stackoverflow.com/a/26416281
tagged with: http://stackoverflow.com/tag/json
score: -1
tagged with: mongodb
answer count: 2
tagged with: javascript
favorite count: 0
downvote count: 1
has title: How do I skip property when saving to MongoDB without using BsonIgnore?
upvote count: 0

http://stackoverflow.com/q/26383622
possible better answer: http://stackoverflow.com/a/26383660
has answer: http://stackoverflow.com/a/26383660
has answer: http://stackoverflow.com/a/26383673
score: 0
answer count: 3
tagged with: datatables
accepted answer: http://stackoverflow.com/a/26383673
tagged with: jquery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26383667
has body: Using Datatables I make all s clickable. How can I tell the function to exclude cells from the first two rows as I don't want those cells to be clickable? function () { var api = this.api(); api.$('td').click( function () { api.search( this.innerHTML ).draw(); });}, My table: Name Surname etc etc <?php foreach ($records as $record) : ?> <?php e($record->name); ?> <?php e($record->surname) ?> <?php e($record->etc) ?> <?php e($record->cetc) ?> <?php endforeach; ?>
type: Question
has title: Select all cells except ones from first two columns
tagged with: javascript

http://stackoverflow.com/comment/43477075
type: AnswerComment
comment on: http://stackoverflow.com/a/26415082
has text: The answer does not work because now the SVGs are not present anymore in the dist folder after grunt build.
type: Comment
score: 0

http://stackoverflow.com/comment/41536298
has text: Why this is not helpful? http://stackoverflow.com/questions/2161906/handle-url-anchor-change-event-in-js
score: 1
comment on: http://stackoverflow.com/q/26417428
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41368801
type: QuestionComment
has text: there is an error saying `ReferenceError: ext is not defined`! what is `ext`?
comment on: http://stackoverflow.com/q/26354735
score: 0
type: Comment

http://stackoverflow.com/comment/41520636
score: 0
comment on: http://stackoverflow.com/q/26436977
type: Comment
type: QuestionComment
has text: Can you comment all lines after this `ViewState["CurrentAlphabet"] = lnkAlphabetID.Text;` and try.

http://stackoverflow.com/comment/41557024
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26454111
has text: You're right. Do you know what was the issue? I was still using moment 2.6.0. It seems like 2.6 had the issue, because I switched to 2.8.0 and it works like you showed me in the jsFiddle. In fact, my first tries was just doing like you, but since I wasn't getting the expected result............

http://stackoverflow.com/comment/41643596
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26506456
has text: how much words do you need to traslate here? is it a matter if all are visible at JS code? that can be a determinat to the solution

http://stackoverflow.com/a/53564774
score: 5
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26453916
upvote count: 5
has body: I loved what fernando-macedo put together and it got me to a certain point with my data. However I struggled with filtering of data as opposed to passing the entire dataset via this api setup. This is very similar to other peoples problem of passing JSON data from a Queryset and Pavel Patrin's answer helped me with that. So this will now allow people to filter their data and send it as a json for use in d3. Now I am using the same hypothetical example but it should work for # views.py from django.db import connections from django.db.models import Count # from django.http import JsonResponse #no longer needed from django.shortcuts import render import json from .models import Play def graph(request): data = Play.objects.filter(name__startswith='Test') \ #change here for filter. can be any kind of filter really .extra(select={'month': connections[Play.objects.db].ops.date_trunc_sql('month', 'date')}) \ .values('month') \ .annotate(count_items=Count('id')) formattedData=json.dumps([dict(item) in list(data)]) #This is a two-fer. It converts each item in the Queryset to a dictionary and then formats it using the json from import json above #now we can pass formattedData via the render request return render(request, 'graph/graph.html',{'formattedData':formattedData}) Now to get that appropriately on the other side (the html side) &lt;script src="{% static 'd3.v3.min.js' %}" charset="utf-8"&gt;&lt;/script&gt; &lt;script type='text/javascript'&gt; // the type text/javascript is key here! var data= // now you can just reference data with no need to use d3.json. //Critical that there is no quotation marks here and this is where you denote safe! //Insert the rest //of Fernando's code here //minus the last '});' //as that ends the d3.json function call &lt;/script&gt; Anyways, I hope this saves someone some time with Django and/or D3 as this solves two issues at once.

http://stackoverflow.com/a/26405634
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26405268
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26405268
type: Answer
has body: Correct syntax is ng-class="{'goingUp' : player.goingUp}"

http://stackoverflow.com/a/26491911
type: Answer
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Use the simpler (yyyy, mm, dd) constructor: var date_string = '4-6-2014'; var tmp = date_string.split("-"); var new_date = new Date(tmp[2], +tmp[1] - 1, tmp[0]); (Swap [0] and [1] is 6 is the day part)
accepted answer of: http://stackoverflow.com/q/26491841
answers question: http://stackoverflow.com/q/26491841

http://stackoverflow.com/comment/41395950
comment on: http://stackoverflow.com/q/26368546
score: 0
type: Comment
type: QuestionComment
has text: Where are you defining your angular code in the page? Maybe you just need to move it up to before the `ng-app` call.

http://stackoverflow.com/a/26427357
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26427305
answers question: http://stackoverflow.com/q/26427305
has body: You can do it in a single sort method. The bones of it are: yourArray.sort(function(a, b) { var adate = /* ...parse the date in a.date... */, bdate = /* ...parse the date in b.date... */, rv = adate - bdate; if (rv === 0) { rv = a.title.localeCompare(b.title); } return rv; }); I'll leave the parsing of that odd date format as an exercise for the reader...
type: Answer
score: 12
upvote count: 12
downvote count: 0

http://stackoverflow.com/q/26355705
has title: JavaScript - delay a set of setTimeout activities
has body: I have a set of objects to be displayed at different times using setTimeout() function in JavaScript. What I did was to have a loop running, for every element I initialized a setTimeout event for itself. The code I used to setTimeout for each element: for (i = currentIndex; i &lt; this.items.length; i++) { var object = "element#"+i; var delay = 10*i; this.keepDelay[id] = new Timer(function() { $("#objectSet").css("display", "none").html(object).fadeIn("fast"); currentIndex = id; }, delay); } The Timer class is function Timer(callback, delay) { var timerId, start, remaining = delay; // works this.pause = function() { window.clearTimeout(timerId); remaining -= new Date() - start; }; // works this.resume = function() { start = new Date(); id = currentIndex; timerId = window.setTimeout(callback, remaining); }; // does NOT work this.speedup = function() { remaining -= 100; window.clearTimeout(timerId); timerId = window.setTimeout(callback, remaining); } // does NOT work this.slowdown = function() { remaining += 100; window.clearTimeout(timerId); timerId = window.setTimeout(callback, remaining); } this.resume(); } The resume() and pause() methods do work. resume() attempts to display each object one after another depending on the delay value. pause() is self-explanatory. These two are working fine. Now I want to speed up and slow down the delay of the objects, I try to write speedup() and slowdown() methods but somehow they wouldn't work. Looking at the code I can't find why it wouldn't, maybe I've focused on it for too long so I need to seek help from a fresh mind.
has comment: http://stackoverflow.com/comment/41371751
tagged with: algorithm
has comment: http://stackoverflow.com/comment/41370306
has comment: http://stackoverflow.com/comment/41370326
score: 0
has comment: http://stackoverflow.com/comment/41370457
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26356468
has comment: http://stackoverflow.com/comment/41371546
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26356468
linked to: http://stackoverflow.com/q/750486
type: Question

http://stackoverflow.com/comment/41500379
type: Comment
comment on: http://stackoverflow.com/a/26427460
type: AnswerComment
has text: I can scroll the page but the value is 0 at any position.
score: 0

http://stackoverflow.com/comment/41485557
comment on: http://stackoverflow.com/q/26415925
type: Comment
type: QuestionComment
score: 2
has text: possible duplicate of [chrome.tabs returns undefined in content script](http://stackoverflow.com/questions/15034859/chrome-tabs-returns-undefined-in-content-script)

http://stackoverflow.com/a/26456275
has comment: http://stackoverflow.com/comment/41555009
has comment: http://stackoverflow.com/comment/41555425
score: 0
has body: Edit This should go under comment but I found it could be too long for it so I post as an answer. Or perhaps I misunderstood your question? I wonder why you are against mongo. I somehow find it a good match with Meteor. Anyway, everyone's use case can be different and your idea is doable but not with some serious hacks. if you look at Meteor source code, you can find tools/run-mongo.js, it's where Meteor talks to mongo, you may tweak or implement your adaptor to work with your in-memory objects. Another approach I can think of, will be to wrap your in-memory objects and write a database logic/layer to intercept existing mongo database communications (default port on 27017), you have to take care of all system environment variables like MONGO_URL etc. to make it work properly. Final approach is wait until Meteor officially supports other databases like Redis. Hope this helps.
has comment: http://stackoverflow.com/comment/41555064
has comment: http://stackoverflow.com/comment/41555099
answers question: http://stackoverflow.com/q/26455914
type: Answer

http://stackoverflow.com/q/26474650
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26475394
has body: Im trying to build a really simple lateness tracker with AngularFire. Ive got the miniApp adding staff members ok and setting the initial late minutes to 0 value. But im stuck on updating the values. When a user clicks 'plus()' it should add 1 to the value, when a user clicks 'minus()' it should remove 1 from the value and finally when you click 'resetMins()' it should set the value back to 0. View: {{late.name}} {{late.mins}} Mins Lateness - + Reset Controller: angular.module('goskirmishApp').controller('MainCtrl', function ($scope, fbutil, $timeout) { // synchronize a read-only, synchronized array of messages, limit to most recent 10 $scope.lateness = fbutil.syncArray('lateness', {}); // display any errors $scope.lateness.$loaded().catch(alert); function alert(msg) { $scope.err = msg; $timeout(function() { $scope.err = null; }, 5000); } // Reset mins $scope.resetMins = function() { console.log('reset Clicked'); }; $scope.minus = function() { console.log('minus Clicked'); }; $scope.plus = function() { console.log('plus Clicked'); }; }); Can someone help me get on the right track please?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26475394
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26498370
score: 0
tagged with: angularfire
has title: Updating fields with angularfire
tagged with: angularjs
has answer: http://stackoverflow.com/a/26498370

http://stackoverflow.com/a/26428965
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41503557
has comment: http://stackoverflow.com/comment/41503204
score: 1
has comment: http://stackoverflow.com/comment/41504695
upvote count: 1
has body: You should be adding an error handler to instance of your http.request. For example, you could change your http.request call to: var req = http.request(hostinfo, callback1); req.on('error', function(err) { console.log("ERROR: " + err.message); }); req.end(); Read here for more info.
answers question: http://stackoverflow.com/q/26428704
has comment: http://stackoverflow.com/comment/41508659
has comment: http://stackoverflow.com/comment/41509379
has comment: http://stackoverflow.com/comment/41503970
has comment: http://stackoverflow.com/comment/41503697

http://stackoverflow.com/a/26446504
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41752645
has comment: http://stackoverflow.com/comment/41798895
has body: Lets say you have an object : var my_object = { item1 : 1, item2 : 2, item3 : 3, } var i; for(i in my_object){ console.log(i); console.log(my_object[i]); } /* This will print in the console: item1 1 item2 2 item3 3 */ for each will not find an undefined, because undefined does not exist, unless your object is like this: var my_object = { item1 : 1, item2 : 2, item3 : 3, item4 : undefined } Also : $.each(options, function(index, value){ // if(typeof options.index === 'undefined'){ &lt;-- this is wrong if(typeof options[index]=== 'undefined'){ &lt;-- this is correct // Also you have the value, why not "value === undefined" ? } });
has comment: http://stackoverflow.com/comment/41752872
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41752677
answers question: http://stackoverflow.com/q/26446440

http://stackoverflow.com/q/26387892
answer count: 2
has comment: http://stackoverflow.com/comment/41429634
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41429858
has body: I have prev and next button: This is function of next button: var nextFn = function(e) { var current = $('.active'); alert(current); var prev = $('#prev'); pos = $('.active').attr('id'); $("#num").text('(' + pos + '/' + researchPlaces.length + ')'); $(current).next().attr("class", "active"); $(current).attr("class", "passive"); //e.stopPropagation(); }; When I click next, it supposed to show the next span. However, it also shows the next span in other li(s) in the page. Charles Darwin Professor University of Ottawa Prev 150 York Street 80 Elgin Street (0/2) Next This is my one of the li(s). What's wrong?
has answer: http://stackoverflow.com/a/26388287
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41429709
has answer: http://stackoverflow.com/a/26388057
accepted answer: http://stackoverflow.com/a/26388057
type: Question
has comment: http://stackoverflow.com/comment/41432066
has comment: http://stackoverflow.com/comment/41429554
possible better answer: http://stackoverflow.com/a/26388287
has comment: http://stackoverflow.com/comment/41430102
tagged with: javascript
has title: Why all the spans are changed instead of one?
tagged with: jquery
has comment: http://stackoverflow.com/comment/41429606
has comment: http://stackoverflow.com/comment/41429744
has comment: http://stackoverflow.com/comment/41429599
score: 0

http://stackoverflow.com/comment/41415859
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26380436
has text: You should use `res.send` inside the callback.

http://stackoverflow.com/comment/41386633
has text: So then, the question is: how do I do what Google did to make transit stations clickable?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26361798
type: QuestionComment

http://stackoverflow.com/comment/45488459
score: 0
type: Comment
type: QuestionComment
has text: I'm glad you ask (soon I'll have to deal with this dilemma again) but I don't know how to explain better - language limitations. But if you click on "A Playable Test" link I'm sure you'll understand the question. I'm trying not to muck with default behavior but to please my users. I'm thinking about a simple text editor for large text instead of html text area.
comment on: http://stackoverflow.com/q/26434252

http://stackoverflow.com/comment/41530160
type: Comment
score: 0
type: AnswerComment
has text: @mia url should be this src="//www.youtube.com/embed/nYIr79YbvUg?rel=0" not this ... src="//www.youtube.com/embed/nYIr79YbvUg?"
comment on: http://stackoverflow.com/a/26443596

python
tags question: http://stackoverflow.com/q/26493370
tags question: http://stackoverflow.com/q/26370647
tags question: http://stackoverflow.com/q/26472059
tags question: http://stackoverflow.com/q/26377427
tags question: http://stackoverflow.com/q/26402047
tags question: http://stackoverflow.com/q/26438022
tags question: http://stackoverflow.com/q/26482246
tags question: http://stackoverflow.com/q/26438814
tag name: python
tags question: http://stackoverflow.com/q/26469777
tags question: http://stackoverflow.com/q/26364391
tags question: http://stackoverflow.com/q/26479122
tags question: http://stackoverflow.com/q/26363510
tags question: http://stackoverflow.com/q/26488444
tags question: http://stackoverflow.com/q/26453916
tags question: http://stackoverflow.com/q/26490518
type: Tag
tags question: http://stackoverflow.com/q/26391208
tags question: http://stackoverflow.com/q/26469741
tags question: http://stackoverflow.com/q/26424316
tags question: http://stackoverflow.com/q/26470589
tags question: http://stackoverflow.com/q/26430458
tags question: http://stackoverflow.com/q/26435532
tags question: http://stackoverflow.com/q/26358543
tags question: http://stackoverflow.com/q/26404414
tags question: http://stackoverflow.com/q/26383864

http://stackoverflow.com/a/26428056
has comment: http://stackoverflow.com/comment/71744886
type: Answer
upvote count: 7
answers question: http://stackoverflow.com/q/26403646
has body: What you are desiring is called 'perspective warping' and is not available in native 2D canvas. You can achieve your effect by drawing 1 pixel wide vertical strips of your image with the appropriate Y-offsets. Here's an outline of how to do it to give you a starting point: Create an array of y-offsets that form your desired curve: // Just an example, you would define much better y-offsets! // Hint: Better offsets can be had by fetching y-values from a quadratic curve. var yOffsets=[0,1,2,3,4,5,6,5,4,3,2,1,0]; Create an in-memory canvas: var canvas=document.createElement('canvas') var context=canvas.getContext('2d'); Use the clipping version of context.drawImage to draw 1 pixel wide vertical slices of the image with "curving" y-offsets: for(var x=0;x&lt;offsetY.length;x++){ context.drawImage(img, // clip 1 pixel wide slice from the image x,0,1,img.height, // draw that slice with a y-offset x,offsetY[x],1,img.height ); } Create an image from the temporary canvas and create an image object in FabricJS: var perspectiveImage=new Image(); perspectiveImage.onload=function(){ // This is the mug-shaped image you wanted! // Use it in FabricJS as desired. } perspectiveImage.src=canvas.toDataURL();
accepted answer of: http://stackoverflow.com/q/26403646
score: 7
has comment: http://stackoverflow.com/comment/71756230
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26482270
upvote count: 1
has answer: http://stackoverflow.com/a/26482365
answer count: 4
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I often see code like: var element = document.createElement('div'); $(element).appendTo([other element here]); Is exists way to combine these two operations? And write something like: [other element here].createElement('div');
accepted answer: http://stackoverflow.com/a/26482365
type: Question
has answer: http://stackoverflow.com/a/26482382
has answer: http://stackoverflow.com/a/26482378
score: 1
possible better answer: http://stackoverflow.com/a/26482346
has title: Is exists way to combine creation of html element and appening to target?
favorite count: 0
has answer: http://stackoverflow.com/a/26482346
has comment: http://stackoverflow.com/comment/41600379

http://stackoverflow.com/q/26391121
has answer: http://stackoverflow.com/a/26391449
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: velocity.js
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26449629
score: 1
tagged with: box2dweb
type: Question
has body: I need to find the speed of an object in a game. The game is made in HTML5 with jquery and jquery.box2d. For this I can use these methods: GetLinearVelocity().x; GetLinearVelocity().y; I'm then trying to calculate the speed from this piece of code, but get some values that doesn't make sense when I console.log it. This is my code: var heroVelX = game.currentHero.GetLinearVelocity().x; var heroVelY = game.currentHero.GetLinearVelocity().y; var speed = Math.sqrt(heroVelX^2 + heroVelY^2); console.log(speed); Some of the values in console.log are numbers, but most of them are NaN (Not-A-Number), which confuses me? Can someone help me solve this? The goal I want to achieve, is to see when the speed(of object .currenHero) drop below a certain value, so I can excute a new state in the game.
linked to: http://stackoverflow.com/q/9768393
has title: Calculate speed from velocity vector using box2d GetLinearVelocity();
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26391449
accepted answer: http://stackoverflow.com/a/26449629

http://stackoverflow.com/q/26407592
tagged with: arrays
has body: I have tags with a data-attribute containing a list of hex colors. &lt;span data-color="#ffffff,#000000"&gt;&lt;/span&gt; I currently split that list with "," to get a real array. But now there's starting to have rgba colors in the data-attribute of those tags. &lt;span data-color="rgba(255,255,255,.75),#000000"&gt;&lt;/span&gt; Of course, the split solution is not working anymore. What would be the best work around? I mean, I can verify if that the "," doesn't have a ")" before, but there must be a more elegant solution...
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/1636350
answer count: 4
has answer: http://stackoverflow.com/a/26407931
type: AnsweredQuestion
tagged with: custom-data-attribute
has answer: http://stackoverflow.com/a/26408653
accepted answer: http://stackoverflow.com/a/26408653
has comment: http://stackoverflow.com/comment/41464062
has answer: http://stackoverflow.com/a/26408006
has title: Split a list of colors containing rgba values
type: Question
possible better answer: http://stackoverflow.com/a/26407931
has answer: http://stackoverflow.com/a/26408051

http://stackoverflow.com/comment/41466876
comment on: http://stackoverflow.com/q/26407977
type: QuestionComment
type: Comment
has text: Sorry there is some other code which i did not posted here, in there selectedPolicyId was defined.
score: 0

http://stackoverflow.com/a/26358347
accepted answer of: http://stackoverflow.com/q/26358275
answers question: http://stackoverflow.com/q/26358275
score: 0
type: AcceptedAnswer
has body: Just use CSS, like this: #curr_amount { width: 50px; } Luckily embedded content is not within iframe, so you can style it easily with normal CSS on the host page. Demo: http://jsfiddle.net/pmt7ss3x/
type: Answer
has comment: http://stackoverflow.com/comment/41375056
has comment: http://stackoverflow.com/comment/41375101

http://stackoverflow.com/a/26463144
type: Answer
upvote count: 1
score: 1
has body: You need to add parentheses to your calculations: z = "P" + ( x * y ); ^ ^ In this case your function will work as expected. What you have now is concatenations. And seems like you need to convert that numbers to floats, using parseFloat function. And remove first char if it is always starts with P using substr method So final result should be: z = "P" + ( parseFloat( x.substr( 1 ) ) * parseFloat( y.substr( 1 ) ) ).toFixed( 2 ); toFixed will format your float number to have always 2 numbers after dot.
downvote count: 0
has comment: http://stackoverflow.com/comment/41565532
answers question: http://stackoverflow.com/q/26463100

http://stackoverflow.com/comment/41589489
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26475585
has text: @DJKRAZE I am familiar with IsPostBack. I have already attempted what you are suggesting, but I need to know current focus object and from what I understood there is no way to store current focus on server side, to restore it on postback. I can store focus on textChanged events, but those occur when object looses focus and stores object loosing focus and not new one that gain focus. End result : every time you tab to new textbox, autoPostBack occurs, and focus jumps to previous textbox, because it was one that stored focus.
score: 0

http://stackoverflow.com/q/26440269
answer count: 1
has body: I am using marionette in my application. I am showing ItemView through regions like in the following. var productInfoViewObj=new productInfoView.ProductInfoView({model:tagInformationModel.tagInformationModelObj}); exports.MyApp.bodyContainer.show(productInfoViewObj); This is the code, I written inside view. exports.ProductInfoView=Backbone.Marionette.ItemView.extend({ domInfo:{ mainTemplateId:"tagProductListTpl", tableTemplateId:"taginfoViewTpl", tableContentDiv:"taginfoViewDiv", //tad Info tagInfoTabId:"tagInfoBtn", productInfoTabId:"productInfoBtn" }, template:function(){ return commonFunctions.templateCompilation("tagProductListTpl",""); }, onRender:function(){ console.log(document.getElementById("productInfoBtn")); } }); I am passing templateId and data as arguments to commonFunctions.templateCompilation. It will compile and return compiled string. That compiled result passing to template. As per my assumption, after completion of template, onRender function will trigger. What I mean before onRender, dom will available whatever we are templating using template. But I am getting null inside onRender function. I want a callback, it should trigger after template available in dom. so I can access elements whatever I templated using template. I can do one thing, whatever I written inside onRender, I can setup time like in the following way. onRender:function(){ setTimeout(function(){console.log(document.getElementById("productInfoBtn"));},1000); } If I set time, working fine but it's not correct way to implement. can anyone help me. Thanks.
has answer: http://stackoverflow.com/a/26441162
downvote count: 0
has title: How to trigger function after render template
tagged with: javascript
type: UnansweredQuestion
tagged with: marionette
score: 1
tagged with: templates
favorite count: 0
tagged with: backbone.js
type: Question
upvote count: 1

http://stackoverflow.com/q/26398260
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: spaces
has body: I have an issue when using ckeditor 4 ( inline mode). I can click a div and edit it, but I cant press space key. Please tell me how to fix this. Here is my code Inline Editing in Action! The "div" element that contains this text is now editable.
has comment: http://stackoverflow.com/comment/41487774
has title: Can not press space key CKEDITOR inline
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41485180
type: Question
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
has comment: http://stackoverflow.com/comment/41450463
has answer: http://stackoverflow.com/a/27612376
score: 0

http://stackoverflow.com/comment/41544911
type: QuestionComment
score: 0
has text: Thanks alot guys, I actually learned alot :)
comment on: http://stackoverflow.com/q/26451711
type: Comment

http://stackoverflow.com/comment/53838313
has text: @Dani check this out ` sin 2 x + cos 2 x + sin 4 x + 3 `. Its not giving expected result. Its not fool proof. Its getting failed on complex equtions. I just need expression as output not want to evaluate. It gives even expression wrongly in my case
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26386993

http://stackoverflow.com/comment/41508945
has text: This is not a same question. I want to read the updated list from server side as well.
type: Comment
comment on: http://stackoverflow.com/q/26431948
score: 0
type: QuestionComment

http://stackoverflow.com/a/26396216
type: Answer
has body: Finally got this, My solution was, var x = document.getElementById("elementID"); function eventCopy() { x.style.color = 'black'; x.addEventListener("mousemove", eventDispatch); } function eventDispatch() { x.style.color = 'white'; console.log('h'); x.removeEventListener("mousemove", eventDispatch); } x.addEventListener("copy",eventCopy);
accepted answer of: http://stackoverflow.com/q/26373752
answers question: http://stackoverflow.com/q/26373752
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/41564986
type: Comment
type: QuestionComment
has text: Also, did code snippet change? are you trying to count the number of rows, or a quantity of products? This seemingly easily explained answer has now been made very unclear in what you are asking?
comment on: http://stackoverflow.com/q/26462465
score: 0

http://stackoverflow.com/a/26455522
upvote count: 2
has comment: http://stackoverflow.com/comment/41552645
has comment: http://stackoverflow.com/comment/41553051
score: 2
has body: There's a lot of reasons why this script isn't running. Rather then fix the errors, I wrote the snippet from scratch for you, and I'll try explaining why it's not currently working on a line by line basis. First , here is some working code: function onEdit(e) { var activateSheet = SpreadsheetApp.getActiveSpreadsheet(); SpreadsheetApp.setActiveSheet(activateSheet.getSheetByName('Form')); var sheet = SpreadsheetApp.getActiveSheet(); var row = e.range.getRowIndex();//Gets the row the change was made to. var timestamp = sheet.getRange(row, 1).getValues(); //Gets the email var load = sheet.getRange(row, 2).getValues(); //Gets the email var email = sheet.getRange(row, 3).getValues(); //Gets the email var location = sheet.getRange(row, 4).getValues(); //Gets the email MailApp.sendEmail(email, "Check In Call", location); } The fields 'Load' and 'Timestamp' don't seem to be required for what you want, but I left them in anyway, because maybe you need them. Here's a list of things that weren't working for you: Your first function where you called the sheet didn't run at any stage, as there's no trigger, and it doesn't pass the activated sheet onto your 'onEdit' function. 'getSheetName()' is for retrieving the name of the sheet, not getting the sheet by name. The method you're actually looking for is: 'getSheetByName(name)'. e.value is only available if what's edited is a single cell, which based on your spreadsheet is unlikely. Even if e.value wasn't a single cell, you weren't using it correctly, but this isn't the subject for this question. As a side note: I get the feeling from the syntax errors that you're not familiar with Javascript. Before trying anything with Google Apps script, I recommend you familiarize yourself with Javascript to avoid many, many wasted and frustrated hours trying to complete simple actions.
accepted answer of: http://stackoverflow.com/q/26455094
has comment: http://stackoverflow.com/comment/41552547
has comment: http://stackoverflow.com/comment/41553095
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26455094
type: Answer
has comment: http://stackoverflow.com/comment/41552915
has comment: http://stackoverflow.com/comment/41552786
has comment: http://stackoverflow.com/comment/41552122

http://stackoverflow.com/q/26406646
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26406840
has title: Retrieving the value of an attribute of a div in jQuery via click()
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26406885
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26406885
possible better answer: http://stackoverflow.com/a/26406792
has body: Sorry for the vague title. I am using jQuery. I have a small scenario in my app and I am stuck. Problem: I have two functions in my script named as func1 and func2. I want to execute both of these functions when ever an user clicks on the div element and also to access the value of the code attribute in these two functions. Click ME . Code: Click ME script.js: var code1 = ""; var code2 = ""; func1 = function(){ code1 = $(this).attr('code'); alert("code1 is "+code1); } func2 = function(){ code2 = $(this).attr('code'); alert("code2 is "+code2+'2'); } $('#testId').click(func1, func2); /*$('#testId').click(function(){ func1(); func2(); });*/ I want to access the value of code="102"in my two functions. I tried two ways. First I tried the following snippet: $('#testId').click(func1, func2); This only executes the func2. The value of the code attribute is also being accessed by func2. But the func1 is not executing! How to do this? Then I tried a second way. I am able to execute the both functions when ever an user clicks on the div, by using the following snippet $('#testId').click(function(){ func1(); func2(); }); but now I am unable to access the value of code attribute and it is undefined! How can I access the value of the code attribute in func1 and func2? I know I can pass the parameters to func1 and func2 like below and later access the values, $('#testId').click(function(){ func1('value of code'); func2('value of code'); }); But I am looking for a different solution if possible. Finally I am looking for a way by which I can execute both of the functions and also have access to the value of the code attribute. Any suggestion will be appreciated!
type: Question
has answer: http://stackoverflow.com/a/26406792

http://stackoverflow.com/q/26507950
has body: I'm trying to write a custom language mode in Codemirror. I started with "simple mode" (http://codemirror.net/demo/simplemode.html), but looks like I can't check for paragraph start or end (please correct me if I'm wrong). (A paragraph is defined just by having double break line before/after text). So I switched to normal mode (http://codemirror.net/doc/manual.html#modeapi), but I'm really having trouble understanding hot the whole state machine system works. I started trying to detect the first paragraph's word by defining a "blankLine" method and setting a "prevLineBlank" state variable there, and then in the "token" method I check for that variable, find the next blank space (or end of line) and return the appropiate style. This one seems to work. Now, trying to find the paragraph's last word, I'm running in circles... I've managed to detect the last word of each line, and it works, but as said, I need to do the same only with the last word of the paragraph. Here's my code so far: CodeMirror.defineMode("netlang", function() { return { // This will detect empty lines to be used when detecting paragraph's first word blankLine: function(state){ console.log( "netlang: BLANK line: ", state ); state.prevLineBlank = true; }, // Just initialise state object startState: function(){ console.log( "netlang: start state"); return { prevLineBlank: true }; }, token: function(stream, state) { console.log( "netlang: token ", stream ); // Detect if we are starting a paragraph if( state.prevLineBlank ){ // If we are, reset the variable since it is not a "start of paragraph" anymore state.prevLineBlank = false; // Find the next blank space var nextSpace = stream.string.indexOf(" "); // If found, move position there to style only the first word if( nextSpace &gt; -1 ){ stream.pos = nextSpace; // If not, it means there's only one word, so tak the whole line }else{ stream.skipToEnd(); } // Return the style name return "firstWord" } // If we're not at start of paragraph... else { var la…
tagged with: codemirror
type: Question
has answer: http://stackoverflow.com/a/26510365
tagged with: javascript
score: 0
has title: Finding first and last words of paragraph for custom language mode in CodeMirror
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/41437713
type: Comment
has text: Okay I got the counting to occur but the plot thickens - since the initial page load relies upon my offset limits from the db (via php script), how can I get that number on page load? Exactly. I can't....not sure the best way to handle this - but it's a wonderful puzzle for me to figure out...
type: AnswerComment
comment on: http://stackoverflow.com/a/26390677
score: 0

http://stackoverflow.com/comment/41539700
comment on: http://stackoverflow.com/a/26448937
score: 0
type: AnswerComment
type: Comment
has text: try to execute. it returns 0 always.

http://stackoverflow.com/comment/41481020
type: QuestionComment
comment on: http://stackoverflow.com/q/26416936
score: 0
has text: what does the data look like when you `console.log(chatMessage)`
type: Comment

http://stackoverflow.com/q/26431762
tagged with: javascript
type: UnansweredQuestion
score: 1
tagged with: jquery
type: Question
has body: I'm relatively new to jQuery and JavaScript, and I think I understand what is causing my issue, but I'm not sure how to fix it. I'm using SimpleWeather.JS , moment.js, and moment.js timezone to get the current time and weather for 4 cities. I have all the data I want on the page, but I want to move each city's time as the second paragraph in each city's div. Any ideas on how to get that working with my current code or is there a more efficient way of producing this result? http://jsfiddle.net/ljd144/p6tpvz1r/ Here's my JS: $(document).ready(function () { $('.weather').each(function () { var city = $(this).attr("city"); var woeid = $(this).attr("woeid"); var degrees = $(this).attr("degrees"); var continent = $(this).attr("continent"); $.simpleWeather({ zipcode: '', woeid: woeid, location: '', unit: degrees, success: function (weather) { if (continent == 'America'){ html = '&lt;p&gt;' + weather.city + ', ' + weather.region + '&lt;/p&gt;'; } else { html = '&lt;p&gt;' + weather.city + ', ' + weather.country + '&lt;/p&gt;'; } //html += '&lt;p class="time" id="'+city+'&gt;&lt;/p&gt;'; //html += '&lt;p&gt;' + weather.updated + '&lt;/p&gt;'; html += '&lt;p&gt;&lt;i class="icon-' + weather.code + '"&gt;&lt;/i&gt; ' + weather.temp + '&amp;deg;' + weather.units.temp + '&lt;p&gt;'; html += '&lt;p&gt;' + weather.currently + '&lt;p&gt;'; $('#weather_' + city).html(html); }, error: function (error) { $('#weather_' + city).html('&lt;p&gt;' + error + '&lt;/p&gt;'); } }); }); $(function () { setInterval(function () { $('.time').each(function () { var city = $(this).attr("city"); var continent = $(this).attr("continent"); //$(this).text(city); var utc = moment.utc().format('YYYY-MM-DD HH:mm:ss'); var localTime = moment.utc(utc).toDate(); cityTime = moment(localTime).tz(continent + "/" + city).format('ddd MMM D YYYY, h:mm:ss a z'); $(this).text(city+ ': '+cityTime); }); }, 1000); }); $('.time').each(function () { var city = $(this).attr("city"); //$('#weather_' + city).after(this); });…
tagged with: momentjs
favorite count: 0
has comment: http://stackoverflow.com/comment/41508891
has answer: http://stackoverflow.com/a/26432042
has comment: http://stackoverflow.com/comment/41508438
answer count: 2
upvote count: 1
has title: Using jQuery to rearrange page elements
has answer: http://stackoverflow.com/a/26431844
downvote count: 0

http://stackoverflow.com/q/26448005
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/26448583
tagged with: javascript
has comment: http://stackoverflow.com/comment/41538558
has title: Pass template url to angularjs directive
has comment: http://stackoverflow.com/comment/41557676
accepted answer: http://stackoverflow.com/a/26448583
score: 0
answer count: 1
has body: Is there any way to pass string object with template url to the directive? My solution don't works correctly. Javascript: function moduleView() { return{ restrict: 'A', templateUrl: function (elem, attr) { return attr.url; } }; }; function ModulesCtrl($scope, ModulesService) { $scope.modules = []; $scope.run = function () { ModulesService.loadModules(function (items) { $scope.modules = items; }); }; $scope.run(); }; html(jade): ul(ng-repeat="item in modules") div(module-view url="item.path") item.path is a string with url o the template. But this code don't works. i have this error: Error: [$compile:tpload] Failed to load template: item.path
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41538579
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41538394
has comment: http://stackoverflow.com/comment/41538517

http://stackoverflow.com/comment/41495342
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26412327
has text: I will update my post, so you could see what I had done. Thanks

http://stackoverflow.com/q/26448486
has answer: http://stackoverflow.com/a/26448571
accepted answer: http://stackoverflow.com/a/26448571
type: AnsweredQuestion
has body: here is my catalogue codes. want to display the value of the checkbox multiplied to the value of the dropdown list and output the product to the . just html and javascript codes are to be used. Specialty Cakes Black Forest Chocolate sponge layered with sugar syrup and Kirsch flavouring, white mousse and dark sweet cherries. Buy P550.00 QTY: 1 2 3 4 5 6 7 8 9
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has title: how to display the product of checkbox and dropdown list in number box

http://stackoverflow.com/q/26513690
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/41657501
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26514145
score: 0
tagged with: invoice
tagged with: textarea
answer count: 1
has comment: http://stackoverflow.com/comment/41657343
tagged with: http://stackoverflow.com/tag/html
has body: I'm getting close with this, I'm just having trouble getting my first entry and second entry etc to add together. My first entry shows up in the text field, and my second entry does as well, but they don't add together, it just shows the total, subtotal and tax of my second entry at the bottom, not the sum of the first and second entry. Text area looks like this &lt;textarea input type ="text" name = "textarea" id = "textarea" rows = "12" cols = "180" placeholder = "--Item Code-- --Item Name-- --Item Cost-- --Quantity-- --Subtotal-- --Tax-- --Total--"&gt;&lt;/textarea&gt; My document.getElementById looks like this document.getElementById('textarea').value += ("\n")+("\n") + "--" + code + "--" + " " + " " + "--Item Name--" + "--" + itemName + "--" + " " + " " + "--" + cost +"--" + " " + " " + "--" + quantity + "--" + " " + " " + "--" + subtotal + "--" + " " + " " + " " + "--" + tax + "--" + " " + " " + "--" + total + "--"; So every time I hit my Add Item button, it'll keep adding my entries to the text field, but it won't add the sum of all those entries. I won't post my whole code, but I'll give a snippet to give you an idea var subtotal = document.getElementById("subtotal").value; subtotal = cost * quantity; // multiplying cost by quantity = subtotal var tax = document.getElementById("tax").value; tax = subtotal * .07; // multiplying subtotal by tax(.7) = amount of tax owed var total = document.getElementById("total").value; total = tax + subtotal; //adding tax to subtotal = total value document.getElementById("subtotal").value = subtotal; document.getElementById("tax").value = tax; document.getElementById("total").value = total; How can I get the sum of all my entries? If you need me to post more code, I will. I just wanted to keep this post concise and to the point. . EDIT: I'm making an invoice, and the user enters Below shows the layout of the page Item Code (text field for user to enter info) Item Name (text field for user to enter info) Item Cost (text field …
has title: Calculate sum of textarea entries in an invoice
has comment: http://stackoverflow.com/comment/41657400
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26514145

http://stackoverflow.com/a/26424317
has comment: http://stackoverflow.com/comment/41494012
has comment: http://stackoverflow.com/comment/41493808
answers question: http://stackoverflow.com/q/26424230
type: Answer
has comment: http://stackoverflow.com/comment/41493905
has comment: http://stackoverflow.com/comment/41494081
accepted answer of: http://stackoverflow.com/q/26424230
has comment: http://stackoverflow.com/comment/41493988
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41494200
has body: Looking into MDN Documentation JSON.stringify(value[, replacer [, space]]) You can see that there is a third parameter to stringify function, called space wich causes the resulting string to be pretty-printed. You can use a tab character mimics standard pretty-print appearance: JSON.stringify({ first: 1, second: 2 }, null, '\t') // returns the string: // '{ // "first": 1, // "second": 2 // }'
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41557427
has text: The second construction doesn't offer equivalent functionality as the first construction because only the first construction offers access to other per-instance private variables in the constructor. If the choice is only between 1 and 2, the choice needs to be made based on which functionality is needed. I offered a third choice in my answer that offers the same access to private variables in the constructor, but doesn't use the prototype in that way (which I agree with you, seems odd and out of place).
comment on: http://stackoverflow.com/a/26458547
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41503893
has text: http://jsfiddle.net/pavelzagalsky/k7aj1q45/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26428355
type: QuestionComment

http://stackoverflow.com/a/26417464
has comment: http://stackoverflow.com/comment/41482169
has comment: http://stackoverflow.com/comment/41482879
score: 0
has comment: http://stackoverflow.com/comment/41482978
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41482119
has body: None. Really, none. Your constructor function does not do anything more than init. This is more or less an antipattern. The advantage of a method that initializes the object would be that it could be called multiple times (on the same object), for use in object pooling or if just to reset it. However, every well-engineered JS object does have that method already: it's called .constructor(). It's the constructor function, by default available on its own prototype, and usually put on it explicitly if necessary (as was done in your example). This means having an extra init method is rather useless, typically less performant and more verbose. Except maybe that you use this verbosity to emphasize (by name, and style of declaration) the use of it as a method, and possibly to ease a planned refactoring so that the actual constructor would do more than the init method (e.g. create constant fields). I'd avoid doing this prematurely, though, yagni.
has comment: http://stackoverflow.com/comment/41482072
type: Answer
has comment: http://stackoverflow.com/comment/41482773
answers question: http://stackoverflow.com/q/26417247

http://stackoverflow.com/q/26461724
tagged with: ajax
has title: Implement multiple AJAX-requested series via HighCharts
type: Question
score: 0
answer count: 1
has body: I want to plot the performance results I collected to HighCharts via AJAX. Somehow, the .addSeries API call does not work properly. Can someone analyze, if I'm on the right track? $(function () { $('#chart3').highcharts({ chart: { //type: 'scatter' zoomType: 'xy' }, title: { text: 'Performance Results', x: -20 //center }, subtitle: { text: 'Update 7', x: -20 }, xAxis: { categories: ['1.270', '1.272', '1.273', '1.274', '1.276', '1.278', '1.280', '1.284', '1.286', '1.288', '1.290', '1.292', '1.294', '1.296', '1.298', '1.300', '1.302', '1.304', '1.306'], labels: { rotation: -60, style: { fontSize:'13px' } } }, yAxis: { title: { text: 'Miliseconds (ms)' } }, /* tooltip: { valueSuffix: '°C' }, */ legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle', borderWidth: 0 }, series: [ { regression: true, regressionSettings: { type: 'linear', color: 'rgba(223, 83, 83, .9)' }, name: 'Punkte', color: 'rgba(17, 201, 176, .5)', data: [ [1, 125373], [2, 125161], [3, 124497], [4, 124640], [5, 124914], [6, 124284], [7, 125039], ] }, { name: 'Download Files', data: [0, 0, 0, 0, 0, 0, 5224, 5529, 5520, 5928, 6604, 7205, 7155, 5505, 4843, 6769, 0, 0, 0], }, { name: 'Install Applications', data: [85859, 83681, 82710, 82337, 0, 83974, 82786, 79072, 78337, 65434, 67769, 59147, 57979, 58465, 56288, 56773, 56359, 56512, 56883] } ] }); var x; var y; var chart = $('#chart3').highcharts(); $.getJSON("http://performance/ajax.php?action=x", function(xdata) { chart.addSeries({ data: xdata; }); }); $.getJSON("http://performance/ajax.php?action=y", function(ydata) { chart.addSeries({ data: ydata; }); }); }); The ydata and xdata part at the bottom is the function I wrote to add the series.
tagged with: highcharts
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26461902

http://stackoverflow.com/comment/41568210
comment on: http://stackoverflow.com/q/26465032
type: Comment
type: QuestionComment
has text: Have you tried looking at the exchanged data eg with Firebug?
score: 1

http://stackoverflow.com/comment/41385017
type: Comment
type: QuestionComment
has text: Lars, my file in GeoJSON: 1.6M, in TopoJson: 172K... Amit, bear with me while I check your hypothesis. For this I guess I should change the zindex dynamically when the path is hovered.
comment on: http://stackoverflow.com/q/26359982
score: 0

http://stackoverflow.com/comment/41604560
score: 0
type: Comment
type: QuestionComment
has text: From where did you get `4738.3319,N` and `01903.2312,E`? They look absolutely wrong. Were there any degree symbols and quotes with these numbers?
comment on: http://stackoverflow.com/q/26484992

http://stackoverflow.com/comment/60909380
comment on: http://stackoverflow.com/a/26393317
type: Comment
score: 1
has text: ...or you are not linking it at all ! :D
type: AnswerComment

marker
tag name: marker
tags question: http://stackoverflow.com/q/26493304
tags question: http://stackoverflow.com/q/26375519
type: Tag

http://stackoverflow.com/comment/41592215
score: 0
has text: Could you please build a jsfiddle showing the issue you're having
comment on: http://stackoverflow.com/q/26476777
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41528015
type: QuestionComment
comment on: http://stackoverflow.com/q/26442465
has text: is it creating form using iframe(is your form located in iframe), or it's just a form?
score: 0
type: Comment

http://stackoverflow.com/a/26456353
score: 9
accepted answer of: http://stackoverflow.com/q/26447605
answers question: http://stackoverflow.com/q/26447605
type: AcceptedAnswer
upvote count: 9
type: Answer
downvote count: 0
has body: You have the setInterval(hourofday, 6000); function call INSIDE the hourofday() function definition! This means that it will infinitely recurse, calling itself until your computer runs out of memory. Just move the setInterval(...) statements OUTSIDE of the function definitions.

http://stackoverflow.com/a/26455090
accepted answer of: http://stackoverflow.com/q/26454979
type: AcceptedAnswer
has body: Jquery needs to be defined first, otherwise isotope can't extend it.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26454979

http://stackoverflow.com/a/26494659
answers question: http://stackoverflow.com/q/26489805
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: The problem is simply that the generated javascript is lacking quotes to make the value a javascript string. Ex after JSF/Java has finished constructing the view, the resulting javascript call that ends up in the page content processed by the browser needs to be this: var a=function(){ showAlert('\\name'); };
accepted answer of: http://stackoverflow.com/q/26489805

http://stackoverflow.com/comment/41652042
type: Comment
type: QuestionComment
has text: It's the same as the issue [addressed here](http://stackoverflow.com/questions/13715900/d3-js-plotting-multiple-data-sets-from-separate-files/13717110#13717110).
score: 0
comment on: http://stackoverflow.com/q/26509520

http://stackoverflow.com/q/26417764
has answer: http://stackoverflow.com/a/26417800
has body: I am having an issue wherein I am trying to use the localStorage method to store user preferences when switching between two separate style sheets, one blue and one dark. I just can't get it to function, and I seem to be unable to call the storage function let alone set it. Here is the javascript and html code. Welcome Page Blue Dark Anyone can tell me what I am doing wrong?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41482605
score: 0
answer count: 2
has title: Using localStorage for switching CSS style sheets with persistence
has answer: http://stackoverflow.com/a/26417821
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/41384511
comment on: http://stackoverflow.com/a/26358989
score: 0
type: AnswerComment
has text: Just input this into the site, unfortunately it doesn't seem like it's made any difference to the animation running really poorly. Thanks though for teach me about 'data-position'
type: Comment

http://stackoverflow.com/q/26392852
answer count: 0
downvote count: 0
type: UnansweredQuestion
has body: I'm trying to find where I can edit some javascript code that gets injected into a Html.EditorFor statement inside the _CreateOrUpdateAddress.cshtml in Presentation > Nop.Admin > Views > Customer. The javascript code basically fills the StateProvince dropdown select when an option is selected in the Country dropdown select. This is the code inside _CreateOrUpdateAddress.cshtml: @model CustomerAddressModel @Html.EditorFor(model =&gt; model.Address, "Address") and this is the generated code: &lt;script type="text/javascript"&gt; $(document).ready(function() { $("#Address_CountryId").change(function() { var selectedItem = $(this).val(); var ddlStates = $("#Address_StateProvinceId"); $.ajax({ cache: false, type: "GET", url: "/Admin/Country/GetStatesByCountryId", data: { "countryId": selectedItem, "addEmptyStateIfRequired": "true" }, success: function(data) { ddlStates.html(''); $.each(data, function(id, option) { ddlStates.append($('&lt;option&gt;&lt;/option&gt;').val(option.id).html(option.name)); }); }, error: function(xhr, ajaxOptions, thrownError) { alert('Failed to retrieve states.'); } }); }); }); &lt;/script&gt; &lt;input id="Address_Id" type="hidden" value="0" name="Address.Id" data-val-required="'Id' must not be empty." data-val-number="The field Id must be a number." data-val="true"&gt; &lt;input id="Address_FirstNameEnabled" type="hidden" value="True" name="Address.FirstNameEnabled" data-val-required="'First Name Enabled' must not be empty." data-val="true"&gt; &lt;input id="Address_FirstNameRequired" type="hidden" value="True" name="Address.FirstNameRequired" data-val-required="'First Name Required' must not be empty." data-val="true"&gt; &lt;input id="Address_LastNameEnabled" type="hidden" value="True" name="Address.LastNameEnabled" data-val-required="'Last Name Enabled' must not be empty." data-val="true"&gt; &lt;input id="Address_LastNameRequired" type="hidden" value="True" name="Address.LastNameRequired" data-val-required="'Last Name Required' must not b…
tagged with: editorformodel
score: 1
type: Question
tagged with: nopcommerce
upvote count: 1
tagged with: javascript
has title: Nopcommerce 3.4 - javascript code inside _CreateOrUpdateAddress.cshtml in Admin
favorite count: 0
has comment: http://stackoverflow.com/comment/41744780

http://stackoverflow.com/comment/41397105
has text: this is an interesting approach for a template driven app, however my use case is more for a game where i want to control everything from javascript. I like the method of using a helper as a reactive source, perhaps that can be repurposed as a reactive variable. thanks!
comment on: http://stackoverflow.com/a/26358443
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41584557
type: QuestionComment
has text: Have you searched for window.scrollTo or window.scroll?
comment on: http://stackoverflow.com/q/26473546
score: 0
type: Comment

http://stackoverflow.com/comment/41681380
comment on: http://stackoverflow.com/q/26511686
score: 0
type: QuestionComment
type: Comment
has text: Can someone put an answer so for the sake of this site I can accept and this *open* issue will be solved

http://stackoverflow.com/a/26485006
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41608073
has comment: http://stackoverflow.com/comment/41608651
has comment: http://stackoverflow.com/comment/41607925
has body: First, your dates need to be strings or you'll start getting some really weird output: var arr = [ ['2014-08-13', 3], ['2014-08-13', 3], ['2014-08-14', 4], ['2014-08-12', 2], ['2014-08-13', 3], ['2014-08-12', 2] ]; Create a new object. We're going to use its keys to store our dates and values to store the failures and number of times that day has appeared. var obj = {}; Loop over the array. If the key/date doesn't exist add it to the object and set the value to an array containing the number of failures and set the current count to 1. If the key/date does exist, add the number of fails to the fail total and increment the count. for (var i = 0, l = arr.length; i &lt; l; i++) { var el = arr[i]; var date = el[0]; var fails = el[1]; if (!obj[date]) { obj[date] = [fails, 1] } else { obj[date] = [obj[date][0] + fails, obj[date][1] + 1] } } Finally loop over the object and push the date and average back to a new array. var out = []; for (var date in obj) { out.push([date, obj[date][0] / obj[date][1]]) } DEMO
has comment: http://stackoverflow.com/comment/41607719
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41606913
accepted answer of: http://stackoverflow.com/q/26484654
type: Answer
answers question: http://stackoverflow.com/q/26484654

http://stackoverflow.com/a/26361880
has body: Try adding the following to your css. .navbar-collapse{ max-height:auto; }
has comment: http://stackoverflow.com/comment/41382636
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26361480
answers question: http://stackoverflow.com/q/26361480
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41383668

http://stackoverflow.com/comment/41422576
type: QuestionComment
has text: At some point you overwrite `cookies` and `cursors` with the content of `state`, right?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26384013

http://stackoverflow.com/q/26358096
score: 3
has body: Would like to capture image of possibly inactive tab. Problem is that when using the approach displayed here the tab often does not get time to load before capture is done, resulting in failure. The chrome.tabs.update() call-back is executed before the tab can be captured. I have also tried to add listeners to events like tabs.onActivated and tabs.onHighlighted and doing the capture when those are fired, but the result is the same. And, as a given by that, I have also tried highlighted instead of active on chrome.tabs.update() – and combination of both; with listeners and call-backs. The only way to make it work partially better is by using setTimeout() , but that is very hackish, not reliable and ugly. The fact one have to activate a tab before capture is somewhat noisy – but if one have to add delays the issue becomes somewhat worse. This is more like a convenience feature for my extension, but would be nice to make it work. /* Not the real code, but the same logic. */ var request_tab = 25, request_win = 123 old_tab; /* Check which tab is active in requested window. */ chrome.tabs.query({ active : true, windowId : request_win }, function (re) { old_tab = re[0].id; if (old_tab !== request_tab) { /* Requested tab is inactive. */ /* Activate requested tab. */ chrome.tabs.update(request_tab, { active: true }, function () { /* Request capture */ /* CB TOO SOON! */ chrome.tabs.captureVisibleTab(request_window, { format : 'png' }, function (data) { /* ... data ... */ /* Put back old tab */ chrome.tabs.update(old_tab, { active: true }); }) }); } else { /* Requested tab is active. */ /* Request capture. */ chrome.tabs.captureVisibleTab(request_window, { format : 'png' }, function (data) { /* ... data ... */ }) } });
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/26365418
upvote count: 3
type: UnansweredQuestion
tagged with: google-chrome
has title: Capture (screenshot) of inactive tab
type: Question

http://stackoverflow.com/comment/41640153
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26502192
has text: How I can inspect the network traffic? so for 1) I'm setting that: http://developer.android.com/reference/android/widget/VideoView.html#setVideoURI%28android.net.Uri,%20java.util.Map%3Cjava.lang.String,%20java.lang.String%3E%29 and for 2) I more sure it's correctly formated because i did the function by myself but the name of the cookie is good on the API, just the value is wrong.
score: 0

http://stackoverflow.com/comment/41532035
comment on: http://stackoverflow.com/q/26444640
score: 0
type: Comment
type: QuestionComment
has text: nodes - select not adding to id=zip

http://stackoverflow.com/a/26497170
has comment: http://stackoverflow.com/comment/41631951
type: Answer
downvote count: 0
has body: You need a non-anonymous (or semi-anonymous) MUC to get the real JID of a occupant. See XEP-0045 § 7.2.4
score: 1
accepted answer of: http://stackoverflow.com/q/26496235
answers question: http://stackoverflow.com/q/26496235
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26397904
type: Question
tagged with: browser
answer count: 2
linked to: http://stackoverflow.com/q/6731303
linked to: http://stackoverflow.com/q/9498512
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26398208
has comment: http://stackoverflow.com/comment/41446721
score: 0
possible better answer: http://stackoverflow.com/a/26397999
has answer: http://stackoverflow.com/a/26397999
has body: Can any one help meto detect browser supports html5 and css3 or not ? I have tried this code : if(Modernizr.canvas){ alert('Html 5 support'); } else{ alert('HTML 5 not supported'); } But this always show "Html 5 supoort" while IE6 doesn't support HTML 5. THanks, M
tagged with: sniffer
tagged with: modernizr
type: AnsweredQuestion
has title: How to detect browser support HTML 5 or not
accepted answer: http://stackoverflow.com/a/26398208
has comment: http://stackoverflow.com/comment/41447263

http://stackoverflow.com/comment/41436855
type: AnswerComment
comment on: http://stackoverflow.com/a/26391712
type: Comment
has text: Why you can select many options in the same time(It's a radio button)?
score: 0

http://stackoverflow.com/comment/41475408
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26413672
has text: http://stackoverflow.com/questions/10371948/how-to-use-bootstrap-tooltip-on-input-elements
score: 1

http://stackoverflow.com/q/26461031
has comment: http://stackoverflow.com/comment/41561600
has comment: http://stackoverflow.com/comment/41561553
type: AnsweredQuestion
has title: jquery on() for multiple element and multiple function
has answer: http://stackoverflow.com/a/26461101
has body: I'm a beginner in jquery or javascript. And I'm wondering is there anyway to write a click event for multiple elements and multiple function. For example, I have a lot of buttons that will execute different function when clicked. Is there anyway to include all the function in 1 click event? Like "document on click", "button1" will do "function ...", "button2" will do "function ...". More like a switch case styled ??
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41561272
score: 0
accepted answer: http://stackoverflow.com/a/26461101
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41492988
comment on: http://stackoverflow.com/q/26414295
score: 0
type: Comment
type: QuestionComment
has text: @Malvolio, thank you for reminding me that I can debug JavaScript - still new at this. I debugged it in firebug and request.responseText is showing a value of "". So I think somehow the Servlet is not sending the response properly. Still investigating.

http://stackoverflow.com/a/26490289
score: 2
type: AcceptedAnswer
downvote count: 0
has body: You've stumbled upon a common problem. tmp_img.src loads the dataUrl into your new image--but that takes time. So javascript continues with your code below that even before the image is loaded. The result is that you are sometimes trying to ctx.drawImage before tmp_img has been fully loaded and is ready to use. The fix is to refactor your code to use tmp_img.onload. The .onload triggers a callback function when tmp_img is finally ready to use. The refactoring might look like this: var tmp_img = new Image(); tmp_img.onload=function(){ //resize image to 45x75 var canvas = document.getElementById('hidden_canvas'); canvas.width = 45; canvas.height = 75; var ctx = canvas.getContext("2d"); ctx.drawImage(tmp_img, 0, 0, canvas.width, canvas.height); dataUrl = canvas.toDataURL(); } tmp_img.src = dataUrl; // more javascript JavaScript will execute the above code in this order: Create a new Image object See tmp_img.onload and make a not that it should do that code when the image is fully loaded Set tmp_img.src and start loading the image. Continue with "more javascript" When the image is fully loaded, execute everything in the .onload callback function. It looks like you're using KineticJS--are you? If so, then instead of stage.toDataURL you could use stage.toImage. That way you already have the image loaded when the stage.toImage callback is executed (you don't have to worry about waiting for the image to load). Then just .drawImage the image that KineticJS provides in the callback.
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26485920
has comment: http://stackoverflow.com/comment/41615613
answers question: http://stackoverflow.com/q/26485920

http://stackoverflow.com/q/26380538
has answer: http://stackoverflow.com/a/26380586
has comment: http://stackoverflow.com/comment/41417551
has comment: http://stackoverflow.com/comment/41417317
type: UnansweredQuestion
has title: How can I expose local variables defined in anonymous function to the global space?
has body: I have a case where variables are defined inside an self-executing anonymous function. I want to expose them to the global space so I can use foo and bar after the anonymous function returns. (function () { var foo = 123; var bar = function () { /* ... */ }; })(); A problem is that I cannot simply do window.foo = 123 or SomeExistingGlobalObject.foo = 123 to expose it because I do not know what comes in inside the anonymous function in advance. The content inside the function is dynamically generated. I tried returning another self-executing function from that function, but that did not work, either. Is this possible?
type: Question
has answer: http://stackoverflow.com/a/46176560
has answer: http://stackoverflow.com/a/26380644
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41415928
answer count: 3

http://stackoverflow.com/comment/41448391
has text: Why do you need to send it as string ? it's not like js can't cope with binary response from the webservice, am I wrong ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26397876

http://stackoverflow.com/comment/41470197
comment on: http://stackoverflow.com/a/26408575
score: 0
type: AnswerComment
has text: I assume this is happening because the `nextUntil` method is selecting everything until "main" but what if I want it to stop when it gets to "main" or the standard "dark-link"?
type: Comment

http://stackoverflow.com/comment/41610470
comment on: http://stackoverflow.com/a/26487936
has text: If I try to do as you say I get this error: Uncaught TypeError: Cannot read property 'setDefaults' of undefined
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/50663078
type: AnswerComment
has text: Can you explain what your code does? It would make your answer more helpful.
type: Comment
comment on: http://stackoverflow.com/a/31338579
score: 0

http://stackoverflow.com/comment/41569798
comment on: http://stackoverflow.com/a/26465989
type: Comment
has text: +1 for submit event instead of click and use of `:input` (you forgot to include the jQuery lib in you fiddle)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26358157
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41374888
has answer: http://stackoverflow.com/a/26358244
answer count: 1
downvote count: 0
tagged with: jsp
tagged with: javascript
favorite count: 0
has body: Here is my javascript code when I click the following href, I want the current window to be closed and logout window should be opened. But the problem is sometimes it's working fine, sometimes the current window doesn't get closed but logout window will be opened in a new tab logout
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26358244
type: AnsweredQuestion
has title: Close current window and open a new window when click a href in JSP
score: 1
has comment: http://stackoverflow.com/comment/41375837

http://stackoverflow.com/comment/41553610
type: QuestionComment
comment on: http://stackoverflow.com/q/26456558
score: 1
has text: Give it a spanking and send it to bed without dinner. (Also, take them out of the `if` block.)
type: Comment

http://stackoverflow.com/a/26501338
upvote count: 5
has comment: http://stackoverflow.com/comment/41634734
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41656561
has comment: http://stackoverflow.com/comment/41634641
has comment: http://stackoverflow.com/comment/41635038
type: Answer
has comment: http://stackoverflow.com/comment/41634611
accepted answer of: http://stackoverflow.com/q/26501183
answers question: http://stackoverflow.com/q/26501183
has comment: http://stackoverflow.com/comment/41634694
has comment: http://stackoverflow.com/comment/41634591
has body: Fair question I guess, although I'm not a fan of the arrogance that came with it :) Lets break this down a bit: object.method(function() { alert('hi'); }); Your question is, why can't I skip the anonymous function? What we're really doing here, is telling method to execute something at a later point. What's being executed is being supplied as a function. We could simply give it a reference to a function instead! object.method(alert); Here's the problem, we've sent it a function, but now we can't send it any arguments. If we want to bring arument along to method, we must use ( and ). As soon as those characters are included, the alert will instead get executed and the result of alert will get sent to method. Now why can't this also be sent by reference? A very simple reason, you need some way to also pass the result of a function as an argument to another function, and the javascript engine cannot distinguish if your intent is to: Send the result of a function as an argument to this other function, OR Send a reference to the function with certain arguments to the other function. Using ( and ) on a function means calling it immediately in almost every programming language, and javascript is no different. There is a workaround: object.method(alert.bind(this, "hi"));

http://stackoverflow.com/comment/41579937
comment on: http://stackoverflow.com/a/26392170
has text: I forgot the person who asked the question is not notified when answers are updated. I have added addition code addressing when to call loadUI, and expanded some discussion.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41603918
comment on: http://stackoverflow.com/a/26484585
type: AnswerComment
type: Comment
has text: Ok, then pretend I didn't say anything. ;)
score: 0

http://stackoverflow.com/comment/41461463
has text: You've got a typo `document.getElementById('lame')` should be `document.getElementById('lname')`. This would break your `if` statement.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26406273

http://stackoverflow.com/comment/41602371
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26483024
has text: @theorise and updated further, for increased flexibility
type: Comment

http://stackoverflow.com/a/57311731
answers question: http://stackoverflow.com/q/26408388
has body: I had similar issue. In my case it was webpack-dev-server not re-compiling my stuff on the run properly. I just restarted the dev server to get it working again.
score: 0
type: Answer

http://stackoverflow.com/comment/41385440
score: 0
comment on: http://stackoverflow.com/q/26363909
type: QuestionComment
has text: Just something in addition, regarding the multimple markers I saw this code: http://stackoverflow.com/questions/3059044/google-maps-js-api-v3-simple-multiple-marker-example
type: Comment

http://stackoverflow.com/q/26449793
has title: How to make my search fuzzy
tagged with: javascript
upvote count: 2
answer count: 2
has body: I can get a particular list on to the top using a single value. How can I make my search fuzzy so that it accepts any data of odata on list? var sf = new sap.m.SearchField({ placeholder: "Search", showRefreshButton: true, liveChange: function(oEvent) { var tpmla = oEvent.getParameter("newValue"); var filters = new Array(); var oFilter = new sap.ui.model.Filter("Kunnr", sap.ui.model.FilterOperator.Contains, tpmla); filters.push(oFilter); this.oList = sap.ui.getCore().byId("po_list"); this.oList.getBinding("items").filter(filters);}) I need to understand how can I give more inputs of type Name1, Addr.
downvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26460142
type: AnsweredQuestion
score: 1
tagged with: sapui5
possible better answer: http://stackoverflow.com/a/26460251
has answer: http://stackoverflow.com/a/26460251
has answer: http://stackoverflow.com/a/26460142
type: Question

http://stackoverflow.com/comment/41458962
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26405072
has text: no i want animation but it should be stopped when mouse hover, once mouse out animation should go
score: 0

http://stackoverflow.com/comment/42153469
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26423842
has text: Might be thw problem. Will check it out late tommorrow.

http://stackoverflow.com/comment/41590367
comment on: http://stackoverflow.com/q/26475916
score: 1
has text: If `ihplatform()` and `platform.execute()` will make the custom API call for you and call your callback function when it's done, what else are you asking about?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41373499
type: Comment
comment on: http://stackoverflow.com/a/26356519
score: 0
type: AnswerComment
has text: Exactly! I'm ok with loops ;)

http://stackoverflow.com/q/26422559
has comment: http://stackoverflow.com/comment/41490838
tagged with: javascript
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/26422829
has body: I am developing a small web page. On this page I have a table and created a function that takes the id and returns an image. Everything is working correctly, the issue is that whenever I click on a line that function is executed. I just wanted the function to execute when I click on the attached column of id's. (Second Column) Does anyone can help me please? Realized my doubts? Thank you all. &lt;script&gt; function addRowHandlers() { var table = document.getElementById("tableId"); var rows = table.getElementsByTagName("td"); for (i = 0; i &lt; rows.length; i++) { var currentRow = table.rows[i]; var createClickHandler = function(row) { return function() { var cell = row.getElementsByTagName("td")[1]; var id = cell.innerHTML; //use ajax to post id to ajax.php file $.post("ajax.php", { id:id }, function( data ) { //add result to a div and create a modal/dialog popup similar to alert() $('&lt;div /&gt;').html(data).dialog(); }); }; }; currentRow.onclick = createClickHandler(currentRow); } } window.onload = addRowHandlers(); &lt;/script&gt;
tagged with: php
accepted answer: http://stackoverflow.com/a/26422829
has title: How to execut a javascript function in a php table
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41490765
possible better answer: http://stackoverflow.com/a/26422825
has answer: http://stackoverflow.com/a/26423607
has answer: http://stackoverflow.com/a/26422825
has comment: http://stackoverflow.com/comment/41490774
has comment: http://stackoverflow.com/comment/41490952
has comment: http://stackoverflow.com/comment/41490864
type: AnsweredQuestion

http://stackoverflow.com/a/27917744
has comment: http://stackoverflow.com/comment/72710804
upvote count: 30
has comment: http://stackoverflow.com/comment/44233998
type: Answer
has comment: http://stackoverflow.com/comment/44233710
score: 30
has comment: http://stackoverflow.com/comment/136590472
accepted answer of: http://stackoverflow.com/q/26483541
answers question: http://stackoverflow.com/q/26483541
has comment: http://stackoverflow.com/comment/44233834
has body: __gcrweb is a reference by gcrweb.js, which is a local (on device) js getting injected by the iOS version of Chrome. Google needs to do this for some extended functionality (mostly inserting/retrieving login credentials and other form information you stored via another synced Chrome browser) which isn't provided by the native webview it's built on and can't be added to it otherwise. This should not affect any parts of your code and i'd get rid of it by ignoring it in your error logging (the error should always be the same string), for example: https://docs.sentry.io/clients/javascript/config/ https://rollbar.com/docs/notifier/rollbar.js/#ignoring-specific-exception-messages Another solution could be to make sure that the reference always exists by declaring it yourself at the beginning of your js init if (!window.__gCrWeb) window['__gCrWeb'] = {}; just like Google does it.
has comment: http://stackoverflow.com/comment/71993704
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44234154

http://stackoverflow.com/q/26373927
has comment: http://stackoverflow.com/comment/41416039
tagged with: modernizr
has title: How do I handle HTML5 input type date with localization?
linked to: http://stackoverflow.com/q/7372038
has body: I have some date fields in my application (backed by rails) and my locale is pt-BR (dd/mm/yyyy). I know that some browsers (e.g. Chrome) support input type=date and in these browsers I would like to use the native datepicker, and the format (presentation format) of date is shown accordingly with the browser locale settings, although the field value (wire format) still in ISO yyyy-mm-dd format. In other browsers that do not support it (e.g. Firefox) I am using a datepicker provided by javascript when the user focus the field, and the date is shown with my default pt-BR format (presentation format equals to wire format, localized). I am switching between these two types via Modernizr. However, the value (wire-format) submitted to the server is different, depending on the approach and I need to receive the value in my server equal, independent of user's browser. How do I handle this situation? Should I ignore input type date and use only one approach (change the type to text)? Or should I format the value, before submitting, via javascript, to 'delocalize' the value? Thanks in advance.
upvote count: 5
tagged with: date
type: Question
score: 5
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41404903
answer count: 0
type: UnansweredQuestion
tagged with: ruby-on-rails

http://stackoverflow.com/q/26423511
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41492265
answer count: 0
has body: When doing the following ajax call, the "load" function reloads the updated content, but the content prior to ajax call is also still visible. So, you see the "pre-ajax content" &amp; the "post-ajax content" in one page: &lt;script&gt; function myUnPause(elm) { var table = $('#realtime').dataTable(); var extension = $(elm).closest("tr").find('td.extension').text(); var agent = $(elm).closest("tr").find('td.name').text(); alert(extension.trim()+ ' will be unpaused and put back in the Queue'); $.ajax("/cura/pages/realtime/realtime2.php",{ type: "GET", data: { action:'agentpause', pauselocation: (extension.trim()), queue: 'testq', paused: 'false' }, success: function(msg){ $("#myunpause").load('/cura/includes/realtime.inc.php'); } }); } &lt;/script&gt; The php script displaying this content is referred to from the /cura/pages/realtime/realtime2.php page as: &lt;?php include '../../includes/realtime.inc.php'; ?&gt; Is this causing the old content to stay on the same page? Any ideas how to change it so only the update content is displayed?
type: Question
has title: jQuery ajax callback load content displayed twice
tagged with: javascript
has comment: http://stackoverflow.com/comment/41523319
score: 0
has comment: http://stackoverflow.com/comment/41492415
has comment: http://stackoverflow.com/comment/41495115
tagged with: load

http://stackoverflow.com/comment/41461145
score: 0
comment on: http://stackoverflow.com/q/26404948
type: Comment
type: QuestionComment
has text: Thanks for your answer. But It doesnt matter, I receive an error as response :/ GET https://api.meet2know.com/v1/leads?callback=jQuery11110770312482258305_1413465698548&request.json&_=1413465698549 jquery.min.js:4send jquery.min.js:4m.extend.ajax jquery.min.js:4(anonymous function) (index):30m.event.dispatch jquery.min.js:3r.handle

http://stackoverflow.com/a/26431289
has comment: http://stackoverflow.com/comment/41508605
has body: I wouldn't use this in production code... var dummyNode = document.createElement('div'); document.getElementByIdOriginal = document.getElementById; document.getElementById = function(id) { var element = document.getElementByIdOriginal(id); return (element) ? element : dummyNode; }
has comment: http://stackoverflow.com/comment/41507340
type: Answer
has comment: http://stackoverflow.com/comment/41507357
has comment: http://stackoverflow.com/comment/41507365
has comment: http://stackoverflow.com/comment/41507769
has comment: http://stackoverflow.com/comment/41508217
has comment: http://stackoverflow.com/comment/41507465
has comment: http://stackoverflow.com/comment/41507389
score: 0
answers question: http://stackoverflow.com/q/26431186

http://stackoverflow.com/q/26497147
tagged with: javascript
answer count: 1
has body: Is there an equivalent to Match.Result from .NET in javascript so that using a replace function, one can still use the convenient substitutions for perhaps part of the logic? Or does one need to provide a custom yet simple function like the following which seems to work in all cases? RegExp.matchResult = function (subexp, offset, str, matches) { return subexp.replace(/\$(\$|&amp;|`|\'|[0-9]+)/g, function (m, p) { if (p === '$') return '$'; if (p === '`') return str.slice(0, offset); if (p === '\'') return str.slice(offset + matches[0].length); if (p === '&amp;' || parseInt(p, 10) &lt;= 0 || parseInt(p, 10) &gt;= matches.length) return matches[0]; return matches[parseInt(p, 10)]; }); }; var subexp; //fill in with substitution expression var replaceFunc = function () { return RegExp.matchResult(subexp, arguments[arguments.length - 2], arguments[arguments.length - 1], Array.prototype.slice.call(arguments).slice(0, -2)); };
tagged with: regex
has answer: http://stackoverflow.com/a/26497508
favorite count: 0
accepted answer: http://stackoverflow.com/a/26497508
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
tagged with: .net
has title: .NET's Match.Result in javascript

http://stackoverflow.com/comment/41531788
has text: I do not think that's possible. The Facebook scraper reads indeed the static data (or put there dynamically) per url and doesn't call Javascript. Could you tell us more on why you need to put it in there by javascript?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26444421
type: Comment

http://stackoverflow.com/a/26420148
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26420057
has body: And a pure javascript solution: var elems=document.getElementsByClassName("container-fluid"); var item=elems[1];

http://stackoverflow.com/comment/89978462
type: AnswerComment
comment on: http://stackoverflow.com/a/26401940
score: 0
type: Comment
has text: No, it is not possible. Client must request the upgrade.

http://stackoverflow.com/comment/41629028
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26487858
has text: I think you are just going to have to give it a try.

http://stackoverflow.com/comment/41384355
has text: Agreed, no code is needed. In fact, code would actually add needless noise to the question since the exact implementation doesn't matter.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26360366

http://stackoverflow.com/comment/41666239
comment on: http://stackoverflow.com/a/26497713
type: Comment
has text: Hey @Ronnie can you check the description again? Please, seems like no one is willing to brainstorm a little to help me. I made some progress. Just trying to find how to do the 2nd part.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41648391
type: AnswerComment
has text: @Perseids I agree, but while salting+hashing on the client is obviously possible I'd recommend HTTPS first for securing the client-server communication. Using a pepper is indeed an extra layer of defence most people forget :)
type: Comment
comment on: http://stackoverflow.com/a/26506073
score: 0

http://stackoverflow.com/q/26476165
tagged with: jquery
has answer: http://stackoverflow.com/a/26476447
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: On click background is changed to image or color. To do it, for start I made two classes for body: body.bg-color { background-color:red; } body.bg-img { background: url(../images/bg.jpg) no-repeat center 0 fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } Then using .addClass and .removeClass I change backgrounds. Thing is that this method fades, in addition to background, also content. What should be done to fade in/out only background? $(document).ready(function(){ $('body').addClass('bg-color'); $('.element,#content1,#content2').hide(); $("#link1").click(function(){ $('#wrapper').hide(); $('body').removeClass('bg-color').fadeOut(); $('body').addClass('bg-img').fadeIn(); }); $("#link2").click(function(){ $('#wrapper').show(); $('body').removeClass('bg-img').fadeOut(); $('body').addClass('bg-color').fadeIn(); }); });
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has title: Replace(fade) body backgrounds without effecting nested elements

http://stackoverflow.com/comment/41569439
score: 0
type: Comment
type: QuestionComment
has text: What does not work as expected? What have you tried to fix the issue? What version of express are you using? What are the thrown errors? So many questions, so little information. -1
comment on: http://stackoverflow.com/q/26465724

http://stackoverflow.com/comment/41404338
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26373975
type: QuestionComment
has text: since you have used `!important` it will have priority over other rules... also the style that is loaded second will override the style that was loaded first if both rules has the same specificity

http://stackoverflow.com/q/26378668
answer count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41412579
tagged with: javascript
tagged with: mongodb
has comment: http://stackoverflow.com/comment/41413984
upvote count: 1
has title: "Uncaught ReferenceError: input is not defined" How to insert time value to MongoDB database
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I trying to insert time value to monogo db but i get this error i added String values to data base successfully .error on time adding Uncaught ReferenceError: input is not defined This is my script &lt;script type="text/javascript"&gt; $(document).ready(function() { var input1 = $('input[name="start_time"]'); var input2 = $('input[name="end_time"]'); var input3 = $('input[name="service"]'); var input4 = $('input[name="name"]'); var input5 = $('input[name="phone"]'); var input6 = $('input[name="amount"]'); // ENTER input.bind('keyup', function(e) { if (e.keyCode === 13) $('button').trigger('click'); }); $('button').bind('click', function() { var value1 = input1.val(); var value2 = input2.val(); var value3 = input3.val(); var value4 = input4.val(); var value5 = input5.val(); var value6 = input6.val(); if (value3.length === 0) return; $.post('/', { start_time:value1, end_time:value2, service: value3, client_name: value4, client_phone : value5, amount : value6 }, function(appoinments) { input1.val(''); input2.val(''); input3.val(''); input4.val(''); input5.val(''); input6.val(''); window.location.reload(true); }); }); }); &lt;/script&gt; This is my Model appinment.js var appoinmentSchema = mongoose.Schema({ start_time: Date, end_time : Date, service: String, client_phone : String, client_name: String, amount : String }) exports.schema = mongoose.model('appoinment', appoinmentSchema); exports.name = 'appoinment';

http://stackoverflow.com/q/26472048
has answer: http://stackoverflow.com/a/26472777
has comment: http://stackoverflow.com/comment/41583039
type: AnsweredQuestion
tagged with: typescript
has title: Creating a Q promise and invoking it later
has body: I'm trying to create a dialog box system in typescript. The intended use would be that a caller would do something like this; dialogBox.showDialog().then((result: DialogResult) =&gt; { // Handle the dialog result }); My DialogBox class would probably have some methods like this; private promise : Q.Promise&lt;DialogResult&gt;; public showDialog() : Q.Promise&lt;DialogResult&gt;{ this.promise = ... // How to create this promise? return this.promise; } public void setResult(result : DialogResult){ // What to do here? } Whenever the user clicks a button in the dialog, something like this would be called; dialogBox.setResult(theResult); This should then resolve/fulfill the promise created by the showDialog method. But I can't really figure out if this is possible with Q and so, how to implement the (promise-related parts of) showDialog and setResult. Anyone got any ideas? Update for completeness; Thanks to Bergi, here's my final, working code. Ended up using a deferred export class DialogBox implements INotification { private deferred: Q.Deferred&lt;DialogResult&gt;; constructor(public message: string, public header: string, public buttons?: DialogResult[]) { } public showDialog(): Q.Promise&lt;DialogResult&gt; { this.deferred = Q.defer&lt;DialogResult&gt;(); // My logic for displaying the box goes here return this.deferred.promise; } public setResult(result: DialogResult) { this.deferred.resolve(result); } }
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26472777
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
answer count: 1
downvote count: 0
score: 1
favorite count: 0
tagged with: promise

http://stackoverflow.com/q/26465032
tagged with: ajax
score: 0
has body: i have tried multiple ways using different ajax methods and cant get this to work. I am new to ajax and json so i thought this may be cause the data is not in a form but i have other ajax process's structured the same and they work. the inputs are picked up on click and appears in console but it seems the data: isnt sending the variables to php because when it fails the data returns undefined in alert box. the sql query etc runs fine in php myadmin so im at the end and lost haha! hoping someone can help me!! thanks in advanced! HTML <?php $page = "Blog | Fakebook"; include "../inc/connect.php"; include "../inc/login-check.php"; include "../inc/header.php"; include "../inc/menus.php"; ?> <?php include "../inc/modals.php"; echo " " ?> Add Image Publish Blog Enter Blog Title Go ahead and get your blog started AJAX $("#ajax-publish-blog").click(function (e){ event.preventDefault(); var blogTitle = $('#edit-blog-title').val(); var content = $('#edit-blog-content').val(); var image = $('.create-a-blog #hero').css('background-image'); var cleanup = /\"|\'|\)/g; var bg = image.split('/').pop().replace(cleanup, ''); var authorID = $('input[name=author]').val(); console.log("Blog Title = " + blogTitle + " // Blog Content = " + content + " // bg image = " + bg + " // authorID =" + authorID); $.ajax({ url: "../process/post-blog-process2.php", type: "POST", data: { blogTitle: blogTitle, content: content, image: bg, authorID: authorID }, dataType: 'json', success: function(data){ alert("ohyer" + " " + data.title + " " + data.authorID + " " + data.content + " " + data.image) }, error: function(data) { alert("ohno" + " " + data.title + " " + data.authorID + " " + data.content + " " + data.image) } }); }); PHP <?php session_start(); //start a session include "../inc/connect.php"; //include the database connection //prevent SQL injection and get data from inputs $blogTitle = mysqli_real_escape_string($con, $_POST['blogTitle']); $image = mysqli_real_escape_string($con, $_POST['image']…
has comment: http://stackoverflow.com/comment/41568246
has comment: http://stackoverflow.com/comment/41568109
favorite count: 0
has comment: http://stackoverflow.com/comment/41568177
accepted answer: http://stackoverflow.com/a/26465216
has comment: http://stackoverflow.com/comment/41568083
upvote count: 1
tagged with: php
downvote count: 1
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Ajax not posting data to PHP in JSON object
has comment: http://stackoverflow.com/comment/41568210
answer count: 1
has answer: http://stackoverflow.com/a/26465216
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41568752

http://stackoverflow.com/comment/41596190
type: QuestionComment
comment on: http://stackoverflow.com/q/26479420
score: 0
has text: did you also want the second `textbox` to be cleared if the first 1 is?
type: Comment

http://stackoverflow.com/comment/41475080
has text: In plain English, what value do you want to store in local storage?
score: 0
comment on: http://stackoverflow.com/q/26413379
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26459857
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26500970
accepted answer: http://stackoverflow.com/a/26500970
has body: I have support for two languages in my project (english and spanish). The thing is, that when I optimize the code with r.js, the output file has the root language (english) embed, but not the other variants (spanish). How can I force the optimizer to embed all the languages on the output file? Example: // /app/app.js define(["i18n!nls/something"], function(somethingLanguage) { /* stuff */ }); // /app/nls/something.js define({ "root": { "hi": "Hi!" }, "es": true }); // /app/nls/es/something.js define({ "hi": "¡Hola!" }); // /app/result-file.js define("nls/something", { "hi": "Hi!" });define(["i18n!nls/something"], function(somethingLanguage) { /* stuff */ }); As you can see, the "nls/es/something" is missing from the "result-file". It should look like this: // /app/result-file.js define("nls/something", { "hi": "Hi!" });define("nls/es/something", { "hi": "¡Hola!" });define(["i18n!nls/something"], function(somethingLanguage) { /* stuff */ }); I hope you can help me, guys. Thanks!
tagged with: requirejs
tagged with: r.js
tagged with: internationalization
type: AnsweredQuestion
has title: Is there a way to add all languages to optimized RequireJS project?
score: 1
tagged with: amd
type: Question
upvote count: 1
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/41621391
comment on: http://stackoverflow.com/q/26493949
score: 0
type: Comment
type: QuestionComment
has text: Label is an element, not an attribute.

http://stackoverflow.com/comment/41463055
score: 0
has text: I have added an id for the check button, and removed the onclick attr. Also make sure you are including jquery with a tag
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26406922

http://stackoverflow.com/comment/41422389
score: 2
comment on: http://stackoverflow.com/q/26384043
type: Comment
type: QuestionComment
has text: I doubt you'd notice a difference either way with just 30 elements.

http://stackoverflow.com/comment/41417093
type: QuestionComment
comment on: http://stackoverflow.com/q/26379625
score: 0
type: Comment
has text: It's not a problem, it's a how-to question. As far as I know ' ' loads all dependencies at once. I want to know how to postpone the loading of certain modules.

http://stackoverflow.com/comment/41518173
has text: @thefourtheye Not at all:) Thank you for the illumination !
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26436748
type: Comment

http://stackoverflow.com/q/26426792
favorite count: 0
has title: Position a pop-up div relative to the link
has answer: http://stackoverflow.com/a/26427815
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41500377
has comment: http://stackoverflow.com/comment/41517548
downvote count: 1
has comment: http://stackoverflow.com/comment/41500729
type: Question
has comment: http://stackoverflow.com/comment/41498607
has body: I am facing a problem. I have 10 images in a page. On clicking each, a Pop up will be displayed and the content of the clicked image is loaded from the database and shown in the div (Pop up). It works fine for the first set of Images(First Row). But when I click on the second and third set of Image rows. The pop up opens , But I have to scroll all the way up and see the Pop up and its contents. (Since the image are at the bottom and the Pop displays on the top of the page) I tried the following by making the Position: Fixed !important (I got partially succeeded making the Popup Displaying the centre of the View Port. But if the Pop-up contents exceeds the height of the viewport, the rest of the content is hidden and there is no option to scroll down to see more info.) Please refer this image for more clarity JavaScript // Script for fetching the height of the pop-up based on viewport inner height $(document).ready(function () { function setHeight() { windowHeight = $(window).innerHeight(); $('#panelpopup').css('height', windowHeight); }; setHeight(); $(window).resize(function () { setHeight(); }); }); CSS #panelpopup { max-width: 800px; height: auto !important; text-align:center; background-color:#fff !important; border:solid 1px #333; position:fixed !important; // I tried absolute first, but the pop up comes on top top:20%; left:50%; margin:0px 0 0 -400px; border-radius:6px; z-index:100100 !important; } HTML &lt;div id="panelpopup-wrap"&gt;&lt;!-- This is the transparent area around the pop up --&gt;&lt;/div&gt; &lt;div id="panelpopup"&gt; &lt;!-- Dynamic Content Goes here --&gt;&lt;/div&gt; Awaiting your valuable support Thanks in advance
has comment: http://stackoverflow.com/comment/41499276
upvote count: 5
tagged with: javascript
tagged with: jquery
score: 4
answer count: 1
has comment: http://stackoverflow.com/comment/41529671
has comment: http://stackoverflow.com/comment/41498593

http://stackoverflow.com/comment/41390396
type: Comment
comment on: http://stackoverflow.com/a/26365548
has text: Posting this data won't be that difficult. If you are posting using javascript and ajax, you've to stringify the object and post it.Once you receive it, DE-serialize it to get your own object
score: 0
type: AnswerComment

http://stackoverflow.com/q/26361230
tagged with: dom
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: backbone.js
type: Question
has body: I have a backbone-powered player which plays a list of songs at any given time and is fixed to bottom of the page. I also have several pages (working using Backbone Router) containing albums and songs so the user can click on "Play" on anything and the player starts playing the selected album or song. I want to show on that album or song that it’s currently playing, even if the user navigates to other pages or searches for something (eg. one of the albums in the results is the one currently playing). Right now, I have added a callback on player progress and it searches for $('.album[data-id="..."]) every single second and adds proper classes, etc. The problem is this is resource-intensive and takes a lot of time and cpu power (css selectors are slow). Is there a way to live listen for every dom change in the app and run the script on those changes not the song progress? Thanks.
tagged with: http://stackoverflow.com/tag/html
has title: Run a script on every dom change and action
has answer: http://stackoverflow.com/a/26361897
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26433204
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/26399348
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has title: Using CORS on node.js server on a phonegap application
has answer: http://stackoverflow.com/a/26402667
has body: I am trying to connect my cordova/phonegap application with my node.js server. Problem is, I get this error "XMLHttpRequest cannot load http://127.0.0.1:1234/api/users. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5000' is therefore not allowed access. The response had HTTP status code 500. " . I tried adding this middleware to my node.js server, entering my phonegap domain, then, just for testing purpouses of course, I figured I will allow ALL domains for CORS, still no luck. This is what I used on my node.js server: app.use(function (req, res, next) { // Website you wish to allow to connect res.setHeader('Access-Control-Allow-Origin', '*'); // Request methods you wish to allow res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); // Request headers you wish to allow res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type'); // Set to true if you need the website to include cookies in the requests sent // to the API (e.g. in case you use sessions) res.setHeader('Access-Control-Allow-Credentials', true); // Pass to next layer of middleware next(); }); And I am doing a pretty simple AJAX request from my phonegap application, which I think is pretty much correct. I am getting this error on my phonegap app and on the node.js server console I get an error from one of the controllers, saying can't see property X of undefined, which undefined is my req.body. Here is the request: var serverURL = 'http://127.0.0.1:1234'; var body = { userId : '123A', comment: { from: '123B', content: 'I am a new generation of 123! :)' } }; var bodyToString = JSON.stringify(body); $.ajax({url: serverURL + "/api/plates", dataType: "json", type: "PUT", data: bodyToString}).done(function (data) { alert(data); });
tagged with: node.js
score: 2
type: AnsweredQuestion
tagged with: cordova
upvote count: 2
accepted answer: http://stackoverflow.com/a/26402667
type: Question
linked to: http://stackoverflow.com/q/19003025
tagged with: cors
answer count: 1

http://stackoverflow.com/q/26459708
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26460235
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26460235
tagged with: angularjs-ng-click
score: 0
accepted answer: http://stackoverflow.com/a/26460220
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41559371
has comment: http://stackoverflow.com/comment/41559719
has title: why ng-click not working?
has comment: http://stackoverflow.com/comment/41559091
tagged with: javascript
answer count: 2
has body: I write a directive to impl ng-disabled because i just can use angularjs which version is 1.1.5,it't not provide ng-disabled,so tableApp.directive('myDisabled', function($compile) { return { restrict: 'A', replace: true, scope: { myDisabled: '=' }, link: function(scope, element, attrs) { var test = scope.$eval(attrs.myDisabled); console.log(test); scope.$watch(attrs.myDisabled, function (test) { if (test) { element.attr(); } else { element.attr('disabled', 'false'); } }); } }; }); the html code: &lt;html ng-app="tableApp"&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;div ng-controller="TableCtrl"&gt; &lt;input ng-model="page"/&gt; &lt;button class="btn btn-primary" ng-click="previouspage()" my-disabled="page &lt;=1"&gt;上一页&lt;/button&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; but why i click this button,it can't call the function previouspage() this is my angularjs code var tableApp = angular.module('tableApp', [], function ($httpProvider) { $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; }); tableApp.directive('myDisabled', function($compile) { return { restrict: 'A', replace: true, scope: { myDisabled: '=' }, link: function(scope, element, attrs) { var test = scope.$eval(attrs.myDisabled); console.log(test); scope.$watch(attrs.myDisabled, function (test) { if (test) { element.attr(); } else { element.attr('disabled', 'false'); } }); $compile(attrs); } }; }); tableApp.controller('TableCtrl', function ($scope, $http) { $scope.page = 1; $scope.getCr = function getCr(later) { var url = '/cms/copyright/find'; var request = $http({ method: 'get', url: url, params: { page_length: 25, start: ($scope.page - 1) * 25, s: '' } }); request.then(function (data) { if (data.data.result == 'OK') { console.log(data.data); $scope.copyright = data.data; if (later != undefined) { later(); } } }); }; $scope.nextpage = function nextpage() { $scope.page += 1; $scope.getCr(); }; $scope.onepage = function onepage() { $scope.page =…
has comment: http://stackoverflow.com/comment/41559448
has comment: http://stackoverflow.com/comment/41559069
has answer: http://stackoverflow.com/a/26460220

http://stackoverflow.com/a/26511173
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41652831
has comment: http://stackoverflow.com/comment/41704781
score: 1
accepted answer of: http://stackoverflow.com/q/26510945
type: AcceptedAnswer
downvote count: 0
has body: You certainly can use toggle() while hiding the other ones. Try something like this: $(".title").click(function() { $('.post').not($(this).parent()).hide(); $(this).toggle(); $('html, body').animate({scrollLeft: $(this).parent().offset().left},500); }); Update: changed .not(this) to .not($(this).parent()) as .title is always child of .post.
answers question: http://stackoverflow.com/q/26510945

http://stackoverflow.com/q/26493747
has answer: http://stackoverflow.com/a/26493880
downvote count: 0
has comment: http://stackoverflow.com/comment/41621161
type: UnansweredQuestion
tagged with: each
has title: jquery each | increment variable not working
score: 1
tagged with: post
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I have a variable ( object ) which contain several values. For each of those values I execute an AJAX with "post" and "done" method as followed. Could you please help me to understand why the variable "counter" is well incremented in the loop ( first console.log show, 1, 2, 3 ,4, ....). But when the loop ends, the second "console.log" show "counter" at 0 ? Did I missed something ? $('.confirm_suppression').on('click',function(){ var counter = '0'; $.each(row_to_delete, function(data){ $.post( "/mysql/function_manager.php", { 'type_request' : 'remove_user_from_host', 'user_id' : iduser, 'host_id' : row_to_delete[data].id }, "json" ).done(function(data) { var array = JSON.parse(data); if(array.status == 'OK'){ ++counter; console.log('value counter in loop : ' + counter); $('#dialogboxhead').val('in progress'); }; if(array.status == 'KO'){ alert(array.msg); }; }); }); console.log('value counter : ' + counter); }); ` Thank you.

http://stackoverflow.com/q/26458083
has body: I'm trying to use Mustache.js but while my table is being created is not applying the Boostrap class properly. Only the header gets the css. I tried applying the class with jquery after the button click but did not help. I also try embedding the template inside the table but id did not work. I have this html. FY COST then my template my Ajax code. $('#cmdSubmit').on('click', function () { event.preventDefault(); var PriceTemplate = $('#priceTemplate').html(); $priceTable = $('#mTable'); $.ajax({ type: "GET", url: "mywebservice.asmx/GetData", contentType: "application/json; charset=utf-8", datatype: "json", success: function (msg) { var pricedata = eval(msg.d); $.each(pricedata, function (i, price) { $priceTable.append(Mustache.render(PriceTemplate, price)); }); } }); }); my table is showing data but is looks like the template is not getting stylized by bootstrap. TIA,
type: Question
tagged with: javascript
has title: Table not rendering properly with Mustache.js and Boostrap
has comment: http://stackoverflow.com/comment/41556764
score: 0
has comment: http://stackoverflow.com/comment/41567853
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: mustache
answer count: 0
tagged with: twitter-bootstrap

http://stackoverflow.com/a/26455689
type: Answer
answers question: http://stackoverflow.com/q/26455622
has comment: http://stackoverflow.com/comment/41553288
has body: You shouldn't modify the DOM manually like you do when using jQuery. You can create a directive that wraps draggable functionally and takes as an argument the selected value, let's say your directive is &lt;my-draggable value="value"&gt;&lt;/my-draggable&gt; Now all you have to do is to use ng-if or ng-show and define in which cases this element appears. please note that in case your "directive" uses an isolated scope, you'll have to wrap the the directive in another element and put ng-if on it.
score: 0

http://stackoverflow.com/comment/41498889
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26426863
score: 0
has text: Can you provide a jsfiddle?

http://stackoverflow.com/comment/41469271
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26410553
has text: Have you tried looking at the js console? Ctrl shift j in chrome. If you're js isn't working there will most likely be an error in the console explaining why
score: 0

http://stackoverflow.com/comment/41527647
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26441586
has text: Actually I had the `var params = "{'message':'" + message + "'}";` set to `var params = "{'message':'" + msg + "'}";` It works now but only sends the `message` and not the number.. It's a start anyway :)

http://stackoverflow.com/comment/41503889
type: QuestionComment
comment on: http://stackoverflow.com/q/26429486
has text: Can you change the HTML? is the value always in an ``? If so, always preceded with `/` ?
type: Comment
score: 1

http://stackoverflow.com/comment/41635203
type: QuestionComment
comment on: http://stackoverflow.com/q/26501566
has text: Already one running server side and the other is from the browser, interests me is from the side of the control structure, which is if, for, while and others
score: 1
type: Comment

http://stackoverflow.com/q/26404887
has comment: http://stackoverflow.com/comment/41459725
tagged with: javascript
answer count: 1
type: UnansweredQuestion
has title: Populating dropdownlist values based on another dropdown using javascript
has body: I'm doing this on the jsp page of another application. I need to populate values on combobox based on another combo box. I've seen several posts explaining this but can't make it to work for myself. Here's what I tried. &lt;script type="text/javascript"&gt; function customChangefunction(){ var target = window.document.getElementsByName("resultCombo"); var src = window.document.getElementById("sampleCombo"); var strUser = src.options[src.selectedIndex].value; alert(strUser); var colours = new Array('Black', 'White', 'Blue'); var shapes = new Array('Square', 'Circle', 'Triangle'); var names = new Array('John', 'David', 'Sarah'); switch (strUser) { case 'one': target.options.length = 0; for (i = 0; i &lt; colours.length; i++) { createOption(target, colours[i], colours[i]); } break; case 'two': target.options.length = 0; for (i = 0; i &lt; shapes.length; i++) { createOption(target, shapes[i], shapes[i]); } break; case 'three': target.options.length = 0; for (i = 0; i &lt; names.length; i++) { createOption(target, names[i], names[i]); } break; default: target.options.length = 0; break; } } function createOption(ddl, text, value) { var opt = document.createElement("OPTION"); opt.value = value; opt.text = text; ddl.options.add(opt); opt.appendChild(text); document.getElementById(ddl).appendChild(opt); } The above code is not working.I have to do this without using jquery. My actual requirement is if Combo1 is India then Combo2 should show Chennai,Delhi,Mumbai if Combo1 is USA then Combo2 should show New York,CA,etc.. I have one more question. Suppose that Combo2 is already having some values does this replace those with these values.I would like to do this way Please comment on this before you mark this question as duplicate or closing it.
score: 0
has answer: http://stackoverflow.com/a/26405001
has comment: http://stackoverflow.com/comment/41459554
type: Question

http://stackoverflow.com/a/26487936
answers question: http://stackoverflow.com/q/26487765
has comment: http://stackoverflow.com/comment/41611101
upvote count: 2
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/41610470
type: Answer

http://stackoverflow.com/comment/41752872
type: Comment
comment on: http://stackoverflow.com/a/26446504
type: AnswerComment
has text: One more thing... why is options.index wrong? Wouldn't you use that since you're working with an object?
score: 0

http://stackoverflow.com/comment/41443732
type: Comment
comment on: http://stackoverflow.com/q/26395257
has text: FWIW, the error is not reported if not in strict mode.
score: 1
type: QuestionComment

http://stackoverflow.com/a/26384745
type: Answer
answers question: http://stackoverflow.com/q/26384539
upvote count: 1
has comment: http://stackoverflow.com/comment/41424794
accepted answer of: http://stackoverflow.com/q/26384539
score: 1
has body: I believe you need to add the URL to your addMarker function like so: function addMarker(location, name, active, markerUrl) { //var page = loc[i]; var marker = new google.maps.Marker({ position: location, map: map, title: name, status: active, icon: '/Images/property1.png', url: markerUrl }); // } window.google.maps.event.addListener(marker, 'click', function() { window.location.href = marker.url; }); } Currently you hard-coded '/' as your URL which would take you to your home page.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41653603
has text: It's unclear to me what you are trying to do. I also don't see any JSON. `data` is a JavaScript object, not JSON. If you want the separate the data from the code, then simply store the data in its own file.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26511705

http://stackoverflow.com/a/26459183
accepted answer of: http://stackoverflow.com/q/26459083
type: AcceptedAnswer
upvote count: 6
type: Answer
downvote count: 0
score: 6
has body: Yes, it is because of 1.3.0. The change log describes the breaking change as: $controller will no longer look for controllers on window. The old behavior of looking on window for controllers was originally intended for use in examples, demos, and toy apps. We found that allowing global controller functions encouraged poor practices, so we resolved to disable this behavior by default. The change log goes on to explain that you can re-enable the "global" function approach with: Although it's not recommended, you can re-enable the old behavior like this: angular.module('myModule').config(['$controllerProvider', function($controllerProvider) { // this option might be handy for migrating old apps, but please don't use it // in new ones! $controllerProvider.allowGlobals(); }]);
answers question: http://stackoverflow.com/q/26459083

http://stackoverflow.com/comment/41487175
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26407721
has text: I've tested it locally and it works fine.But I also tested on Xampp and it's the same issue like on Node -> SCRIPT5022: DOM Exception: INDEX_SIZE_ERR (1)
type: AnswerComment

http://stackoverflow.com/q/26451634
has comment: http://stackoverflow.com/comment/50057344
accepted answer: http://stackoverflow.com/a/31107617
tagged with: javascript
has comment: http://stackoverflow.com/comment/44935975
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41546026
tagged with: gulp
score: 24
favorite count: 0
has comment: http://stackoverflow.com/comment/50165674
has comment: http://stackoverflow.com/comment/46583694
type: Question
has comment: http://stackoverflow.com/comment/42367899
has body: I tried to create a gulpfile.js for my personal website project. I've never done this before but with a little 'trial and error' it now works in an acceptable way. The only thing that doesn't work even after 1000 modifications is simple copying files and folders. var files = { data_src : [ './files.json', 'data/**/*.*' ], distribution_dest : '_distribution' }; gulp.task('copy-data', function() { gulp.src(files.data_src, { base: './' }) .pipe(gulp.dest(files.distribution_dest)) .pipe(notify({message: 'Data copied for distribution!'})); }); This should copy all sub-folders and files to the gulp.dest. But it copies only half of them, some folders will be ignored even if I change their names etc. (no special characters, same subfolder structure as the once that got copied correctly ...) - nothing worked. I just can't see any pattern in this. There is no error message while running gulp. Nothing that would help me find the error. Why are some folders or files excluded from copying? I use base to keep the folder / sub-folder structure; tried with and without 'base' -> no effects on the copying process. I also changed the position of the 'copy-data' task in the run-list. Actually it's the first task to run. There seems to be no change in behavior no matter if it's the first or the last one. gulp.task('default', function() { gulp.run('copy-data', 'custom-sass', 'framework-sass', 'custom-js', 'framework-js', 'replace-tags', 'browser-sync'); ... some watches ... }); The structure of the data folder looks like these: ./data |-doc |---content |---template |-img |---chart |---icon |---logo |---pattern |---people |---photo |---symbol |-----brandklassen |-----brandschutzzeichen |-----gebotszeichen |-----gefahrensymbole |-----rettungszeichen |-----verbotszeichen |-----verkehrsrechtzeichen |-----warnzeichen |---wallpaper /data/doc and all subfolders are ok. /data/img/chart to /data/img/people are also ok. Within /data/img/photo only 14 out of 21 images are copied. /data/img/symbol w…
has answer: http://stackoverflow.com/a/31107617
has comment: http://stackoverflow.com/comment/43192255
has comment: http://stackoverflow.com/comment/41544572
has title: Gulp doesn't copy all files as expected
answer count: 1
upvote count: 24

http://stackoverflow.com/a/26513245
type: AcceptedAnswer
type: Answer
has body: You can do a for loop: var pages = result['InboundPostRequest']['FaxControl']['PageContentControl']['Pages']['Page']; for(var i in pages){ var pageNum = pages[i]['PageNumber']; var imageData= pages[i]['PageContents']; //Do database insert }
score: 0
accepted answer of: http://stackoverflow.com/q/26513119
has comment: http://stackoverflow.com/comment/41658067
answers question: http://stackoverflow.com/q/26513119

youtube-javascript-api
type: Tag
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/26430394

http://stackoverflow.com/comment/41583980
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26473119
type: Comment
has text: @Twisted89 That's probably because you're trying to write an object (json_decode() returns objects by default) to a file. Which format would you like it to be saved in?

http://stackoverflow.com/q/26410653
accepted answer: http://stackoverflow.com/a/26410722
answer count: 4
type: AnsweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26410742
has body: I can get the width of my object svg in javascript and save the value in a variable. this is my object &lt;rect id="cercle1" x="5" y="25" width="50" height="50" stroke-width="1" stroke="#0E0E0E" style="fill:red; stroke:black; stroke-width:2"; /&gt; I try this: document.getElementById('cercle1').width.value; thanks for help
upvote count: 5
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/57124551
has answer: http://stackoverflow.com/a/26410722
has comment: http://stackoverflow.com/comment/41474623
has title: Get width or height svg rectangle javascript
has answer: http://stackoverflow.com/a/26410836
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
possible better answer: http://stackoverflow.com/a/26410836

http://stackoverflow.com/q/26499785
has title: Titanium sqlite table database
tagged with: titanium-mobile
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26500018
accepted answer: http://stackoverflow.com/a/26500018
type: Question
tagged with: ios
answer count: 1
tagged with: javascript
score: 0
tagged with: sqlite
tagged with: titanium
has body: So i am trying to create a database for my titanium application, i have done the sql file but when ever i try and run it with the code i have it simply doesn't work, can anyone point me in the direction of a good tutorial for this type of thing. Im trying to create the database that has a tableview and once clicking on a tableView list item it goes to its child list and once clicking on one of those list items it will add it to the "List" which will be saved and able to be viewed in a different screen.

after-save
tags question: http://stackoverflow.com/q/26387969
tag name: after-save
type: Tag

http://stackoverflow.com/comment/41457444
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26404035
has text: friends i need to upload a image file so how can that be possible with serialize

http://stackoverflow.com/q/26450090
has comment: http://stackoverflow.com/comment/41541848
type: Question
has comment: http://stackoverflow.com/comment/41543613
has title: how to rotate image image 3d in jquery on swipe up and swipe down
has body: I have to rotate my image in 3d as shown in below image .There is blue line .I need to rotate my image in this direction when swipe up and down .please ignore green green line is there any way when I swipe up or swipe down it spin / rotate some angle .. here is my fiddle http://jsfiddle.net/wemsbtwj/2/ function scrolling() { $("img").css({ 'transform': 'rotate(' + ($("main").scrollTop() / mainHeight * 360) + 'deg)' }); } var mainHeight = $("main").height(); window.addEventListener("scroll", scrolling, false);
score: 0
answer count: 0
has comment: http://stackoverflow.com/comment/41545258
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41542147
has comment: http://stackoverflow.com/comment/41542095

http://stackoverflow.com/q/26464350
type: Question
type: AnsweredQuestion
score: 1
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/26632767
answer count: 2
tagged with: validation
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have created a step by step wizard using knockout and the template bind and now I want to force the user to complete each page before going to next, and by completing I mean Knockout validate must be valid. The next-button is enabled when there is no error on the viewmodel and it works fine when stepping through the wizard but the problem occurs when you go into one step and press previous. The errors kept "alive" even when you go back, so the next-button on page 1 are disabled because page 2 are invalid. I've setup a fiddle: http://jsfiddle.net/1uo8rtw2/1/ Write something in the name box Press next Press previous Now you see the Next-button is disabled. Is suppose the problem is in the code below: self.errors = ko.validation.group(self.viewModel); self.PrevIsEnabled = ko.observable(false); self.NextIsEnabled = ko.computed(function() { return self.errors().length == 0 &amp;&amp; self.SelectedTemplate() != "Age"; }); Is there any way one can reset error-count when going back and force knockout validation to re-validate the current template?
has answer: http://stackoverflow.com/a/26632767
has title: Reset errors in Knockout validation in step-by-step wizard
possible better answer: http://stackoverflow.com/a/26465231
has answer: http://stackoverflow.com/a/26465231
upvote count: 1

http://stackoverflow.com/comment/41431799
has text: Given `["87b8", "6156", "d000", "0a42", "5e02"]`, is the `b8` in `["b8"], ["ff"]` allowable? Or does is it only invalidated if it's the *first 2* characters in the corresponding sequence (e.g., `["87"], ["ff"]`)?
comment on: http://stackoverflow.com/a/26388154
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41372396
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26354855
has text: it is playnig only first video? i need tp play them all on active state
type: AnswerComment

http://stackoverflow.com/comment/41503914
type: AnswerComment
comment on: http://stackoverflow.com/a/26428959
type: Comment
has text: I understand the want for me to write your code, but unfortunately, StackOverflow isn't the place for that. Give it a try based on this information, and if you get hung up on any particular spot, post another question.
score: 0

http://stackoverflow.com/a/26503230
type: Answer
has comment: http://stackoverflow.com/comment/41638497
has comment: http://stackoverflow.com/comment/41638356
answers question: http://stackoverflow.com/q/26502406
has comment: http://stackoverflow.com/comment/41638512
upvote count: 1
has comment: http://stackoverflow.com/comment/41638687
has comment: http://stackoverflow.com/comment/41638755
downvote count: 0
has body: As I said in my comment, I would make everything public and prefix "private" property names with an underscore. This is how I would restructure your code: function defclass(prototype) { var constructor = prototype.constructor; constructor.prototype = prototype; return constructor; } var Something = defclass({ constructor: function () { this._someVariable = 1; }, _someFunction: function () { alert("someFunction"); }, someDelegate1: function (f) { f.apply(this); }, someDelegate2: function (f) { f.call(this, this._someVariable, this._someFunction); } }); var someInstance = new Something; someInstance.someDelegate1(function () { this._someFunction(); alert(this._someVariable); }); someInstance.someDelegate2(function (someVariable, someFunction) { someFunction(); alert(someVariable); }); However that's just my opinion. I don't really see the point of having private variables. Even if somebody messes with your private variables, it's their problem and not yours. It'll break their code and not yours.
score: 1
has comment: http://stackoverflow.com/comment/41638613
has comment: http://stackoverflow.com/comment/41638216
has comment: http://stackoverflow.com/comment/41638625

http://stackoverflow.com/comment/41578488
type: QuestionComment
has text: Thanks Max but it returns "undefined is not a function"
comment on: http://stackoverflow.com/q/26445660
score: 0
type: Comment

http://stackoverflow.com/comment/41509708
type: AnswerComment
type: Comment
has text: I think it's probably because the counter stops before reaching `0`.
score: 1
comment on: http://stackoverflow.com/a/26432403

http://stackoverflow.com/q/26512326
has body: I have multiple charts (Trellis model) using HighCharts which share the same Y axis (i.e category axis).. but when I try to export the chart, the X axis(Series) is not coming exactly as I see on the screen. Please take a look at this JSFiddle sample and let me know. Your help is appreciated. I would like the exported output to match what is on the screen. But this is not coming in export. Even the title in the exported file is not matching the ones on the screen. If I save the individual chart as an SVG file, I see all the values in X axis, i.e 0M, 1M, 2M..etc, but when I look in the UI for all the 3 charts combined, it is smartly displaying the values a 2.5M, 5M, 7.5M etc. What should I do to make this happen?i.e to export to match the UI. JSFiddle File for the issue --
tagged with: highcharts
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26532144
has title: Multiple chart export in HighChart is not same as the one displayed on the screen
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: AnsweredQuestion
tagged with: charts
has answer: http://stackoverflow.com/a/26532144
type: Question

http://stackoverflow.com/q/26489405
tagged with: javascript
has title: iOs 8.x Safari sometimes does not render circle with background-color
score: 0
has comment: http://stackoverflow.com/comment/41613048
has body: I am using the newest iOs Safari 8.x. Sometimes the browser does not render some circles with a background-color. This occurs only in iOs Safari 8.x. All other browsers (including desktop versions) can render those circles perfectly. The CSS to visualize the circles is generated by using SASS. I analyzed the problem with Safari Develop, but i didn't found anything useful. Does anyone have an idea? Thanks! EDIT: The SASS code to visualize those circles (Custom radio buttons) .emn-scale-radio { @include border-radius(50%); width: $psktScaleRadioWidth; height: $psktScaleRadioHeight; display: inline-block; position: relative; margin: $psktScaleRadioMarginFull; &amp;:last-child { margin: $psktScaleRadioMarginLast; } input[type='radio'], [class^="icon-"] { display: none; } @for $i from 0 to length($psktScaleColorCollection) { &amp;.emn-scale-radio:nth-child(#{$i+1}) { background-color: nth($psktScaleColorCollection, $i+1); } &amp;.emn-scale-radio-checked:nth-child(#{$i+1}) { border: $psktScaleRadioCheckedBorder; background-color: $white; [class^="icon-"] { color: $mediumBlue01; display: inline-block; position: $psktScaleRadioCheckedIconPosition; right: $psktScaleRadioCheckedIconPositionRight; min-width: $psktScaleRadioCheckedIconMinWidth; } } } }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41643050
tagged with: css
tagged with: safari
answer count: 0
type: Question
tagged with: ios8
linked to: http://stackoverflow.com/q/26032513

http://stackoverflow.com/comment/41380430
type: AnswerComment
comment on: http://stackoverflow.com/a/26361130
score: 0
has text: means I decode code and after that create one loop for table and place my values in it. right ?
type: Comment

http://stackoverflow.com/comment/41503195
type: Comment
has text: It's a bit problematic, it's a part of the code that retrieves data from an online service which I don't want to expose it's credentials..
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26428506

http://stackoverflow.com/comment/41416972
comment on: http://stackoverflow.com/a/26379529
type: AnswerComment
has text: You don't put the _code removed from the div summary_ anywhere - it does not work! The (does not work) `if` statement rendered _extra html elements are added etc._ based on the selected value. That what the controller code needs to do. Render a partial view based on the value of the selected item you pass to the method.
score: 0
type: Comment

http://stackoverflow.com/comment/41379553
score: 0
comment on: http://stackoverflow.com/a/26360840
type: AnswerComment
type: Comment
has text: Interesting, on keypress doesn't take into account shift+ arrow up, arrow down etc (I'd have thought it would block it)? This may well be the perfect solution

http://stackoverflow.com/a/26398809
answers question: http://stackoverflow.com/q/26398534
has body: One solution would be to try and serialize all the inputs and save them to the database. You just send them by submitting the form then in PHP do something like: $inputs = serialize($_GET); // $inputs = serialize($_POST); mysql_query('INSERT INTO `table` SET inputs = "'.$inputs.'"'); // try to validate the variable before This would be nice given the fact that you have variable number of fields. When you select them use deserialize to recreate the data: $r = mysql_query('SELECT inputs FROM `table`'); ... $data = deserialize($row['inputs']); Another option would be to get all the inputs with JavaScript or jQuery and pass them via AJAX. var _data = []; $('input.text-field').each(function(i, e) { _data.push($(e).val()); }); $.post('file.php', { d : JSON.stringify(_data)}, function(e){ alert(e); }) PHP: $d = json_decode($_POST['d']); foreach($d as $k =&gt; $v) { // value of the input no. $k is $v } You can use @Nickunj's jQuery code for appending the new input.
has comment: http://stackoverflow.com/comment/41448371
score: 0
type: Answer

http://stackoverflow.com/q/26469209
downvote count: 0
has title: Adding multiple filtering to a Kendo Grid via checkboxes
has answer: http://stackoverflow.com/a/26469799
accepted answer: http://stackoverflow.com/a/26469799
type: Question
score: 3
tagged with: kendo-grid
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: kendo-ui
upvote count: 3
has body: I have a Kendo Grid for records that have four status types: "scheduled", "open", "on execution" and "closed". I am trying to use the checkboxes as filters so I can show only the statuses I need. I know how to set one single filter, for example, list only the "scheduled" records, or the "closed" ones. But I want to show the "scheduled" and "open" records, for example, and I haven't figured out how. What I have right now works for a single status type. Here's some code: $('input[type="checkbox"]').on('change', function () { var grid = $("#grid").data("kendoGrid"); var ck_scheduled = $('#ck_scheduled').prop('checked'); var ck_open = $('#ck_open').prop('checked'); var ck_onexecution = $('#ck_onExecution').prop('checked'); var ck_closed = $('#ck_closed').prop('checked'); var allFilters = []; if (ck_scheduled) { allFilters.push({ logic: "or", field: "Status", operator: "eq", value: "Scheduled" }); } if (ck_open) { allFilters.push({ logic: "or", field: "Status", operator: "eq", value: "Open" }); } if (ck_onexecution) { allFilters.push({ logic: "or", field: "Status", operator: "eq", value: "On execution" }); } if (ck_closed) { allFilters.push({ logic: "or", field: "Status", operator: "eq", value: "Closed" }); } grid.dataSource.filter(allFilters); }); What I'm trying to do with this function here is: when one of the checkboxes change, it will check the 4 checkboxes state and add a filter (using the "or" logical operator) for the checked ones. In the end, apply all the filters. But what is happening: it only applies one filter. For example, when I check the "closed" checkbox, it shows only "closed" records, ignoring the other checked checkboxes.
has comment: http://stackoverflow.com/comment/41577117
type: AnsweredQuestion

http://stackoverflow.com/comment/41641319
has text: It will be removed on link mouseout. Do you want it to remove on div mouseout itself?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26505112
type: Comment

http://stackoverflow.com/comment/41596810
type: QuestionComment
has text: Thxs @Raptor, So you mean it should be test& debug in a real prod environments instead?
comment on: http://stackoverflow.com/q/26479353
score: 0
type: Comment

http://stackoverflow.com/comment/41540037
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26448848
has text: @Nakedible - good point on the garbage collection - that is likely true. A comment in your code as to why you're removing the event listener would be smart because someone like me can easily come along later and think those lines can be removed because promises are immutable once fullfilled so they are immune from multiple calls to `reject()` or `resolve()`.

http://stackoverflow.com/comment/41522622
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26439258
has text: you should do a web search to find out `how tabindex works` before asking here
score: 0

http://stackoverflow.com/q/26470589
type: UnansweredQuestion
type: Question
has title: How to parse/extract recipients from a bunch of .eml files?
has answer: http://stackoverflow.com/a/28889763
has body: I have a lot of .eml files that I need the recipient from, and instead of opening one by one and copying, I want to do this more automatically. I want to do it similar to what this article explains, but the output doesn't have to be in CSV - can be plain text. Not necessarily using Python or javascript.
tagged with: python
has comment: http://stackoverflow.com/comment/46040439
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41579339
tagged with: javascript

http://stackoverflow.com/a/26535984
answers question: http://stackoverflow.com/q/26491061
has body: The race condition and the xmlhttp being global are the problems here. What ever came last is overwriting the data written in the divs. Solve it by making xmlhttp variable local as per suggestions and tagging the response body. function loadXMLDoc(xmlhttp,url,cfunc) { xmlhttp.onreadystatechange=cfunc; xmlhttp.open("GET",url,true); xmlhttp.send(); } function getAlerts() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } loadXMLDoc(xmlhttp,"alerts.php?update=variable",function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200 &amp;&amp; xmlhttp.responseText.indexOf("unique key") != -1) { //change div which matches unique key } }); } Credit: @Mike Brant and @Cunning Before people like me want to continue and use more ajax calls check out how browsers handle and process multiple ajax calls: How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers? http://sgdev-blog.blogspot.com/2014/01/maximum-concurrent-connection-to-same.html
score: 0
type: Answer

http://stackoverflow.com/comment/41390993
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26366553
has text: You want to fade it out when it starts scrolling down (irrespective of how many pixels it scrolls down) and fade in when it starts scrolling up (irrespective of how many pixels it scrolls up)?
score: 0

http://stackoverflow.com/comment/41569354
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26465494
type: QuestionComment
has text: @lolka_bolka I want to display $name

http://stackoverflow.com/comment/41405478
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26374556
has text: @Phil Sounds like it's part of a class assignment which explains the convoluted authentication handshake mechanism.
score: 0

http://stackoverflow.com/comment/41477975
comment on: http://stackoverflow.com/q/26390847
has text: Thanks, that was half my problem. My other half was having to update all of the trace attributes after every step. Somehow, this wasn't a problem in my first implementation, so I'm a little puzzled.
score: 0
type: QuestionComment
type: Comment

twitter
tags question: http://stackoverflow.com/q/26474826
type: Tag
tags question: http://stackoverflow.com/q/26499538
tag name: twitter
tags question: http://stackoverflow.com/q/26458204
tags question: http://stackoverflow.com/q/26446776

http://stackoverflow.com/q/26454079
type: Question
has comment: http://stackoverflow.com/comment/41549166
has comment: http://stackoverflow.com/comment/41549167
linked to: http://stackoverflow.com/q/7686827
has body: I decided to try using jQuery for once because it was already included in the page. I found out that it has very convenient $.ajax method that allows you to produce readable Ajax calls. I learned how to add custom headers to the call, since I need to authorize at Imgur. This is my code: $.ajax({ url: 'https://api.imgur.com/3/image', type: 'POST', headers: { Authorization: 'Client-ID ' + APP_ID, Accept: 'application/json' }, data: { image: SavePage.getimgrc(), type: 'base64' }, success: function(result) { var id = result.data.id; window.location = 'https://imgur.com/gallery/' + id; } }); Well, no matter how convenient it is, it does not work as advertised: POST /3/image HTTP/1.1 Host: api.imgur.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 20956 Origin: resource://jid0-gxjllfbcoax0lcltedfrekqdqpi-at-jetpack Connection: keep-alive Pragma: no-cache Cache-Control: no-cache So, is it broken or did I screw it up?
linked to: http://stackoverflow.com/q/5750696
linked to: http://stackoverflow.com/q/4348478
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/26454340
has comment: http://stackoverflow.com/comment/41549499
has comment: http://stackoverflow.com/comment/41549251
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26454340
has title: Can't set custom headers in $.ajax

http://stackoverflow.com/q/26489829
has answer: http://stackoverflow.com/a/26489891
type: Question
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/41613701
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41613650
has comment: http://stackoverflow.com/comment/41613709
has comment: http://stackoverflow.com/comment/41613905
has comment: http://stackoverflow.com/comment/41613700
favorite count: 0
has body: I have created two simple pages as a test. The first, PIG_TEST.htm, outputs a simple page containing 3 sections; Header, Menu and Main. The Menu section contains a link which, when selected should load the second page, PIG_TEST_1-php, into the with the id of 'mainx', on the main page via a jquery click function. However, when selected it just replaces the original page. Seems like it is not finding or seeing the "mainx" div. Header TEST PAGE Menu TEST PAGE Item 1 Main TEST PAGE The PIG_TEST_1.php is: <?php echo " "; echo " THIS IS A DUMMY PAGE "; echo " "; ?> I've tried putting the call to "jquery-1.8.0.min.js" just after the but it stll fails. Sorry, I'm new to jquery, any help would be appreciated.
has answer: http://stackoverflow.com/a/26489906
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41613812
has title: Dynamically changing using jquery fails
score: -2

http://stackoverflow.com/comment/41577909
has text: Are you asking us to debug your complex application?
score: 0
comment on: http://stackoverflow.com/q/26468023
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26413076
has body: I am trying to load a controller based on a stateparam to make it reusable .state("dashboard.item.detail", { url: "/detailId/:detailId/detailName/:detailName", views: { 'main@': { templateUrl: function ($stateParams){ //move this to a util function later var tempName = unescape($stateParams.detailName); tempName = tempName.replace(/\s/g, "-"); return '../partials/slides/' + tempName + '.html'; }, resolve: { DetailData: ['DetailService', function(DetailService){ return DetailService.getDetails(); }] }, controller: function ($stateParams) { console.log( $stateParams.detailName + 'Ctrl'); return $stateParams.detailName + 'Ctrl'; } } } }) Controller .controller('NemtCtrl', ['$scope', '$rootScope', 'DetailData', function ($scope, $rootScope, detailData) { console.log(detailData); }]); The controller will work if I remove the function and just use (console will log detailData) controller: 'NemtCtrl' But won't work if I do: controller: function ($stateParams) { return 'NemtCtrl'; } What am I doing wrong here? Is there a better way to do this?
tagged with: javascript
has answer: http://stackoverflow.com/a/26413495
answer count: 1
has title: Load Controller based on state params using Angular ui-router
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: controllers
accepted answer: http://stackoverflow.com/a/26413495
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
tagged with: angular-ui-router

http://stackoverflow.com/comment/41562659
has text: Aside from displaying the decade to console, you are not doing anything useful with it (like using it to group entries as requested).
type: Comment
comment on: http://stackoverflow.com/a/26461866
score: 0
type: AnswerComment

http://stackoverflow.com/a/26503805
downvote count: 0
answers question: http://stackoverflow.com/q/26503721
type: Answer
upvote count: 1
has body: What is e? Are you sure the click event isn't actually working, but just giving you a script error and bailing out before it does anything? Your callback function does not define the passed in event parameter e. $('body').on('click', '#stats-link', function() { // &lt;-- No e parameter supplied. e.preventDefault(); // &lt;---- What is e? ... }
has comment: http://stackoverflow.com/comment/41639161
score: 1

http://stackoverflow.com/a/26410111
upvote count: 1
answers question: http://stackoverflow.com/q/26410038
type: AcceptedAnswer
has body: Give it an id and then use that: In JavaScript: document.getElementById( "MyWebView" ).insertCSS( myDetails, myCallback ); Warning: The javascript code must be called after the webview has been created, so in window.onload or in a script tag in the HTML code after the webview tag Edit: The insertCSS function allows adding a CSS file or CSS code: https://developer.chrome.com/apps/tags/webview#type-InjectDetails
has comment: http://stackoverflow.com/comment/41468487
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26410038
has comment: http://stackoverflow.com/comment/41468453

http://stackoverflow.com/q/26453943
has comment: http://stackoverflow.com/comment/41548953
has answer: http://stackoverflow.com/a/26454140
score: 0
accepted answer: http://stackoverflow.com/a/26454140
has comment: http://stackoverflow.com/comment/41548638
answer count: 1
has comment: http://stackoverflow.com/comment/41548759
has body: I've created this clock, that should pause while SPACE is being hold. But my Js skills is extremely bad, so I got kinda lost. The clock is 1 to 5 clock. Which means every second that passes, 5 seconds passes in the clock. var clock = new Clock("clock"); clock.start(); function Clock(id) { var clock = this; var timeout; var time; this.hours = 7; this.minutes = 10; this.seconds = 0; this.stop = stop; this.start = start; var isStarted = true; function Click () { if (isStarted) { stop(); } else { start(); } } var element = document.getElementById(id); function stop() { clearTimeout(timeout); } function start() { timeout = setTimeout(tick, 0); time = Date.now(); } function tick() { time += 1000; timeout = setTimeout(tick, time - Date.now()); display(); update(); } function display() { var hours = clock.hours; var minutes = clock.minutes; var seconds = clock.seconds; hours = hours &lt; 10 ? "0" + hours : "" + hours; minutes = minutes &lt; 10 ? "0" + minutes : "" + minutes; seconds = seconds &lt; 10 ? "0" + seconds : "" + seconds; element.innerHTML = hours + ":" + minutes + ":" + seconds; } function update() { var seconds = clock.seconds += 5; if (seconds === 60) { clock.seconds = 0; var minutes = ++clock.minutes; if (minutes === 60) { clock.minutes = 0; var hours = ++clock.hours; if (hours === 24) clock.hours = 0; } } } }
type: AnsweredQuestion
tagged with: javascript
has title: Make my 1:5 clock stop when Space is being hold
type: Question

http://stackoverflow.com/comment/41650403
type: QuestionComment
comment on: http://stackoverflow.com/q/26507447
score: 0
has text: Made a sample page to highlight the problem here: http://178.62.184.125/sample/Sample.html The player is already fullscreen. The problem is visible in the values in top right corner. Check how window width changes if you zoom in or out.
type: Comment

http://stackoverflow.com/comment/41474766
type: Comment
comment on: http://stackoverflow.com/a/26412991
score: 0
type: AnswerComment
has text: The reason you suggest nodejs is because coding will eventually be easier as nodejs is based on js? What are the advantages?

http://stackoverflow.com/a/26422909
has body: It looks to me to be "trying to be too clever" and, in doing so, you've introduced several new potential points of failures (in the regex syntax), and made the code less expressive/idiomatic. You'd also struggle if your operands were to go from being 'cat' to being dynamic or variable in some way. Typically, in doing things like this, I only go so far as introducing an array: if (['cat', 'dog', 'horse'].indexOf(animal) != -1) { ... } Honestly, though, this is all laughably subjective so there is no "right" answer I can give you. Usually at this point I'd introduce performance concerns, but you may actually have a faster solution here due to the need to scan the input only once. That would depend upon how quickly the regex itself can be parsed.
upvote count: 5
has comment: http://stackoverflow.com/comment/41491345
answers question: http://stackoverflow.com/q/26422628
has comment: http://stackoverflow.com/comment/41491465
score: 5
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41491262
has comment: http://stackoverflow.com/comment/41491216
has comment: http://stackoverflow.com/comment/41492044
has comment: http://stackoverflow.com/comment/41491230

http://stackoverflow.com/q/26433884
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41512656
linked to: http://stackoverflow.com/q/2276021
upvote count: 3
type: UnansweredQuestion
score: 3
has body: I'm trying to make a math game in JQuery/JavaScript. I have managed to create a code that comes up with a random X+ X+ =? math question. You have to write an answer in the box and then the code checks if the answer is right or wrong. I want to use the same method but not just +, but -, * and / as well. I tried to change this in the code but it didn't work. Maybe someone can help me? Here is the code: $(function() { getQuestion(); }); var count = 0, results = []; function getQuestion() { count++; var container = $('&lt;div /&gt;'); var val1 = Math.round(Math.random()*5); var val2 = Math.round(Math.random()*5); var lbl = $('&lt;label /&gt;'); lbl.html(val1 + ' + ' + val2 + ' = '); container.append(lbl); var input = $('&lt;input type="text" /&gt;'); container.append(input); var btn = $('&lt;input type="button" value="SVARA" /&gt;'); var val; btn.click(function() { results.push({ number1 : val1, number2 : val2, answer : input.val() }); input.attr('disabled', true); $(this).attr('disabled', true); $(this).after(function() { if(val1 + val2 == input.val()) return 'RÄTT!'; return 'FEL'; }); getQuestion(); }); container.append(btn); $('body').append(container); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
has answer: http://stackoverflow.com/a/26434077
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26434092
has title: Math game JQuery/JavaScript
downvote count: 0
has comment: http://stackoverflow.com/comment/41512635
tagged with: javascript

http://stackoverflow.com/comment/44469395
comment on: http://stackoverflow.com/a/27837070
type: AnswerComment
has text: doesn't seem to work anymore ... I've been having the same problem. When there is a chat between a chrome client and a firefox client, the video coming from firefox is always 4:3 no matter which version I've tried. I'm now on firefox 35 and you're fiddle doesn't work either...
score: 0
type: Comment

http://stackoverflow.com/q/26490025
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
tagged with: unit-testing
has body: I have some lines of code I can't manage to test. All provided API methods are wrappers around $http. API.getAll returns me a basic information about panels and API.getPanel returns full information about each requested panel. So this kind of loop will exist anyway. I'm wondering how can I test those nested requests. This is my draft test which doesn't work: describe('static', function() { describe('method `getAll`', function() { ... beforeEach(function() { $httpBackend.whenPOST(url, getPanelsForCategory) .respond(mockPanelsForCategory); $httpBackend.whenPOST(url, getPanelDetails) .respond(mockPanel); }); it('should work... Please...', function() { $httpBackend.expectPOST(url, getPanelsForCategory); Panel.getAll(1).then(function(panels) { // Here everything falls down. }); $httpBackend.flush(); }); }); }); And this is a source code I want to test: Panel.get = function(id) { return API.getPanel(id).then(function(panel) { return new Panel(panel); }); }; Panel.getAll = function(id) { var handleResponse = function(data) { var promise = $q.all( data.map(function(panelRaw) { var panel = Panel.get(panelRaw.PANEL_ID); return panel; }) ); return promise; }; return API.getPanelsForCategory(id).then(handleResponse); }; Thanks in advance for any help.
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Testing nested $http requests in Angular
has answer: http://stackoverflow.com/a/26490641
tagged with: jasmine

http://stackoverflow.com/q/26461725
linked to: http://stackoverflow.com/q/8160446
score: 0
accepted answer: http://stackoverflow.com/a/26462115
answer count: 1
tagged with: charts
tagged with: javascript
has comment: http://stackoverflow.com/comment/41562557
tagged with: logarithm
has body: I use flot for my charts and I need a logarithmic scale for my Y-Axis. The solution here is almost what I want, except that the Y-Axis has predefined ticks. This leads to charts that use only half or even less the height of the Y-Axis because I always have to define all ticks also for big values in case the chart contains big values. If I don't define the ticks I get dynamic ticks which always fit the biggest values perfectly, but then the y-Axis tick lines are like on logarithmic paper (different distances between them), which I don't want. I want ticks on every power of 10 (10,100,1000,10000 etc) but adapting to the biggest value in the chart, so there is no empty space above the biggest value. Of course I can caluclate the maximum value in the chart by myself and adapt the ticks accordingly, but if there is a flot-solution, I would be happy to use it. Thanks!s
has comment: http://stackoverflow.com/comment/41562506
type: AnsweredQuestion
tagged with: flot
has answer: http://stackoverflow.com/a/26462115
type: Question
has title: Flot logarithmic and dynamic y-axis ticks

http://stackoverflow.com/q/26502320
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/26502386
tagged with: google-chrome
downvote count: 1
type: Question
tagged with: javascript
score: 2
accepted answer: http://stackoverflow.com/a/26502386
answer count: 1
has comment: http://stackoverflow.com/comment/41637534
tagged with: console
favorite count: 0
has comment: http://stackoverflow.com/comment/41636429
has comment: http://stackoverflow.com/comment/41636370
has title: Running commands from chrome console
has comment: http://stackoverflow.com/comment/41636453
has body: I am using chrome console to get data from one site with these 2 commands. window.location.replace(link); document.forms[2].submit(); Is there any way to run theme together in the same line or make a loop ?? Because i want to run in many times
has comment: http://stackoverflow.com/comment/41637171
has comment: http://stackoverflow.com/comment/41637128

http://stackoverflow.com/q/26421603
score: 2
type: AnsweredQuestion
type: Question
answer count: 2
tagged with: canvas
has answer: http://stackoverflow.com/a/28731049
tagged with: xlib
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26422026
accepted answer: http://stackoverflow.com/a/26422026
has title: Canvas to 32bit packed ARGB
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/28731049
has body: I have a html5 canvas element and I'm trying to get an array of ARGB data (32bit packed data, for use with x11/xorg/xlib). I don't know how to do this though. For example this is what the data should look when processed (this here contains a 16x 16 image and a 32x32 image): var 32BitPackedARGB = [16, 16, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 338034905, 3657433343, 0, 184483840, 234881279, 3053453567, 3221225727, 1879048447, 0, 0, 0, 0, 0, 0, 0, 1224737023, 3305111807, 3875537151,0, 0, 2063597823, 1291845887, 0, 67109119, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 50266112, 3422552319, 0, 0, 3070230783, 2063597823, 2986344703, 771752191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3422552319, 0, 0, 3372220671, 1509949695, 704643327, 3355443455, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 0, 3422552319, 0, 134152192, 3187671295, 251658495, 0, 3439329535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3422552319, 0, 0, 2332033279, 1342177535, 167772415, 3338666239, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 4294901760, 0, 3422552319, 0, 0, 436207871, 3322085628, 3456106751, 1375731967, 4278255360, 4026597120, 3758161664, 3489726208, 3204513536, 2952855296, 2684419840, 2399207168, 2130771712, 1845559040, 1593900800, 1308688128, 1040252672, 755040000, 486604544, 234946304, 4278255360, 4043374336, 3774938880, 3506503424, 3221290752, 2952855296, 2667642624, 2399207168, 2130771712, 1862336256, 1627453957, 1359017481, 1073805064, 788591627, 503379721, 218169088, 4278255360, 4043374336, 3758161664, 3506503424, 3221290752, 2952855296, 2684419840, 2415984384, 2130771712, 1862336256, 1577123584, 1308688128, 1040252672, 755040000, 486604544, 218169088, 4278190335, 4026532095, 3758096639, 3489661183, 3221225727, 2952790271, 2667577599, 2415919359, 2130706687, 1862271231, 1593835775, 1325400319, 1056964863, 771752191,…

http://stackoverflow.com/comment/41538910
comment on: http://stackoverflow.com/a/26448567
type: AnswerComment
score: 0
type: Comment
has text: var mainHeight = $("main").height(); what is main here?

http://stackoverflow.com/comment/41571543
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26466876
has text: You might want to ask this question on [Programmers Stack Exchange](http://programmers.stackexchange.com/).

http://stackoverflow.com/comment/41436270
type: Comment
has text: @agim, yea, the reason i posted that was because it most closely matches the OP's original format. if `00` is matched by `0+`, I assumed `01` should work the same in the case.
comment on: http://stackoverflow.com/a/26391481
type: AnswerComment
score: 0

http://stackoverflow.com/q/26424432
type: AnsweredQuestion
tagged with: cordova
type: Question
has comment: http://stackoverflow.com/comment/41494008
accepted answer: http://stackoverflow.com/a/26424629
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26424629
tagged with: ios
tagged with: javascript
tagged with: jquery
has body: I am working on one iPhone app using phonegap. When the user opens the app and goes to the main page, I want to call one function to sync app Database with the Live one. This function should get called only once. i.e. even if the user clicks again on the main page, that function should not get called as it is already called. I want to call this function under onDeviceReady() function. function onDeviceReady() { if(test.called) { return false; }else{ test(); } } function test(){ test.called = true;} I used the above concept but the function gets called again when I click on different page and then if I click on the Main page. i.e because it refreshes the page sets value as false. What event I should use to call the function only once when the app?
has comment: http://stackoverflow.com/comment/41493958
has title: How to create one time event when the app opens?

http://stackoverflow.com/comment/41385107
type: Comment
has text: Why this behavior for months, it's very different from java and c# :(
type: AnswerComment
comment on: http://stackoverflow.com/a/26363762
score: 0

http://stackoverflow.com/q/26474510
type: UnansweredQuestion
has body: We have this project at work where we use Angularjs. Together with AngularJS we are using Leaflet directive, Bootstrap etc. The problem now is that the project is getting relatively large and we are actually selling the product. I have been given the responsibility to manage versions and find out a good way of making sure when we upgrade(for example) AngularJS, that all other components will work. Same with the other modules, if we upgrade bootstrap, how can i make sure that the AngularJS version that we are currently running is compatible? I used to work with Perl before, and i know CPAN has great solutions for this, where it actually upgrades those dependencies that need to be upgraded. Any help and tip would be helpful. Thanks in advance.
tagged with: backwards-compatibility
answer count: 0
has comment: http://stackoverflow.com/comment/41592284
type: Question
tagged with: compatibility
has comment: http://stackoverflow.com/comment/41588654
tagged with: javascript
score: 0
has title: How to make sure Angularjs dependencies are working with 3rd party modules?
tagged with: dependencies
has comment: http://stackoverflow.com/comment/43169320
tagged with: angularjs

http://stackoverflow.com/q/26427473
upvote count: 0
has comment: http://stackoverflow.com/comment/41500335
tagged with: javascript
has answer: http://stackoverflow.com/a/26427512
has answer: http://stackoverflow.com/a/26427589
favorite count: 0
has title: Exclusive selecting list elements
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26427589
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26427512
score: -1
has body: I have myself an unordered list: Stuff 1 Stuff 2 Stuff 3 I want to apply a class to a list item a user selects. Only one item can have that class at a time. What's the best angular-ish way to approach this? There are about a dozen elements or so, so I'd rather not declare a new variable for each item.
type: Question
answer count: 2

http://stackoverflow.com/comment/41386864
score: 0
type: Comment
type: QuestionComment
has text: Access it once it is set, try `scope.$evalAsync`, Did you check my previous comments? I dont know what is S2/Twig but ng-init is really not designed for this purpose.. You cannot initialize it in controller?
comment on: http://stackoverflow.com/q/26364474

http://stackoverflow.com/comment/41616360
type: AnswerComment
comment on: http://stackoverflow.com/a/26490400
type: Comment
has text: I understand now. You are talking about a masking effect. I think I have an idea for that.
score: 0

http://stackoverflow.com/a/26460142
type: Answer
has body: You can add multiple filters to a sap.ui.model.ListBinding: var filters = []; filters.push(new sap.ui.model.Filter("Kunnr", sap.ui.model.FilterOperator.Contains, tpmla)); filters.push(new sap.ui.model.Filter("Name1", sap.ui.model.FilterOperator.Contains, tpmla)); filters.push(new sap.ui.model.Filter("Addr", sap.ui.model.FilterOperator.Contains, tpmla)); this.oList = sap.ui.getCore().byId("po_list"); this.oList.getBinding("items").filter(filters); As far as I remember this will link the different filters with an AND relationship meaning it only matches if tmpla is contained in ALL of the fields. There is no way to make this an OR. The workaround is to just create a search field on your model which contains all values that you might search for as a concatenated string. BR Chris
has comment: http://stackoverflow.com/comment/41559984
downvote count: 0
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26449793
upvote count: 1
has comment: http://stackoverflow.com/comment/41559923
answers question: http://stackoverflow.com/q/26449793

http://stackoverflow.com/comment/46388034
comment on: http://stackoverflow.com/q/26506541
type: Comment
type: QuestionComment
has text: I would probably use an absolutely positioned div for the back ground and then move that div. The reason you are getting high CPU is that the browser is re-rendering the whole background every time, with the div it only has to change the position.
score: 0

http://stackoverflow.com/q/26512584
has comment: http://stackoverflow.com/comment/41659173
tagged with: javascript
has comment: http://stackoverflow.com/comment/41655444
has comment: http://stackoverflow.com/comment/41659231
has answer: http://stackoverflow.com/a/26591312
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41659698
downvote count: 0
has comment: http://stackoverflow.com/comment/41655481
has comment: http://stackoverflow.com/comment/41661985
has comment: http://stackoverflow.com/comment/41655498
has title: AngularJS with jQuery DataTables intermittently working
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41661859
favorite count: 0
has body: I'm adding AngularJS to a project that is heavily dependent on jQuery's datatables plugin. In my angular view, I have the datatables code (which only loads when the view is loaded). Ex: $('#datatable').DataTable(); In my layout, which is rendered by the server (everything else is rendered by the client), I have &lt;script&gt; tags for each of the JavaScript files. However, when I load the page, all of the data comes in without the pagination and when I click a sorter (up or down), I see my Angular templating i.e. {{record.name}} and {{record.time}} in the first row and my data disappears. The only table that is working with jQuery datatables is a table with a very small amount of records (6). Even then, it works intermittently. This has lead me to believe that it's a problem with some data loading before/after (depending on the amount of data) the scripts do. I know there are alternatives and directives out there, but I have yet to find one that works properly and does everything the native plugin does. So please, do not suggest any of those to me. If it is a problem with the order of the data/scripts loading and one needs to load before another, I'm fine with adding a delay until everything has finished loading. Does this seem like it's the problem? How can I test this? Edit: Another note to take: when everything has finished loading, and I enter in the console $('#datatable').DataTable(); it applies all of the datatables features. The datatables code in my angular view is surrounded in a $(function() { //code }); This is how I get the data (for every table): app.controller('PaymentsCtrl', function($scope, Payments) { Payments.get() .success(function(data) { $scope.payments = data.payments; }); }); I then run an ng-repeat on the table's &lt;tr&gt;
tagged with: angularjs
type: Question
tagged with: datatable
has comment: http://stackoverflow.com/comment/41655832
accepted answer: http://stackoverflow.com/a/26591312
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41656129

http://stackoverflow.com/comment/41425367
type: QuestionComment
has text: Filter will get you multiple elements, you want `data("company_system_name")` of the first on or all?
comment on: http://stackoverflow.com/q/26385587
score: 0
type: Comment

http://stackoverflow.com/a/26468959
type: Answer
has comment: http://stackoverflow.com/comment/41575789
upvote count: 2
has body: I'm not sure to fully understand your question, but you can attach map to this: this.map = new google.maps.Map(mapHolder, mapOptions); instead of var map = new google.maps.Map(mapHolder, mapOptions); and so in searchCity var map = this.map
score: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26468808
downvote count: 0
answers question: http://stackoverflow.com/q/26468808

http://stackoverflow.com/comment/41406542
type: AnswerComment
comment on: http://stackoverflow.com/a/26361568
type: Comment
score: 0
has text: I copy your code but it doesn't send request to backend at all. If I add LoginControllerMixin and write this function - then it works....

http://stackoverflow.com/a/26549424
accepted answer of: http://stackoverflow.com/q/26503012
score: 0
type: Answer
has body: i have found the solution! no additional events and listeners, just var inputEl = this.myGrid.getView().scroller.dom; inputEl.scrollTop = inputEl.scrollHeight;
answers question: http://stackoverflow.com/q/26503012
type: AcceptedAnswer

http://stackoverflow.com/a/26419290
type: Answer
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26419086
type: AcceptedAnswer
has body: Use Shared Preference for that. When user logged into your application store login status into sharedPreference and clear sharedPreference when user click on logged Out. Check every time when user enter into application if user status from shared Preference is true then no need to login otherwise move to login page. First create class in that class write all the functions set and get shared preference information or in javascript use localStorage to set and get values probably first time login to set userinfo using: localStorage.setItem("name","vale"); after switch off you try to open your app, at the time use localStorage.getItem("name") based on that you can load your values.
answers question: http://stackoverflow.com/q/26419086

http://stackoverflow.com/comment/41410062
has text: @ adeneo , i will only to check condition.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26377178

http://stackoverflow.com/comment/41462640
type: Comment
type: QuestionComment
score: 1
has text: For things that require data, other sites such as http://plnkr.co/ are better.
comment on: http://stackoverflow.com/q/26406881

http://stackoverflow.com/a/26431741
score: 1
downvote count: 0
type: Answer
upvote count: 1
has body: Are you trying to avoid localstorage, or just cookies? You could store a session ID in the session storage, and authenticate the user using that, under no circumstances would I store a users password cleartext though.
answers question: http://stackoverflow.com/q/26431687

http://stackoverflow.com/comment/41510475
comment on: http://stackoverflow.com/q/26432662
score: 0
type: Comment
type: QuestionComment
has text: @user1906399 would you suggest adding radial buttons and just using a form instead?

http://stackoverflow.com/comment/41373952
comment on: http://stackoverflow.com/q/26357707
type: Comment
type: QuestionComment
has text: Use web server for your pages or add `http://` scheme.
score: 1

http://stackoverflow.com/comment/41595483
has text: YES I AGREE! :) your syntax of calling function is incorrect! function{} must be replaced with function(){} right...
score: 0
comment on: http://stackoverflow.com/q/26458544
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41650014
score: 4
comment on: http://stackoverflow.com/q/26509782
type: Comment
type: QuestionComment
has text: Notice, that the jQuery example adds an event handler to every `div` found on a page, the native code adds only one (to the newly-created one).

http://stackoverflow.com/comment/41538156
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26447987
has text: What is the intention of calling the PlayAudio method twice ?

http://stackoverflow.com/q/26412032
has comment: http://stackoverflow.com/comment/41472270
has body: I want to integrate and bind knockout observable array to my jxquery grid. Also when I click my search button it refreshes my grid. The code I have below is not binding my observable array to my grid on load or after search js var initialData = [ { username: "test", transdate: "test2" }, ]; var self = this; self.reportTitle = ko.observable(); self.selectedUser = ko.observable(); self.startDate = ko.observable(); self.endDate = ko.observable(); self.users = ko.observableArray(); self.results = ko.observableArray(initialData); function initialize() { dataModel.getUsers() .success(function (data) { $.each(data, function () { var obj = { id: this._id, username: this.username } self.users.push(obj); }) }).fail(function () { self.errors.push("An unknown error occurred."); }); }; initialize(); self.errors = ko.observableArray(); self.search = function () { dataModel.getCompoundLog(self.selectedUser(), self.startDate(), self.endDate()).success(function (data) { $.each(data, function () { var obj = { username: this.user.username, transdate: this.transdate } self.results.push(obj); }) }).fail(function () { self.errors.push("An unknown error occurred."); }); $("#jqxgrid").jqxGrid('updatebounddata'); } } app.addViewModel({ name: "Report", bindingMemberName: "report", factory: ReportViewModel }); view &lt;div data-bind="jqxGrid: {source: results, autoheight: true, columns: [ { text: 'username', dataField: 'username', width: 200 }, { text: 'transdate', dataField: 'transdate', width: 200, cellsalign: 'right' }, ]}" id="jqxgrid"&gt;&lt;/div&gt;
answer count: 0
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41503576
has comment: http://stackoverflow.com/comment/41499740
has comment: http://stackoverflow.com/comment/41473193
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/41499784
tagged with: knockout.js
has title: Binding Knockout To JXQUERY GRID
has comment: http://stackoverflow.com/comment/41508342
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41499720
has comment: http://stackoverflow.com/comment/41474297

input
tags question: http://stackoverflow.com/q/26453634
tags question: http://stackoverflow.com/q/26379903
tags question: http://stackoverflow.com/q/26469253
tags question: http://stackoverflow.com/q/26394277
tags question: http://stackoverflow.com/q/26390149
tags question: http://stackoverflow.com/q/26500534
tags question: http://stackoverflow.com/q/26503182
tags question: http://stackoverflow.com/q/26482837
tags question: http://stackoverflow.com/q/26508049
tags question: http://stackoverflow.com/q/26479228
tags question: http://stackoverflow.com/q/26511832
tag name: input
tags question: http://stackoverflow.com/q/26477612
tags question: http://stackoverflow.com/q/26494606
type: Tag
tags question: http://stackoverflow.com/q/26429492
tags question: http://stackoverflow.com/q/26474981

http://stackoverflow.com/a/26491377
answers question: http://stackoverflow.com/q/26491140
has body: Extending the answer from: https://stackoverflow.com/a/736970/1026017 var getHostname = function(href) { var l = document.createElement("a"); l.href = href; return l.hostname; };
type: Answer
score: 0

http://stackoverflow.com/q/26409778
tagged with: angular-promise
type: AnsweredQuestion
has body: I can't figure out why this isn't resolving, any ideas? "resolve this" does print, but it never makes it back to the resolution of the promise in .then. var promise = wait(); promise.then(function(result){ console.log("wait returned - " + result); }); function wait(){ var deferred = $q.defer(); if(busy){ setTimeout(function(){ wait(); },500); } else { console.log("resolve this"); deferred.resolve("Wait is over."); } return deferred.promise; };
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26409930
has title: $q promise not resolving
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26409930
score: 0
has comment: http://stackoverflow.com/comment/41468065
has answer: http://stackoverflow.com/a/26409908
has comment: http://stackoverflow.com/comment/41467964
has comment: http://stackoverflow.com/comment/41467908
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26409908

http://stackoverflow.com/q/26365903
answer count: 2
has comment: http://stackoverflow.com/comment/41389354
upvote count: 0
has body: I have a textbox and a calendar icon right beside it. I want to show calendar(datepicker) when I click on the icon. I tried using jquery datepicker, but it's not working. Is there a way to achieve this using ONLY javascript?
has comment: http://stackoverflow.com/comment/41389638
favorite count: 0
has answer: http://stackoverflow.com/a/26366557
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41391582
has comment: http://stackoverflow.com/comment/41389298
type: AnsweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/41389430
type: Question
has comment: http://stackoverflow.com/comment/41389493
possible better answer: http://stackoverflow.com/a/26366557
has title: calendar using only javascript
has answer: http://stackoverflow.com/a/26366213
accepted answer: http://stackoverflow.com/a/26366213
tagged with: javascript
has comment: http://stackoverflow.com/comment/41389300
has comment: http://stackoverflow.com/comment/41389390
downvote count: 4

http://stackoverflow.com/q/26378960
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26413725
has title: Installing individual plugin with bower
upvote count: 1
answer count: 1
has body: I'm looking at the d3-plugins repository and I want to install only the horizon chart plugin. At the moment my bower.json file has this entry: "d3-plugins": "*" But this will install the entire repo containing all the other plugins as well. Is there a way I can specify bower to install only one subdirectory of a project?
has answer: http://stackoverflow.com/a/26413725
tagged with: dependencies
favorite count: 0
tagged with: d3.js
tagged with: bower
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/q/26368469
accepted answer: http://stackoverflow.com/a/26369825
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
tagged with: angularjs
has title: Load JSON data on 2 different divs
possible better answer: http://stackoverflow.com/a/26368570
type: AnsweredQuestion
has body: i need to load the content of 2 different .json files in 2 different divs. First Second first.json { "item": { "name": "Pippo", "details": "Red", "composition": "Sweet", "modelDetails": [ "Red", "Yellow", "Green" ], "images": [ "http://cdn.test.biz/42/42266674ce_12n_f.jpg", "http://cdn.test.biz/42/42266674ce_12n_r.jpg", "http://cdn.test.biz/42/42266674ce_12n_e.jpg", "http://cdn.test.biz/42/42266674ce_12n_d.jpg" ] } } second.json { "item": { "name": "Fill", "details": "Black", "composition": "Hard", "modelDetails": [ "Red", "Yellow", "Green" ], "images": [ "http://cdn.test.biz/42/42266674ce_12n_d.jpg", "http://cdn.test.biz/42/42266674ce_12n_s.jpg", "http://cdn.test.biz/42/42266674ce_12n_f.jpg", "http://cdn.test.biz/42/42266674ce_12n_v.jpg" ] } } it's possible with jQuery or Angular? I tried with this: {{ x.Name }} {{ x.Details }} {{ x.Composizione }} {{ x.moreDetails }} {{ x.photo1 }} ...but i have problems with the images load...i visualize the textual url and not the real image...
has answer: http://stackoverflow.com/a/26368570
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26369825
has comment: http://stackoverflow.com/comment/41394038
type: Question

http://stackoverflow.com/a/58619726
downvote count: 0
type: Answer
upvote count: 2
has body: My solution app.js code: const flash = require('connect-flash'); app.use(flash()); require('./src/config/passport.js')(app); local.strategy.js code const passport = require('passport'); const { Strategy } = require('passport-local'); const userModel = require('./../../../models/userModel'); module.exports = function localStrategy() { passport.use(new Strategy( { usernameField: "username", passwordField: "password" }, (username, password, done) =&gt; { userModel.findOne({ username }, (err, user) =&gt; { if (err) { res.send(err); } if (user &amp;&amp; (user.username == username &amp;&amp; user.password == password)) { done(null, user, { message: "Success" }); } else { done(null, false, { message: "Invalid credentials!" }); } }); } )); } authController.js code function signIn(req, res) { res.render('signin', { nav, title: "Sign in", message: req.flash() }); }; authRouter.js code authRouter.route('/signin').get(signIn).post(passport.authenticate('local', { successRedirect: '/admin', failureRedirect: '/auth/signin', failureFlash: true })); signin.js template code (my view engine is ejs) &lt;% if (message) { %&gt; &lt;p style="color: red;" class="text-center"&gt;&lt;%= message.error %&gt;&lt;/p&gt; &lt;% } %&gt;
score: 2
answers question: http://stackoverflow.com/q/26403853

http://stackoverflow.com/comment/41556961
type: Comment
has text: Yupp. Its working.Thanks @Oli C. kindly suggest something about how to display some images after that two images reached at center.
comment on: http://stackoverflow.com/a/26404000
type: AnswerComment
score: 0

http://stackoverflow.com/comment/102851046
type: AnswerComment
has text: to update value is better make .val(100).change() or .attr('value',100); and .rangeslider('update', true); ?
comment on: http://stackoverflow.com/a/31899533
score: 0
type: Comment

http://stackoverflow.com/q/26495802
has comment: http://stackoverflow.com/comment/41625282
answer count: 2
possible better answer: http://stackoverflow.com/a/26495928
has comment: http://stackoverflow.com/comment/41624900
upvote count: 1
has comment: http://stackoverflow.com/comment/41625246
has comment: http://stackoverflow.com/comment/41625089
has answer: http://stackoverflow.com/a/26495928
has comment: http://stackoverflow.com/comment/41625194
has comment: http://stackoverflow.com/comment/41624798
tagged with: javascript
has title: How do I change URL without reloading page? - WITH A TWIST
has comment: http://stackoverflow.com/comment/41624916
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41625085
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41625243
type: Question
has answer: http://stackoverflow.com/a/26496060
has comment: http://stackoverflow.com/comment/41624897
tagged with: http-redirect
tagged with: http://stackoverflow.com/tag/html
tagged with: php
accepted answer: http://stackoverflow.com/a/26496060
has body: I am looking to remove a certain amount of a page URL without reloading. I have looked on StackOverflow for the answer and there are a few close answers but not what I'm looking for really. I do not want to use the hash function and if possible, avoid using the HTML5 version because HTML5 isn't the ratified standard yet and for the website this will be used on, I wouldn't be at all surprised is some of the clients used IE6. I would prefer if it wasn't an extremely complicated solution with 400 lines of code (at that cost I'd rather just reload the page to be honest). I forgot to mention this, critical, part of the question The user is directed from a different page with this string via PHP. So for example: user submits a form with errors. Let's say the form is on /myform.php The user gets headed to /index.php?string carry on as normal What I have: This is an example URL that I wish to edit without reloading: http://www.mywebsite.com/index.php?string Wait! ?string has a use on /index.php index.php will use $_GET['string']; and display a message to the user I have used JQuery to remove the message after 4 seconds like this: &lt;div id="pagemsg"&gt;&lt;?php echo $string; ?&gt;&lt;/div&gt; &lt;script language="javascript"&gt; setTimeout( "$('#pagemsg').fadeOut();", 4000); &lt;/script&gt; This works all well and the message disappears after 4 seconds. However I'm left with this URL: http://www.mywebsite.com/index.php?string I don't want this string anymore because ?string has done its job! I would like to remove the ?string without reloading the while page. Is there any solution that can help me? Also, I don't mind if I have to use the HTML5 push function but is there a fall-back solution for the browsers that don;t support HTML5? Why did I put WITH A TWIST in the title? Well, my requirements are different to the questions I have seen so far. Correct me if I'm wrong and I will change it. Thanks for your help in advance!

http://stackoverflow.com/q/26389963
has comment: http://stackoverflow.com/comment/41457962
has title: How to add a right click on my Firefox extension's icon?
has comment: http://stackoverflow.com/comment/41440549
type: Question
score: 5
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/45774161
tagged with: firefox-addon
tagged with: right-click
has answer: http://stackoverflow.com/a/26392170
answer count: 4
tagged with: firefox-addon-sdk
tagged with: contextmenu
upvote count: 5
has answer: http://stackoverflow.com/a/26469472
has answer: http://stackoverflow.com/a/30561259
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26470425
linked to: http://stackoverflow.com/q/26299849
has comment: http://stackoverflow.com/comment/41458066
has comment: http://stackoverflow.com/comment/41442862
linked to: http://stackoverflow.com/q/26410184
has body: Good Day! I've searched and searched again and I didn't find any help for this problem... Context : I've developed a Google Chrome extension that is very simple: send email to somebody with one click. To configure this, there is an option page on this extension to set the email address to which to send. My Google Chrome extension is available here (English translation, just the text, not the install). Users have asked me to make this extension for Firefox so I'm working on it! I've read tutorials on cfx and it's OK. But I need to have my extension respond to a right-click on my extension's icon in the toolbar. Not on the page, on my icon. I'm using ActionButton (or ToggleButton) to add my icon to this the toolbar but I can't find a way to add a menu on the right click (there's already the default Firefox context menu but I want to add "Options".) If somebody has the solution it would be great! (I'm not familiar with XUL. So, if possible, a JavaScript only solution, please ^^ ) PS : I'm French so please excuse me for my bad English EDIT : I've found how to set preferences in my "package.json" file but I want my own window. And if we could "bind" the button "Options" in Add-on Manager to my own window it would be perfect! EDIT 2 : as it's not clear for everyone I would detail here what I want for my extension : - simple click (left click) on the icon get the current URL and send it to a mail address (OK for this) - simple click ONLY DO THIS. This extension aims to be very very simple ! - right click on the icon shows Firefox's context-menu and I want to add "Options" here to show my options page - Addon Manager could have a "Options" button near "Deactivate" and "Debug" and I want this option button to show my options page. => 2 way to see my option page : by the right click or by the addon manager and this is why I need your help !

http://stackoverflow.com/q/26418127
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41483140
has body: MDN claims that by executing .freeze on an Object: Nothing can be added to or removed from the properties set of a frozen object. Now take a look at this example: var span = document.createElement("span"); span.id = "foo"; console.log(span.id); //foo Object.freeze(span); span.setAttribute("id", "bar"); console.log(span.id); //bar The id property is changed even when the object is frozen. Through span.hasOwnProperty("id") we know that id is indeed a local property of span. The whole DOM is just an Object in JavaScript so this should prevent id from being changed. However it is not doing its thing. Why?
has title: Object.freeze doesn't really freeze
tagged with: dom
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26418128
tagged with: javascript
upvote count: 0
answer count: 1
favorite count: 0
score: -1

http://stackoverflow.com/q/26448919
has answer: http://stackoverflow.com/a/26449142
accepted answer: http://stackoverflow.com/a/26449142
answer count: 1
tagged with: javascript
has title: How to define dependent function in a single js file?
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: concurrency
has body: I have a nodejs project in which a sample.js include two function function A depends on function B's callback . // smaple.js //Both function are included in the same file function B ( arg1 , callback ){ // do some async async.map(arg1 , function(item, cb){ var a = item.a var b = a*4 cb( null , {'a':a,'b':b}) },function(err , result){ callback(err , result) } ) } function A ( arg , callback ){ if(condition1){ callback(null , 1) }else{ B ( arg , function( err , result){ if(err){ callback(err , result) } else if (result ==1 ){ callback ( null , 2) }else{ callback ( null , 1) } }) } } Scenario 2 // function B is in outer.js and included as module //sample.js var outerfunction = require('./outer.js'); function A ( arg , callback ){ if(condition1){ callback(null , 1) }else{ outerfunction.B ( arg , function( err , result){ if(err){ callback(err , result) } else if (result ==1 ){ callback ( null , 2) }else{ callback ( null , 1) } }) } } outer.js function B ( arg1 , callback ){ // do some async async.map(arg1 , function(item, cb){ var a = item.a var b = a*4 cb( null , {'a':a,'b':b}) },function(err , result){ callback(err , result) } ) } module.exports.B = B ; Does scenario 1 is a proper way to use function ? What will happen if this code run concurrently using cluster module? Does scenario 2 is better way to use dependent function ? Is this code perform better on concurrent execution? Which scenario is better ?
score: 0

http://stackoverflow.com/q/26390487
has body: I have a DIV with an ID: &lt;div id="List"&gt;&lt;/div&gt; Within this, there is server-rendered content and client content. The server content is rendered in my MVC view: @foreach (var item in items) { &lt;div class="row"&gt; &lt;div class="col-md-4"&gt; &lt;input .. /&gt; &lt;/div&gt; . . &lt;/div&gt; } I have a client-templating process (using Kendo UI) that also adds the same exact markup to the list element, using the script below: var templateHtml = $("#Template").html(); var template = kendo.template(templateHtml); var result = template({ FirstName: "", LastName: "" }); $("#List").append(result); I was hoping to target the client and server code in one event call, like the following: $(function() { $("#List").on("change", "input", function(e) { //Do something }); }); But this isn't firing for both server and client inputs generated in the UI; only the ones that exist at the time of the event creation. Reading documentation for on suggests it should be on dynamic elements too?
has comment: http://stackoverflow.com/comment/41438304
has comment: http://stackoverflow.com/comment/41438657
type: Question
has title: Why is 'on' not adding dynamically created elements?
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41435427
tagged with: kendo-ui
score: 0
tagged with: asp.net
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26428267
has title: weird array behavior with .push
tagged with: javascript
score: 1
favorite count: 0
tagged with: multidimensional-array
type: Question
has body: I'm working on a scheduling script that grabs schedule data from a multidimensional array and pushes only the values from the original array that correspond to the current time to a second multidimensional array that contains only people currently working. Here's a simple example of how the data is stored: [["John Smith",0700,1700],["Peter Smith",0900,1600]] Only in my data, the start time is stored in index 7 and end time is in index 8 of the internal array (not sure if I'm using the right terminology here). My if statement is evaluating two values from the original schedule (start time and end time) that are located in an array called workingToday, seeing if the current time is between those values, and if it is it uses the push method to copy the corresponding array (containing the worker name, start/end times, etc) into a new array called workingNow. Other than building the initial array workingToday from the schedule I pull from another site, I don't perform any modifications on this array. Every other function I perform is done on workingNow after that initial if statement that pulls the data from workingToday into workingNow. The problem I'm having is that further down the line, when something modifies the workingNow array, it also modifies the original workingToday array which is screwing up some other features I'm trying to implement. I was under the impression that pushing the values into the new array doesn't link them to the old array, but I suppose this could be wrong. Here's my code for the if statement: var workingNow = []; for (i = 0; i &lt; workingToday.length; i++){ //convert time strings to numbers to compare var startTime = parseInt(workingToday[i][7]); var endTime = parseInt(workingToday[i][8]); //compare start and end times with the current time and add those working to the new array if(startTime &lt; parseInt(moment().format('hhmm')) &amp;&amp; parseInt(moment().format('hhmm')) &lt; endTime){ workingNow.push(workingToday[i]); }; }; As an examp…
has comment: http://stackoverflow.com/comment/41501808
upvote count: 1
has comment: http://stackoverflow.com/comment/41501584
type: UnansweredQuestion
tagged with: arrays
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/41486321
comment on: http://stackoverflow.com/a/26418793
type: Comment
has text: i have addressed what the OP really asked for which is "whether you can return success or failure on ajax call". the answer for which is NO. if you are talking about Synchronous requests then it is called as SJAX not AJAX. The code which i have written is to make the OP understand the answer better.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41571290
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26466281
score: 0
has text: The above element is for the drop down box. I want to use the session value for the user and validate the user type..and do the functionality make work. For Admin..I require just a label.

http://stackoverflow.com/q/26484332
has comment: http://stackoverflow.com/comment/41603601
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: Looking for help with a javascript reg ex replacement. What I need, is to replace all instances of width="100"&gt; With style="width: 100px;" But the actual px value is variable which is what is causing issues for me. I know reg expression is the way to go but I dont quite understand it. This is a similar question but doesn't solve the issue for me: JavaScript Regex Replace Width Attribute Matching The reason this is a problem is because of the HTML generated by TinyMce...
has answer: http://stackoverflow.com/a/26484486
tagged with: regex
has comment: http://stackoverflow.com/comment/41603654
has title: javascript .replace width tag
possible better answer: http://stackoverflow.com/a/26485623
has comment: http://stackoverflow.com/comment/41603624
has answer: http://stackoverflow.com/a/26485623
answer count: 2
linked to: http://stackoverflow.com/q/23812258
accepted answer: http://stackoverflow.com/a/26484486
score: 0
has comment: http://stackoverflow.com/comment/41603567
has comment: http://stackoverflow.com/comment/41603612
has comment: http://stackoverflow.com/comment/41604376
has comment: http://stackoverflow.com/comment/41604291
tagged with: javascript
has comment: http://stackoverflow.com/comment/41603996
type: Question

http://stackoverflow.com/comment/41540424
type: QuestionComment
type: Comment
has text: My bad. Fixed that in my question.
comment on: http://stackoverflow.com/q/26448541
score: 0

http://stackoverflow.com/comment/41553732
type: Comment
type: QuestionComment
has text: @esqew what else is there to use? I am able to call 4 lines of particular code and run these 3 function in a specific order.
score: 0
comment on: http://stackoverflow.com/q/26456558

http://stackoverflow.com/a/26486012
answers question: http://stackoverflow.com/q/26485742
has comment: http://stackoverflow.com/comment/41606671
has comment: http://stackoverflow.com/comment/41606608
type: AcceptedAnswer
score: 0
type: Answer
has body: If you want to check if there a control next. if($("myselector").next().length &gt; 0)
has comment: http://stackoverflow.com/comment/41607037
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41606484
accepted answer of: http://stackoverflow.com/q/26485742

http://stackoverflow.com/comment/41475914
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26413904
score: 0
has text: @friedi you rock man, that's the problem and I didn't knew this before that `name` attr was mandatory anyway thx I learn something new today

http://stackoverflow.com/q/26468858
type: Question
has answer: http://stackoverflow.com/a/26469396
has body: I have a 3 DIVs ('event') each with a child DIV ('event-details'). I want to be able to save the height original of 'event-details' (it varies depending on the 'event'), and then set height of 'event-details' to 126px. Then after clicking on a button ('more') I want 'event-details' to return to the original height. What I have so far saves the 'event-details' heigh, changes it to 126px but after clicking on 'more' it changes the height of 'event-details' to 222px, regardless of the original height it has. Any help? JS $(function() { $('.event').each(function() { var eventHeight = $(this).find('.event-details').height(); console.log( eventHeight ); $('.more').on('click', function (e) { e.preventDefault(); $(this).parent('.event').toggleClass('show'); $('.show > .event-details').css( 'height', eventHeight); }); }); $('.event-details').css( 'height', '126' ); }); HTML 1925 Home Away Lorem Ipsum is simply dummy text of the printing and typesetting industry. MORE 1925 Home Away Lorem Ipsum has been the industry's standard dummy text ever since the 1500s MORE 1925 Home Away It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. MORE Thanks.
accepted answer: http://stackoverflow.com/a/26469396
score: 0
has answer: http://stackoverflow.com/a/26470260
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26470260
has comment: http://stackoverflow.com/comment/41575596
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41575389
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41576072
has title: Return DIV to original height after click

http://stackoverflow.com/comment/114180688
comment on: http://stackoverflow.com/a/60223559
score: 1
type: AnswerComment
type: Comment
has text: This should be the relevant answer!

http://stackoverflow.com/a/26431844
has body: You can use appendTo() method to append the time to the respective &lt;div&gt; having same city attribute using the attribute equals selector like: $(this).text(city + ': ' + cityTime).appendTo("div[city='"+city+"']"); Updated fiddle
downvote count: 0
has comment: http://stackoverflow.com/comment/41524145
type: Answer
answers question: http://stackoverflow.com/q/26431762
upvote count: 2
has comment: http://stackoverflow.com/comment/41510024
score: 2

http://stackoverflow.com/a/26425526
has body: Try It : var t = "2014-03-29 13:12:01".split(/[- :]/); // Apply each element to the Date function var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]); var curr_date = d.getDate(t); var curr_month = d.getMonth(t) + 1; //Months are zero based var curr_year = d.getFullYear(t); var f = curr_date + "." + curr_month + "." + curr_year; alert(f); alert(d);
type: Answer
answers question: http://stackoverflow.com/q/26425115
score: 0

http://stackoverflow.com/q/26435033
has answer: http://stackoverflow.com/a/26435111
accepted answer: http://stackoverflow.com/a/26435111
tagged with: post
answer count: 3
upvote count: 1
favorite count: 0
tagged with: ajax
tagged with: ruby
tagged with: sinatra
has answer: http://stackoverflow.com/a/26435160
has title: Why won't this POST request send a JSON string to the server?
linked to: http://stackoverflow.com/q/17049569
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26435160
has comment: http://stackoverflow.com/comment/41516331
has body: I'm using Sinatra. I've got a button that sends a JSON-formatted string to the server by making a POST request. Only problem is, the JSON string isn't getting to the server. Here's index.erb: &lt;input id="post-button" type="button" value="Send POST request"&gt; Here's script.js: window.onload = function(){ var btn = document.getElementById('post-button'); btn.onclick = function(){ var req = new XMLHttpRequest(); var reqObj = { name: 'Joe', age: '100' }; var reqJSON = JSON.stringify(reqObj); req.open('POST','/post_target',true); req.setRequestHeader('Content-Type', 'application/json;charset=UTF-8'); req.send(reqJSON); } } And finally, main.rb: get '/' do erb :index end post '/post_target' do p params end When I click the button and check Firebug, I see that the browser sent a POST request. But when I check the Ruby console, it prints {} for params. If it worked right, I guess params would show a JSON object in string form, along with whatever else it would show. I'm running Sinatra on my machine, at address http://localhost:4567. What am I doing wrong? If I need to do the request with jQuery, I can do that, but can it be done with "vanilla" JavaScript?
type: Question
has comment: http://stackoverflow.com/comment/41514875
has answer: http://stackoverflow.com/a/26483111
tagged with: javascript

http://stackoverflow.com/comment/41620473
score: 2
type: Comment
type: QuestionComment
has text: Make all of these `$_post` uppercase `$_POST`, it's a [**superglobal**](http://php.net/manual/en/language.variables.superglobals.php) and MUST be in uppercase letters. Having checked for errors would have signaled that, which you and many others lately are not doing.
comment on: http://stackoverflow.com/q/26493450

http://stackoverflow.com/comment/41623705
comment on: http://stackoverflow.com/a/26495240
score: 0
type: Comment
has text: "Make them links. " - Exactly...+1
type: AnswerComment

http://stackoverflow.com/comment/41500141
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26373322
has text: Thanks Constantine. I believe both of those examples don't mix multiple text and object bindings. I am able to replicate those in these links but not my case. Except if I am missing something then please give me an example how this information would be applicable to my case.
score: 0

http://stackoverflow.com/comment/41535636
comment on: http://stackoverflow.com/a/26446472
type: Comment
has text: Yes, of course. See it here, I've done it just for the #create button, you do the rest: http://codepen.io/anon/pen/mEsAI
type: AnswerComment
score: 0

http://stackoverflow.com/q/26355440
has comment: http://stackoverflow.com/comment/41369871
has comment: http://stackoverflow.com/comment/41369919
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26355538
upvote count: 1
downvote count: 7
possible better answer: http://stackoverflow.com/a/26355699
type: Question
has answer: http://stackoverflow.com/a/26355699
has title: What dose it mean 'regex' on javascript?
has comment: http://stackoverflow.com/comment/41370532
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26355538
has body: I found this too code in one example script: 'regex':'^[a-zA-Z]{2} *\\d{6}|[a-zA-Z]{2} *\\d{3} *[a-zA-Z]{2}|[a-zA-Z]{2}[a-zA-Z]{2}[0-9]{6}|[a-zA-Z]{2}[0-9]{1}[a-zA-Z]{5}|[a-zA-Z]{2}[a-zA-Z]{1}[0-9]{5}|[a-zA-Z]{2}[0-9]{1}[a-zA-Z]{1}[0-9]{4}|[a-zA-Z]{2}[0-9]{5}[a-zA-Z]{1}|[a-zA-Z]{2}[0-9]{2}[a-zA-Z]{1}[0-9]{3}$', but i really do not know what it means...
answer count: 2
tagged with: jquery
score: -6
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/41453149
has text: it is possible http://stackoverflow.com/questions/271609/multiple-java-versions-running-concurrently-under-windows
comment on: http://stackoverflow.com/q/26399771
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41538722
score: 2
comment on: http://stackoverflow.com/a/26448340
type: AnswerComment
has text: Here is an article https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests in your case you exectuted the `playSound()` method actually way before the `decodeAudioData` method, basically right after you sent the request (which is async) and before the request arrived, and before you started decoding it (which is also async)
type: Comment

http://stackoverflow.com/q/26490269
linked to: http://stackoverflow.com/q/17680363
linked to: http://stackoverflow.com/q/26245495
accepted answer: http://stackoverflow.com/a/26504929
has title: EditableCellTemplate in ui-grid stuck in edit mode [ng-grid 3.X]
tagged with: angular-ui-grid
answer count: 2
upvote count: 1
tagged with: grid
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: ng-grid
favorite count: 0
has body: this is a slight continuation of this question. I am working with ng-grids new release ui-grid and am having an issue with editableCellTemplate. I am using the template to show a dynamic dropdown list using ng-options for editing. This works fine, however the cell seems to get stuck in edit mode. I have seen this issue before on stack overflow in relation to older versions of ng-grid. (like this post) Those solutions usually end up pointing out that they forgot to use ng-input="COL_FIELD" in their select. I have tried such methods, but it does not seem to be working for ui-grid. Perhaps it's because I am using ng-options and the other examples were not? Here is a plunker of the dropdown in the grid. Notice how if you lose focus, the cell still stays in edit mode. Has anyone came across this problem with ui-grid and conquered it? If so, any help would be greatly appreciated.
has answer: http://stackoverflow.com/a/26504929
possible better answer: http://stackoverflow.com/a/26509844
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/26509844

http://stackoverflow.com/comment/41457134
type: AnswerComment
type: Comment
has text: I think your self declaration is what I do directly as this.loginModel=new LoginModel from inside a backbone object.
comment on: http://stackoverflow.com/a/26403606
score: 0

http://stackoverflow.com/q/26392165
tagged with: width
tagged with: javascript
answer count: 1
tagged with: height
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/41437551
has body: I want to change height and width of an svg object on a button click. I tried it but it doesn't work: function modify() { document.getElementById('circle1').style.height = "10px"; document.getElementById('circle1').style.width = "10px"; }
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41437301
has title: Change height and width of SVG object using JavaScript
score: 29
has answer: http://stackoverflow.com/a/26392355
downvote count: 1
accepted answer: http://stackoverflow.com/a/26392355
upvote count: 30
type: Question

http://stackoverflow.com/q/26438839
favorite count: 0
type: AnsweredQuestion
score: 1
has title: Detect that code is running as a Chrome extension, from a remote site, within iframe
has body: Question: is it possible to detect if js code running on a remote site is being called from within an iframe in a Chrome extension? I have a remote website where I, when called as a Chrome extension, want to override a couple behaviors, and instead use chrome.runtime.sendMessage and chrome.runtime.onMessageExternal to send a command back to the extension. In my popup.html i have this: &lt;iframe src="http://localhost" width="100%" height="100%" frameborder="0"&gt;&lt;/iframe&gt; In my js on the remote site (localhost for testing), i have this: $(document).ready(function () { if (someHowCheckIfIAmBeingCalledFromAChromeExtension == true) { //what do I put here? { // The ID of the extension we want to talk to. var extensionId = "abc"; // Make a simple request: chrome.runtime.sendMessage(extensionId, { message: "connected!" }, function (response) { if (!response.success) handleError(message); }); } } }); In my popup.js I have: chrome.runtime.onMessageExternal.addListener( function (request, sender, sendResponse) { //do something with request.message }); Is this in any way possible or not? I have looked at many other articles and questions that kinda talk about what I am trying to do, but non set me on the right track exactly. Thanks!
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26450499
upvote count: 1
tagged with: google-chrome-extension
answer count: 1
has answer: http://stackoverflow.com/a/26450499

http://stackoverflow.com/q/26409735
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/41468193
has answer: http://stackoverflow.com/a/26409820
has body: I use angularjs to get a string from a web service. This string is actually a base64 pdf file. public string Get(int id) { var bytes = File.ReadAllBytes(@"C:\test.pdf"); var content = Convert.ToBase64String(bytes); return content; } Angularjs return me a array like this one: {"0":"\"","1":"J","2":"V","3":"B","4":"E" ...} But I need a complete string like this : "JVBE..." I try to find a way to get the complete string instead of array format and I don't find anything. Do you know how handle this? Thank you! Karine
score: 0
answer count: 1
has title: AngularJS how return a string instead of Json object
accepted answer: http://stackoverflow.com/a/26409820
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41469069

http://stackoverflow.com/q/26369075
has title: Convert a Date to a Julian javascript
downvote count: 2
linked to: http://stackoverflow.com/q/11759992
upvote count: 1
has answer: http://stackoverflow.com/a/26369247
type: Question
has answer: http://stackoverflow.com/a/26369938
type: AnsweredQuestion
has body: I would like to convert a date such as 2014/09/30 to a Julian date. Converting a date should return an integer. The reason why I want this integer is to use it in a subtract formula, and then revert the final results back to a date. How can I convert a date to a Julian and then convert the final results to a date?
duplicate of: http://stackoverflow.com/q/11759992
score: -1
possible better answer: http://stackoverflow.com/a/26369247
tagged with: date
answer count: 2
has comment: http://stackoverflow.com/comment/41397446
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26369938
favorite count: 0
has comment: http://stackoverflow.com/comment/41396964

http://stackoverflow.com/comment/41548561
comment on: http://stackoverflow.com/a/26453892
score: 0
type: AnswerComment
has text: Can you elaborate, what you mean by *save each input in an object*? an element itself is an object,. And you can use `setAttribute()` method to add attributes to it.
type: Comment

http://stackoverflow.com/q/26413778
has comment: http://stackoverflow.com/comment/41476580
has answer: http://stackoverflow.com/a/26424444
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26424444
has comment: http://stackoverflow.com/comment/41475799
has comment: http://stackoverflow.com/comment/41476159
has title: Javascript with jQuery for slider. Strange loop
type: Question
has body: This is a script that I'm using for a slider. In this slider I've 2 button left and right for visit the slides. I've used jQuery and a bit of Javascript for do this. I'm using a button for play/pause but after the 3rd time the slider crash and it goes really fast. The button &lt;input type="button" class="pausa" value="PAUSE" /&gt; The script $(document).ready(function(){ var one = "label#arrow-"; var x = 2; var y = 0; var two = ".arrows"; function clickin() { if(jQuery('.pausa').data('clicked')) { jQuery('.pausa').click(function(){ $(this).data('clicked', false); $(this).val('PAUSE'); return setTimeout(clickin, 4000); }); } else { while ((x != 7) &amp;&amp; (y == 0)) { $(one + x + two).trigger('click'); x++; if (x != 7) return setTimeout(clickin, 4000); } if (x == 7) { y = 1; x = 5; } while ((x != 0) &amp;&amp; (y == 1)) { $(one + x + two).trigger('click'); x--; if (x != 7) return setTimeout(clickin, 4000); } if (x == 0) { y = 0; x = 2; return setTimeout(clickin, 4000);; } } } setTimeout(clickin, 4000); jQuery('.pausa').click(function(){ $(this).data('clicked', true); $(this).val('PLAY'); return clickin(); }); });
tagged with: javascript
has comment: http://stackoverflow.com/comment/41475848
score: 0

http://stackoverflow.com/comment/41718250
comment on: http://stackoverflow.com/a/26405991
has text: @jerik Thanks for message. Because `selectProps()` and `selectNums()` are used for href-attribute they must be defined global. I made the mistake to wrap all in an `window.onload`. Please see updated fiddle.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/62128810
has text: yes it is bad practice. however i see myself still doing it. when i have a good day, i use `x`. you can add handlers and style it however you like and the code is even shorter. i dont care much for the javascript:... solutions as they add complexity to reading the code.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/37302921

http://stackoverflow.com/comment/41568827
type: Comment
score: 0
has text: I'm afraid I can't help you any further. Most probably if you examine the returned `params` you will see your edited value there. But I'm not sure.
comment on: http://stackoverflow.com/q/26460025
type: QuestionComment

http://stackoverflow.com/q/26365361
has title: JavaScript file not working when i upload updated code to web hosting
answer count: 1
downvote count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26365382
accepted answer: http://stackoverflow.com/a/26365382
tagged with: css
type: AnsweredQuestion
upvote count: 0
has body: I have a small website - http://www.calvation.uk/MyWebsite/index.php and down the bottom I have a box which should contain the time but for some reason the file isn't working. I have checked on my localhost and its working fine, so is it server side? is there a directory that I have to place JavaScript src in? thanks in advance for any help
type: Question
tagged with: javascript
score: -1

http://stackoverflow.com/comment/41381478
type: Comment
comment on: http://stackoverflow.com/q/26361829
has text: did you tried set_time_limit(0) ?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41457194
comment on: http://stackoverflow.com/a/26403710
has text: Ok, it was just a suggestion because it was the only "error" I could see in the code. The console displays any errors?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26484099
answers question: http://stackoverflow.com/q/26483886
has comment: http://stackoverflow.com/comment/117408202
has comment: http://stackoverflow.com/comment/41603151
type: Answer
upvote count: 6
has body: You can try this: if (url.contains('?')) {} else {}
downvote count: 1
score: 5

http://stackoverflow.com/a/26692373
answers question: http://stackoverflow.com/q/26513683
type: Answer
upvote count: 1
has body: As noted by OP, there is no statement after the while condition. Note the semicolon after the while loop, return this is only run after the while loop has been completed, and that is when any one of the three statements evaluate to false. If all you want to know is how the while loop is working, Filip Bartuzi's answer is probably the most complete. I will attempt to give a broader answer as to what the each2 method does. As noted in the docs, it is just a more efficient version of jQuery's #each, or Array.prototype.forEach or Underscore's #each or lodash's #forEach that is designed specifically for select2's uses. It is used to iterate over any array or other iterable, wrapped in a jQuery object. So it is used for arrays of strings as well as jQuery collections. The way it works is the scope (this) is the array that it was called on. It is given a function as an argument. This is exactly how the other each methods I previously mentioned are called. The function provided to each2 is called once for each item in the array. The while loop is sort of a hacky way to iterate over each item in the array, and call the function, setting the item as the context and passing the index in the array and the item as a jQuery object as the first and second arguments. Each statement in the while loop condition must be evaluated to determine if it is true, and that process is being used to actually assign values to variables, and increment i. The c.call(j[0], i, j) !== false part allows the function to terminate the loop early by returning false. If the function returns false, the while loop will stop, otherwise it will continue until i is greater than l, meaning that every item in the array has been used. Returning this afterwards just enables another method to be chained to the array after .each2. Basically the while loop could be rewritten to: var j = $([0]), i = 0, l = this.length, continue = true; while (i &lt; l) { i++; j.context = j[0] = this[i]; continue = c.call(j[0], i, j);…
downvote count: 0
score: 1

http://stackoverflow.com/q/26407052
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26407114
has title: jQuery to autoplay HTML5 audio
tagged with: http://stackoverflow.com/tag/html
tagged with: audio
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26407114
has body: Ok, so let me tell you where I'm at. The audio file displays and loads. you can click play to play it. The jQuery isn't autoplaying the material. I'm having to load in the file based on the href of the link. Code is below. Trying to get this to autoplay. $('.voiceLink a', resbox).click(function(e){ e.preventDefault(); var link = $(this).prop('href'), audio = $('.audioControl', el.parent()); audio.find('source').prop('src', link); audio.parent().css('display','inline-block'); audio.find('audio').load(); setTimeout(audio.find('audio').play(), 100); $(window).scrollTop(); }); resbox = The wrapper box. The HTML Element: Not Supported Example Link: 2456266
tagged with: javascript

http://stackoverflow.com/comment/41575438
has text: I made an update... If this was helpfull dont forget to vote it as the right one! @CeesvandenToren
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26468471

http://stackoverflow.com/comment/42199390
comment on: http://stackoverflow.com/a/26428010
score: 0
type: AnswerComment
type: Comment
has text: No, the value of the variable has not been attached to the directive's model. Step through it in a debugger and look at the value of `ctrl` to see when the actual attachment happens.

http://stackoverflow.com/comment/41423037
has text: I meant look in your **browser's** DevTool console, not your GAE launcher's for errors, but what you provided also clearly shows that `GET /js/jquery.chained.js` returns 404 which is the problem. Also try ` ` instead of ` ` there seems to be some utf8 character in my first suggestion that might break things or maybe you aren't allowed to include from github since that didn't work for me either but this new include works just fine.
comment on: http://stackoverflow.com/q/26383864
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/32247092
has comment: http://stackoverflow.com/comment/54978332
score: 3
type: Answer
has body: Please try this see the code here http://plnkr.co/edit/WiIo7Dddxh52uloTtWTW?p=info. I have covered many scenario based cell colors like. Negative values cell will show in RED Dirty cells will be YELLOW. Editable cells will be WHITE NonEditable cells will be GREY Total value cells will be DARKGREYED Give it a try. May be you can grab some knowledge/idea from there.
upvote count: 3
has comment: http://stackoverflow.com/comment/54905949
has comment: http://stackoverflow.com/comment/54888947
has comment: http://stackoverflow.com/comment/59584109
answers question: http://stackoverflow.com/q/26362666
has comment: http://stackoverflow.com/comment/118753132
downvote count: 0
has comment: http://stackoverflow.com/comment/54984859

http://stackoverflow.com/comment/107824899
type: AnswerComment
has text: @CharinduEdirisooriya yep, does not looks like there is a simple way to do it without moment.js
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26488640

http://stackoverflow.com/q/26362956
tagged with: javascript
answer count: 2
tagged with: singleton
has body: Say I want two views (polymer-elements) to share a model for example. In Angular the model would live in a singleton service that gets injected into the views, both views read from the same source. I tried emulating this approach with Polymer so I can do something like: ... ... ... ... I like this approach because it's a declarative way of defining dependencies, and it basically works the same as <core-ajax> and other "out of the box" Polymer elements. With this way I need to wait for the domReady lifecycle callback before I can interface with any element declared in the template, so this is where I'm holding my initialisation logic at the minute. The problem is that this callback gets called once for each element declared (so would be initialised twice in this example because it's present both in <view1> and <view2>). To make sure that my model follows the singleton pattern I have to move state outside of the element instance, something like this: So it works but it looks wrong to me. Is using generally incompatible with the singleton pattern? Should I move away from Polymer for models and services? How do Polymer core-elements get away with it? [EDIT] I added some event listeners to the initialising code above. They're only registered in one instance to avoid the listeners triggering multiple times across multiple instances. What would happen if the instance where the event handlers are declared gets removed? Will that not break the asynchronous logic?
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27873012
tagged with: angularjs
type: UnansweredQuestion
upvote count: 7
tagged with: design-patterns
has title: MV* in Polymer, models and services as polymer-elements?
has comment: http://stackoverflow.com/comment/41391418
score: 7
has comment: http://stackoverflow.com/comment/41399630
has answer: http://stackoverflow.com/a/27212523
type: Question
tagged with: polymer

http://stackoverflow.com/q/26446625
tagged with: javascript
has title: body.scrollTop returns 0 for some sites
has answer: http://stackoverflow.com/a/26446673
accepted answer: http://stackoverflow.com/a/26446673
has body: For some pages document.body.scrollTop returns 0, can you help understand why? For example, https://signup.live.com/signup.aspx
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/26446670
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26446670
score: -1
type: Question
answer count: 2
upvote count: 0

http://stackoverflow.com/comment/41491616
score: 2
comment on: http://stackoverflow.com/q/26423128
has text: In fact you do have an error. Line 115: ReferenceError: invalid assignment left-hand side: the line that says `(dx/y = 0)`.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26367469
has title: Write generic query function for mongodb REST API
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/26368509
answer count: 1
downvote count: 0
tagged with: mongoose
tagged with: javascript
has body: I'm using node.js express MongoDB and Mongoose to create rest api for my app. I'm wondering that there is any kind of type to replace such code like below for more generic? I do not want to pass all params all the time, but in only certain time. The most of time I just want to pass a part of them. Normally in Java, I create builder for such stuff, but I don't know any tricks for Javascript :) exports.getMessages = function (req, res) { var from = req.query.from; var deleted = req.query.deleted; var readed = req.query.readed; if(from &amp;&amp; deleted &amp;&amp; readed) { Message.find({to: req.user.email, from: from, deleted: deleted, readed: readed}, function(err, messages) { if(err) { res.send(err); } res.json(messages); }) } else if(from &amp;&amp; deleted) { Message.find({to: req.user.email, from: from, deleted: deleted}, function(err, messages) { if(err) { res.send(err); } res.json(messages); }) } else if (from &amp;&amp; readed) { Message.find({to: req.user.email, from: from, readed: readed}, function (err, messages) { if(err) { res.send(err); } res.json(messages); }); } else if(deleted &amp;&amp; readed) { Message.find({to: req.user.email, deleted: deleted, readed: readed}, function (err, messages) { if(err) { res.send(err); } res.json(messages); }); } else if(deleted){ Message.find({to: req.user.email, deleted: deleted}, function(err, messages) { if(err) { req.send(err); } res.json(messages); }) } else if(readed){ Message.find({to: req.user.email, readed: readed}, function(err, messages) { if(err) { req.send(err); } res.json(messages); }); } else if(from){ Message.find({to: req.user.email, from: from}, function(err, messages) { if(err) { req.send(err); } res.json(messages); }); } };
tagged with: rest
tagged with: node.js
favorite count: 0
accepted answer: http://stackoverflow.com/a/26368509

http://stackoverflow.com/a/26369784
upvote count: 1
has body: Your JSON string contains quotes and it breaks the html. Edit: You can also use escape(string) if you don't care if it is in readable format in the hidden input. Then you can use unescape(string) to get back your json string. That way you can use the same function to pass it over get requests too ;) {name: "test"} ==&gt; %7B%22name%22%3A%22test%22%7D Example: https://stackoverflow.com/a/17696884/986160
answers question: http://stackoverflow.com/q/26369674
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/26468200
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41578443
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/41580897
has title: casperjs and phantomjs hang on casper.start no timeout no error
type: Question
linked to: http://stackoverflow.com/q/26415188
downvote count: 0
tagged with: javascript
has body: I have been running a casperjs/phantomjs script on my ubuntu 12.04 server for many months without issue. Suddenly it has stopped. There have been no configuration changes (that I know of). Even testing the simple script posted here, casperjs just hangs on casper.start. No errors are reported and it does not time out. I have also tried running it with the --ingore-ssl-errors=true flag with the same result. I do not know where to look for errors and logs to begin to troubleshoot this. Sample script I'm trying: var casper = require('casper').create(); casper.start('http://casperjs.org/', function() { this.echo(this.getTitle()); }); casper.thenOpen('http://phantomjs.org', function() { this.echo(this.getTitle()); }); casper.run();
favorite count: 0
has comment: http://stackoverflow.com/comment/41581780
has comment: http://stackoverflow.com/comment/50023066
has comment: http://stackoverflow.com/comment/50022486
score: 2
tagged with: casperjs
answer count: 0
upvote count: 2

http://stackoverflow.com/q/26459563
answer count: 4
possible better answer: http://stackoverflow.com/a/26459604
has comment: http://stackoverflow.com/comment/41560075
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41558835
has answer: http://stackoverflow.com/a/26459604
has answer: http://stackoverflow.com/a/50933026
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41559963
score: 0
has answer: http://stackoverflow.com/a/26459680
has body: suppose I have printed a list of values and stored in a variable.The variable is of string type.Now I need to push those elements stored in a variable into an array.How can do this using javascript? private var data : String; private var dataarray:Array; for(var k : int = 0; k &lt; StockItemsProperties_list.Count; k++) { data=StockItemsProperties_list[k].InnerText+"\t"; dataarray=new Array(); dataarray.Push(data); Debug.Log("Elements in the array"+dataarray); }
has title: how to push a list of number into an array using javascript
has answer: http://stackoverflow.com/a/26459844
accepted answer: http://stackoverflow.com/a/26459844

http://stackoverflow.com/a/31418455
has body: When I wanted to render a macro on the client side, I used the nunjucks.renderString method to import the file containing the macros and then call it -- all in one go. My usecase is rendering a macro into HTML, then adding it onto the page using Javascript. A sample use case would be: var renderString = "{% import 'packageForms.html' as forms %} \n"; renderString = renderString + '{{ form.packageForm("task") }}'; var renderedHTML = nunjucks.renderString(renderString); $('#page').append(renderedHTML)
answers question: http://stackoverflow.com/q/26443028
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 6
score: 6
has comment: http://stackoverflow.com/comment/68894852
accepted answer of: http://stackoverflow.com/q/26443028

http://stackoverflow.com/comment/41546603
comment on: http://stackoverflow.com/a/26452602
has text: Cool - I'll have a play with the code as there seems to be a lot of different ways around this problem :-)
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26366058
tagged with: ajax
has title: c# datatable to webpage through AJAX call Error
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26367877
has body: I am trying to do this for the first time based on modifying a code snippet I found online. I am building an html data table in my code behind embedding sql data from a c# datatable. I am then trying to pass it to an .aspx page using an AJAX call and passing the html table string to a tag. The problem I am having is that when I breakpoint on the htmlTable string it looks good but the page is coming up with a javascript alert box saying 'error', not sure how to troubleshoot from this point or what is wrong with the code, I have pasted below, any assistance is appreciated!!! Code Behind: namespace WebApplication3 { public partial class Page_MF : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } private static string connTotalOrdersCalls = ConfigurationManager.ConnectionStrings["connTotalOrdersCalls"].ConnectionString; public static DataTable reportDT() { try { String sp_Name = "USP_TOTAL_ORDERCALLS"; using (DataTable OrdersCalls = new DataTable()) { OrdersCalls.Columns.Add("Week_Ending"); OrdersCalls.Columns.Add("Mth"); OrdersCalls.Columns.Add("Product_Suite"); OrdersCalls.Columns.Add("Site"); OrdersCalls.Columns.Add("SalesAction"); OrdersCalls.Columns.Add("Orders"); OrdersCalls.Columns.Add("TotalCalls"); using (SqlConnection SQLConn = new SqlConnection(connTotalOrdersCalls)) { using(SqlCommand SQLComm = new SqlCommand(sp_Name, SQLConn)) { SQLComm.CommandType = CommandType.StoredProcedure; //SQLComm.Parameters.Add(new SqlParameter("@Site", null); SQLConn.Open(); SqlDataReader sql_Reader = SQLComm.ExecuteReader(); while (sql_Reader.Read()) { Object[] row = { sql_Reader["Week_Ending"].ToString(), sql_Reader["MTH"].ToString(), sql_Reader["PRODUCT_SUITE"].ToString(), sql_Reader["SITE"].ToString(), sql_Reader["Orders"].ToString(), }; OrdersCalls.Rows.Add(row); } } return OrdersCalls; } } } catch (Exception) { throw; } } [WebMethod] public static String SendToDiv() { String htmlTable = " "; DataTable newTable = reportDT(); for (int i = 0; i < new…
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41433564
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41390702
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/26458866
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/26458897
has answer: http://stackoverflow.com/a/26458897
has answer: http://stackoverflow.com/a/26458889
has answer: http://stackoverflow.com/a/26459011
answer count: 3
has comment: http://stackoverflow.com/comment/41557579
has body: I'm new to JSON, node.js and javascript... I have a small node.js server that fetch a JSON object(named weatherData below) from openweathermap.org and I'm trying to make it display only a specific part of the JSON object(a section called "temp"). So far I used: var tempString = JSON.stringify(weatherData); And then I used search and substring methods of string to get my info but there's got to be an easier way right? How do I only display the temp section without using string methods? EDIT: When I stringify the whole thing I get this "{\"coord\":{\"lon\":-75.7,\"lat\":45.41},\"sys\":{\"type\":3,\"id\":119304,\"message\":0.0297,\"country\":\"CA\",\"sunrise\":1413804390,\"sunset\":1413842906},\"weather\":[{\"id\":802,\"main\":\"Clouds\",\"description\":\"scattered clouds\",\"icon\":\"03n\"}],\"base\":\"cmc stations\",\"main\":{\"temp\":273.05,\"humidity\":84,\"pressure\":1012.188,\"temp_min\":273.05,\"temp_max\":273.05},\"wind\":{\"speed\":1.11,\"deg\":260.506},\"rain\":{\"3h\":0},\"clouds\":{\"all\":44},\"dt\":1413780770,\"id\":6094817,\"name\":\"Ottawa\",\"cod\":200}\n"
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26459011
has comment: http://stackoverflow.com/comment/41557595
has comment: http://stackoverflow.com/comment/41557585
tagged with: node.js
has title: How to get a specific section of JSON into a string?
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41558175
has comment: http://stackoverflow.com/comment/41557507
type: Question
score: 1

http://stackoverflow.com/a/26472302
has comment: http://stackoverflow.com/comment/41597436
has comment: http://stackoverflow.com/comment/41613228
has comment: http://stackoverflow.com/comment/41592055
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26471308
type: Answer
answers question: http://stackoverflow.com/q/26471308
has comment: http://stackoverflow.com/comment/41613189
upvote count: 1
has body: I dont have much time to give a polished script, but this provides basic functionality EDIT: added script tags and basic JQUERY things note that because of loading JQUERY from the internet, it wont work without internet connection, if you wish to use it without internet con, download the script and link it locally &lt;script src="//code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt; &lt;script type = "text/javascript"&gt; $(function(){ var textContent = $('textarea').val(); var textRow = ""; $('input[type=submit]').click(function(){ $('input[type=text]').each(function(){ textRow = textRow+$(this).val()+'\t'; }); textContent = textContent + '\n' + textRow; textRow = ""; $('textarea').val(textContent); }); }); &lt;/script&gt;
score: 1
has comment: http://stackoverflow.com/comment/41587724

http://stackoverflow.com/q/26486781
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26487029
has title: Jquery ajax data is returned but success function is not called
possible better answer: http://stackoverflow.com/a/26486841
answer count: 3
has answer: http://stackoverflow.com/a/26486841
has answer: http://stackoverflow.com/a/26486925
has body: I have the following ajax: $.ajax({ type: 'POST', url: '/Module/findByType', dataType: 'json', data: { request: 'ajax', type_id: id }, success: function (data) { var i = 0; }) this generates the following output: [{"id":"267","Category_id":"1","name":"Adf\u00e6rdsscreening","description":"Denne adf\u00e6rdsscreening tager udgangspunkt i Adam Adf\u00e6rds 5 parametre, og du giver karakter ud\nfra en skala fra 1 til 4, hvor 4 er bedst.","price":"0","mentor":null,"location":null,"start_date":null,"end_date":null,"is_online":"1","status_id":"1","Material_id":null,"duration":"10","is_private":"1","module_type":"9","gives_score":"1","type_name":"Screening","type_color":"bg-Survey","category_name":"Adf\u00e6rd","image_path":"\/site\/resources\/images\/category_icon\/adfard.png","color":"bg-adfard","is_owned":"true"},{"id":"271","Category_id":"4","name":"Samtalescreening","description":"Jo mere du \u00f8ver dig p\u00e5 noget, jo dygtigere bliver du til det. M\u00e5ske har du\r\nf\u00f8r oplevet, at du g\u00f8r store fremskridt i de f\u00f8rste uger, derefter g\u00e5r det\r\nlangsommere og langsommere.\r\nOg til sidst g\u00e5r det helt i st\u00e5, m\u00e5ske endda i lange perioder.","price":"0","mentor":null,"location":null,"start_date":null,"end_date":null,"is_online":"1","status_id":"1","Material_id":null,"duration":"10","is_private":"1","module_type":"9","gives_score":"1","type_name":"Screening","type_color":"bg-Survey","category_name":"Kommunikation","image_path":"\/site\/resources\/images\/category_icon\/kommunication.png","color":"bg-Kommunikation ","is_owned":"true"},{"id":"289","Category_id":"1","name":"Test screening","description":"","price":"0","mentor":null,"location":null,"start_date":null,"end_date":null,"is_online":"1","status_id":"1","Material_id":null,"duration":"10","is_private":"1","module_type":"9","gives_score":"1","type_name":"Screening","type_color":"bg-Survey","category_name":"Adf\u00e6rd","image_path":"\/site\/resources\/images\/category_icon\/adfard…
has comment: http://stackoverflow.com/comment/41607910
has comment: http://stackoverflow.com/comment/41607871
has comment: http://stackoverflow.com/comment/41607829
has comment: http://stackoverflow.com/comment/41608889
has comment: http://stackoverflow.com/comment/41607974
has comment: http://stackoverflow.com/comment/41608303
downvote count: 1
accepted answer: http://stackoverflow.com/a/26487029
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41608008
has comment: http://stackoverflow.com/comment/41607793
has comment: http://stackoverflow.com/comment/41607839
has comment: http://stackoverflow.com/comment/41607916
score: -1
has comment: http://stackoverflow.com/comment/41607800
type: Question
upvote count: 0

http://stackoverflow.com/comment/41418630
type: AnswerComment
type: Comment
has text: you can not add eventhandler to fabric controls, you can look at [this](http://fabricjs.com/hovering/) link, and you have to make your own code to get hover on controls.
comment on: http://stackoverflow.com/a/26378290
score: 0

http://stackoverflow.com/comment/41591701
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26399460
score: 0
has text: are you looking for a generic ngResource where you can change settings?

http://stackoverflow.com/q/26506032
type: Question
has comment: http://stackoverflow.com/comment/41643299
has answer: http://stackoverflow.com/a/26506769
has title: How do I verify a password which is hashed using a random salt?
tagged with: salt-cryptography
linked to: http://stackoverflow.com/q/5252943
tagged with: javascript
tagged with: penetration-testing
has comment: http://stackoverflow.com/comment/41642780
answer count: 2
score: 2
has comment: http://stackoverflow.com/comment/41783064
has comment: http://stackoverflow.com/comment/41646728
has comment: http://stackoverflow.com/comment/41647691
favorite count: 0
type: UnansweredQuestion
tagged with: owasp
has comment: http://stackoverflow.com/comment/41646465
has answer: http://stackoverflow.com/a/26506073
tagged with: sha256
has body: I am developing a web application. Now from security perspective, salted hashing is required for the password while it is sent from client to server. Now my problem is, if I randomly generate a salt, append it to the password and hash the combination, how would this password be verified. As the salt generated is at random, hash of the salt+password combination would be different every time. If I send the same salt generated along with user credentials to the server, this will expose the salt. Exposed salt will create similar trouble as person trying to crack the password can append the exposed salt with different passwords to get the hash and match it. I have checked numerous websites and question on stack overflow but nothing matched my need exactly. There are tools that can read the memory of browser and steal passwords entered. Therefore salted hashing is required at client side also.
upvote count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/41783107

http://stackoverflow.com/q/26392052
tagged with: jquery
has body: Now before everyone is helpful (seriously, you guys are awesome) I am doing a coding challenge that means I can't get code from other users/people. This does not, however, extend to advice so I wanted to know why my code crashes google chrome. I don't want am not allowed any code so please just point me in the right direction. I am sorry for such an odd request but I am at my wit's end. http://jsfiddle.net/clarinetking/c49mutqw/9/ var chars; var keyword = []; var cipher; var done = false; var list1 = []; var list2 = []; var list3 = []; var list4 = []; var list5 = []; var keylngth = 0; $('#apnd').click(function () { cipher = $('#Input').val(); chars = cipher.split(''); $('#Output').append(chars); }); $('#key').click(function () { while (done === false) { var letter = prompt('insert letter, xyz to close'); keylngth++; if (letter == 'xyz') { done = true; } else { //Push letter to keyword array keyword.push(letter); } } }); $('#list').click(function () { for (i = 0; i &lt; chars.length; i++) { var x = 1; for (i = 1; i &lt; keylngth+1; i++) { if (i/x === 1) { list1.push(chars[x]); } if (i/x === 2) { list1.push(chars[x]); } if (i/x === 3) { list1.push(chars[x]); } if (i/x === 4) { list1.push(chars[x]); } if (i/x === 5) { list1.push(chars[x]); } if (i/x === 6) { list1.push(chars[x]); } if (i/x === 7) { list1.push(chars[x]); } if (i/x === 8) { list1.push(chars[x]); } } x++; } alert(list1); alert(list2); }); I apologize to all you coders out there that are probably screaming at me USE A REPEAT LOOP! but for the list function I see no way to. As previously mentioned, no code please unless it's pseudo code :)
accepted answer: http://stackoverflow.com/a/26392261
score: 0
tagged with: google-chrome
type: AnsweredQuestion
tagged with: loops
has title: My javascript crashes the server
type: Question
tagged with: crash
answer count: 1
has answer: http://stackoverflow.com/a/26392261
tagged with: javascript

identifier
tag name: identifier
type: Tag
tags question: http://stackoverflow.com/q/26427707

http://stackoverflow.com/q/26404718
type: AnsweredQuestion
has title: Looping on a list of objects in jsp page
score: 0
has answer: http://stackoverflow.com/a/26405446
type: Question
linked to: http://stackoverflow.com/q/18502977
has body: I am working on a simple spring mvc application which populates a dropdown box based on another. I am sending my pojo class to jsp page - 'info' . which contains list of objects . I want to populate the 2nd list bases on the first list with the data of the list . <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> HELLO WORLD First name: ----select an api------ PrivateAPI PublicAPI ----select a function------ How can i do for loop on privateMeth ? here is my pojo classes public class ApiInfo { List<PrivateApiMethod> privateApiMethods; List<PublicApiMethod> publicApiMethods; public List<PrivateApiMethod> getPrivateApiMethods() { return privateApiMethods; } public void setPrivateApiMethods(List<PrivateApiMethod> privateApiMethods) { this.privateApiMethods = privateApiMethods; } public List<PublicApiMethod> getPublicApiMethods() { return publicApiMethods; } public void setPublicApiMethods(List<PublicApiMethod> publicApiMethods) { this.publicApiMethods = publicApiMethods; } @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } } ------------------------ public class PrivateApiMethod { String methodName; String methodType; String numOfParam; public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public String getMethodType() { return methodType; } public void setMethodType(String methodType) { this.methodType = methodType; } public String getNumOfParam() { return numOfParam; } public void setNumOfParam(String numOfParam) { this.numOfParam = numOfParam; } @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } } -----------------------------------
accepted answer: http://stackoverflow.com/a/26405446
answer count: 1
tagged with: jsp
tagged with: javascript
tagged with: jquery
tagged with: spring
tagged with: spring-mvc

http://stackoverflow.com/comment/41548706
score: 0
type: Comment
type: QuestionComment
has text: You used a 512X512X100 matrix. 1) Is it the real size order of magnitude ? 2) Are the dimensions always power of two ? (so i guess height would be 128, not 100, in this case). 3) What is the depth required to store the pixel data in the array (8 bit, 16 bit, 32 bit float, ...) ? 4) Are all matrix of the same size ? 5) can we assume the Browser is efficient (meaning : either Chrome or Firefox) ?
comment on: http://stackoverflow.com/q/26395450

http://stackoverflow.com/comment/41483355
comment on: http://stackoverflow.com/a/26418106
type: AnswerComment
has text: var cell = document.createElement('td'); cell.style.height="50px"; this code work, but try to replace it with cell[k] array!!!
score: 0
type: Comment

http://stackoverflow.com/comment/41494886
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26424909
has text: No, the way you're approaching the problem is impossible. The `change` function will only occur after the full page is loaded. You'll just have the DOM to work with - the concept of a ViewModel is lost once you reach the client.

http://stackoverflow.com/q/26499893
type: Question
has answer: http://stackoverflow.com/a/26500276
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41632324
has comment: http://stackoverflow.com/comment/41632127
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26500276
has title: Javascript formula port from numbers
upvote count: 1
tagged with: excel
type: AnsweredQuestion
has body: I am trying to port a formula from numbers (Mac OS 10) to javascript, the original formula is thus: (1−(1+(C37÷100)÷C39)^−C45)÷((C37÷100)÷C39) I have written this: var calcValueOne = (1 - (1 + (yield/100) / coupon_frequency) Math.sqrt() - coupons_until_maturity) / ( (yield/100) / coupon_frequency); where yield = C37 and coupon_frequency = C39 and coupons_until_maturity = C45 I am getting the following error: SyntaxError: Unexpected identifier 'Math'. Expected ')' to end a compound expression. My mathematics is not to hot and transposing this in to Javascript is proving to be a huge challenge for me, can anyone post a solution to this please? EDIT @Musa kindly added a response but the number it is returning is not what I expect so I thought I would expand on the values to see if that helps. yield (C37) == 9.89 coupon_frequency (C39) == 4.00 coupons_until_maturity (C45) == 15.00 The number I am expecting is 12.41 but I am getting -607.1703544847592 the javascript now looks like this: var calcValueOne = (1 - Math.sqrt(1 + (yield/100) / coupon_frequency) - coupons_until_maturity) / ( (yield/100) / coupon_frequency); Again for clarity this is the original (excel / numbers) formula:
score: 1

http://stackoverflow.com/a/26406184
has body: I'm not sure I exactly understand your code, but generally speaking a "unit test" should test the lowest level function possible. In this case, I would think that is test.myFunction(). So, if in the past it accepted an argument and then returned something based on that, and now it doesn't, then it doesn't really matter if you pass in anything. In other words, if the JavaScript function doesn't use the arguments at all, then passing them in (or not) won't matter (and thus will not affect the success of the tests. In your case (above), the use of test.myFunction(textToReturn) after the code change to no longer use the input doesn't really matter, since the method works fine either way. That said, let's assume you have some code in theFunction() which expected the proper textToReturn value, then you would write a test for theFunction() which checks this. Here's a simpler example of this: // sort of like your `test.myFunction()` function foo() { return "static value"; } // the place where you remembered to change it... function bar() { $("#" + id).text( foo() ); } // the place where you forgot to change it function baz(id) { $("#" + id).text( foo("some other value") ); } For the source code above I would have tests for each function, both passing and those expected to fail. Here are some of the tests (there would be more): QUnit.test("make sure foo works", function(assert) { var v = foo(); assert.equal(v, "static value", "The value returned by foo should be correct"); }); // I would have added this one after the change to your `test.myFunction()` QUnit.test("make sure foo works with input", function(assert) { var v = foo("some other value"); assert.equal(v, "static value", "The value returned by foo does not change with input"); }); QUnit.test("make sure bar works", function(assert) { bar("theElementId"); var t = $("#theElementId").text(); assert.equal(t, "static value", "The value in the element should be correct"); }); /* // this is the ORIGINAL test for baz() // It w…
accepted answer of: http://stackoverflow.com/q/26401387
answers question: http://stackoverflow.com/q/26401387
type: Answer
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/26362255
has comment: http://stackoverflow.com/comment/41408710
has body: Use the click binding and id like for attr: data-bind="click: function() { $('#' + id()).slideToggle('slow1', null); }" Here it is unwrapped (()) because it's concatenated with '#'.
type: Answer
upvote count: 0
accepted answer of: http://stackoverflow.com/q/26362181
has comment: http://stackoverflow.com/comment/41397004
answers question: http://stackoverflow.com/q/26362181
has comment: http://stackoverflow.com/comment/41414249
has comment: http://stackoverflow.com/comment/41423547
has comment: http://stackoverflow.com/comment/41413438
score: -1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41423761
downvote count: 1

http://stackoverflow.com/a/26410855
has comment: http://stackoverflow.com/comment/41469884
has body: Yes same variable named may give conflicts i.e one value can overwrite other it depends on few things like are those variables global or local.
answers question: http://stackoverflow.com/q/26410791
has comment: http://stackoverflow.com/comment/41470183
has comment: http://stackoverflow.com/comment/41470051
has comment: http://stackoverflow.com/comment/41469932
has comment: http://stackoverflow.com/comment/41469996
score: 0
has comment: http://stackoverflow.com/comment/41469808
has comment: http://stackoverflow.com/comment/41470162
type: Answer

http://stackoverflow.com/comment/41418081
type: QuestionComment
type: Comment
has text: Provide minimalistic JSFiddle sample that reconstruct your issue.
score: 0
comment on: http://stackoverflow.com/q/26381550

http://stackoverflow.com/a/26430389
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41506254
has body: You forgot to initialize your $scope.mySelections property. Because of this, every time you'd print its value, you would get undefined. Check a fixed plnkr. Of course, it alerts a [Object object] for each, but this is a matter of how you want to print your objects. If you want to alert your objects in a more sensible way, you could do something like this plnkr.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26430062
has comment: http://stackoverflow.com/comment/41506296
type: Answer
accepted answer of: http://stackoverflow.com/q/26430062

http://stackoverflow.com/comment/41645999
has text: I am just passing id to $http.get
comment on: http://stackoverflow.com/q/26507663
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26418793
score: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41486321
downvote count: 1
has comment: http://stackoverflow.com/comment/41486143
answers question: http://stackoverflow.com/q/26415248
has body: AJAX means **Asynchronous** JavaScript and XML. so you cannot return the success or failure since the request will be Asynchronous of what you are doing, but you can do an action on success or failure. I have given a code sample in javascript (SOURCE : w3schools. in case if you want to know more) JAVASCRIPT xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){ // Do the success action } else{ // Do the failure action } } xmlhttp.open("GET OR POST","URL TO CALL"); xmlhttp.send("DATA TO SEND"); JQUERY $.ajax({ url: URL, // URL to post the data method: 'post',// suitable http verb data: '', // values to be passed with the request success: function(response) { // Do the success action }, failure : function(response){ // Do the failure action } });

http://stackoverflow.com/a/26509533
answers question: http://stackoverflow.com/q/26509430
downvote count: 0
has body: Create one click event that uses .on (since dynamic content and what not) and remove the parent li element: $("#user").on("click", "span.clickable", function() { $(this).parent("li").remove(); }); Also use the class clickable and not the ID (I assume you have more than 1);
score: 1
accepted answer of: http://stackoverflow.com/q/26509430
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26359827
downvote count: 0
has body: This is because of function declaration hoisting. function declarations are hoisted to the top of the script. In the first case, what has actually happened is this: &lt;script&gt; function function_two() { alert("The function called 'function_two' has been called."); } function_two(); &lt;/script&gt; The function declaration has been hoisted above the function_two() call. In the second case, function_two() is contained within a different script element, and the function declaration cannot be hoisted above it - the code in this case remains in the same order, and function_two() ultimately doesn't exist when it is called.
type: Answer
has comment: http://stackoverflow.com/comment/41377779
score: 7
answers question: http://stackoverflow.com/q/26359790
upvote count: 7

http://stackoverflow.com/a/26471172
answers question: http://stackoverflow.com/q/26471124
type: Answer
has body: yup: $('a').click(function() { setTimeout(function() { $(' ').appendTo('body') }, 1000); })
score: 0

http://stackoverflow.com/q/26410301
score: 0
has comment: http://stackoverflow.com/comment/41468996
answer count: 1
has body: Using Spring and Thymeleaf, I have a web page that must update displayed information based on external events. I have a thread running that catches the external events and updates the internal information. But how do I get the web page to update after that? I've found one post that suggested an JavaScript timer to do the update...Is that the best way? Cheers Lori &lt;*>
has comment: http://stackoverflow.com/comment/41470030
type: UnansweredQuestion
tagged with: spring
tagged with: spring-mvc
has answer: http://stackoverflow.com/a/26411087
has title: Spring - how do you refresh UI after external event?
type: Question
tagged with: thymeleaf
tagged with: javascript

http://stackoverflow.com/q/26439449
tagged with: javascript
has comment: http://stackoverflow.com/comment/41523861
possible better answer: http://stackoverflow.com/a/26440222
favorite count: 0
has answer: http://stackoverflow.com/a/26440222
has comment: http://stackoverflow.com/comment/41523008
tagged with: angularjs
upvote count: 3
has answer: http://stackoverflow.com/a/26731157
tagged with: ruby-on-rails
has body: I am having a hard time (many days searching and reading) to set an initial value for my data coming from a rails Json file. My app is about incident tickets and while I am getting all db entries into a data-ng-repeat, I am not able to set the default view e.g. show only unsolved tickets in the beginning, when you first load the page. I would like also the whole bunch of data to be kept available to be filtered when I call ng-click and various conditions. ticket_controllers.rb var ticketControllers = angular.module('ticketControllers', []); ticketControllers .controller('ticketListController', ['$scope', 'Ticket', function ($scope, Ticket) { $scope.tickets_all = Ticket.query(); $scope.orderProp = 'opened_date'; $scope.getAllTickets = function (ticket) { return $scope.tickets_all; }; $scope.getClosedTickets = function (ticket) { if (ticket.status === 'CL') { return true; } return false; }; $scope.getUnsolvedTickets = function (ticket) { if (ticket.status === 'IP' || ticket.status === 'WF') { return true; } return false; }; $scope.getAbortedTickets = function (ticket) { // console.log("Just called" + self.ticket); if (ticket.status === 'AB') { return true; } return false; }; $scope.styleTicketStatus = function (status) { switch (status){ case ("IP") : return "ui small circular teal label"; break; case ("WF") : return "ui small circular purple label"; break; case ("CL") : return "ui small circular black label"; break; case ("AB") : return "ui small circular black label"; break; default: break; } }; }]); template Issue Category Requester Pending for Owner {{ticket.status}} {{ticket.issue}} {{ticket.explanation}} {{ticket.ticket_category.category}} {{ticket.user.lastname}}, {{ticket.user.firstname}} {{ticket.owner.lastname}}, {{ticket.owner.firstname}} sidebar (filters..) My unsolved tickets {{ (tickets_all | filter:getUnsolvedTickets ).length }} All unsolved tickets {{ (tickets_all | filter:getUnsolvedTickets ).length }} Aborted…
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/41522790
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/41523754
has comment: http://stackoverflow.com/comment/41522829
answer count: 2
accepted answer: http://stackoverflow.com/a/26731157
has title: How to set an initial filter for my Json data in Angular.js?
downvote count: 0

http://stackoverflow.com/a/26416127
type: Answer
has body: You may try using the cache property of the settings object you are passing to the AJAX call. According to the jQuery documentation for .ajax the default for cache is set to true, so I wonder whether your browser is accessing a cached copy of the result after the first request. Looks like you could also set the dataType, and that will default the cache back to false. Also, I would suggest putting your alert inside of the onOpen event handler in addition to the success handler just to be sure that's also being called. So that may help you debug a bit further.
answers question: http://stackoverflow.com/q/26415999
score: 1
downvote count: 0
upvote count: 1

http://stackoverflow.com/comment/41563153
comment on: http://stackoverflow.com/q/26461535
score: 0
type: Comment
type: QuestionComment
has text: I get the `!` now, gracias. I thought there might be more to it than that...

http://stackoverflow.com/q/26483895
has title: CSS Color overlay hover
accepted answer: http://stackoverflow.com/a/26483978
has comment: http://stackoverflow.com/comment/41602763
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26483955
downvote count: 0
has answer: http://stackoverflow.com/a/26483978
type: Question
possible better answer: http://stackoverflow.com/a/26483955
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41602766
has body: I'm actually trying to obtain the reverse effect of this: http://jsfiddle.net/4fgnd/ I want my image to have a black overlay with some transparency, and when I hover with the mouse I'd like the overlay to dissapear. Any thoughts please? Don't really care if it's css only or a combination between css and js. Thanks &lt;div class="image"&gt; &lt;img src="http://www.newyorker.com/online/blogs/photobooth/NASAEarth-01.jpg" alt="" /&gt; &lt;/div&gt; .image { position:relative; width:400px; height:400px; } .image img { width:100%; vertical-align:top; } .image:after { content:'\A'; position:absolute; width:100%; height:100%; top:0; left:0; background:rgba(0,0,0,0.4); opacity:0; transition: all 0.5s; -webkit-transition: all 0.5s; } .image:hover:after { opacity:1; }
upvote count: 3
tagged with: css
favorite count: 0

http://stackoverflow.com/q/26453508
has answer: http://stackoverflow.com/a/26453568
has answer: http://stackoverflow.com/a/26453599
tagged with: date
possible better answer: http://stackoverflow.com/a/26453629
upvote count: 0
tagged with: setinterval
has answer: http://stackoverflow.com/a/26453629
has comment: http://stackoverflow.com/comment/41547959
tagged with: javascript
has title: Javascript setInterval and PHP Date()
favorite count: 0
has answer: http://stackoverflow.com/a/26453616
has comment: http://stackoverflow.com/comment/41547806
tagged with: php
answer count: 4
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41547886
has body: setInterval(function(){ var ss = "&lt;?php echo Date('Y-m-d H:i:s'); ?&gt;"; console.log(ss); }, 1000); I have this little code. It takes Date one time and then all the time, result is the same. (12) 2014-10-19 19:42:54 How can I fix it?
accepted answer: http://stackoverflow.com/a/26453616
type: Question
has comment: http://stackoverflow.com/comment/41547940
score: -2

http://stackoverflow.com/comment/52566271
score: 0
type: Comment
has text: If i dont want to put canvases inside a div , then ??
type: AnswerComment
comment on: http://stackoverflow.com/a/27370207

http://stackoverflow.com/comment/41559398
has text: Downvoters.. why?? All other answers assigns a click event on body the whole time, which is bad, because it fill up the memory. Also, none of the use a namespace...
comment on: http://stackoverflow.com/a/26459660
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26401387
has answer: http://stackoverflow.com/a/26406184
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/26406184
has comment: http://stackoverflow.com/comment/41461325
has title: Unit testing javascript function that's unknowingly used elsewhere
has body: I am just starting out with Unit Testing, so bear with me. Take the following 'silly' example. I have created an object of elements on the page that I want to bind functions to. I set up a unit test for test.myFunction and ensure that it returns the 'textToReturn'. var global = { o_bindings : [ { object: '#element1', event: 'keyup', selector: '', data: '', theFunction: function() { test.myFunction(textToReturn); } }, // .... lots of other code .... { object: '#element2', event: 'keyup', selector: '', data: '', theFunction: function() { test.myFunction(textToReturn); } } ] }; $(document).ready(function() { for (var i=0; i &lt; global.o_bindings.length; i++) { var o = global.o_bindings[i]; $(o.object).on(o.event, o.selector, o.data, o.theFunction); } }); I revisit a year later, and decide that #element2 should return the same text every time, so I hard code it in the function and update that part of the original object: { object: '#element2', event: 'keyup', selector: '', data: '', theFunction: function() { test.myFunction() } } I've forgotten that the function is also used on #element1, and update my unit test accordingly, so that it always returns the same text. The unit test would pass - but #element1 would not be working as expected. Am I missing something? Or would this be picked up in functional testing, as it's out of scope for unit testing? Any advice would be greatly appreciated.
tagged with: unit-testing
type: Question
tagged with: functional-testing
tagged with: javascript
answer count: 1

http://stackoverflow.com/comment/41620209
has text: Edited my comment up top to include the output of the HTML page.
score: 0
comment on: http://stackoverflow.com/a/26493181
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26408130
has answer: http://stackoverflow.com/a/26408295
tagged with: javascript
has title: slideToggle opening all links on page?
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26408575
favorite count: 0
type: Question
answer count: 2
tagged with: menu
accepted answer: http://stackoverflow.com/a/26408575
upvote count: 1
tagged with: toggle
possible better answer: http://stackoverflow.com/a/26408295
has body: I am new to Javascript and am having a few issues with my toggle menu: 1) I set the sub links to display:none; but they are still displaying anyway. I need them to be hidden on page load. 2) When clicking one of the main links, it toggles both main links instead of just the one clicked on. What do I need to add so that only the clicked link opens? http://jsfiddle.net/musiclvr86/5otvoxho/

http://stackoverflow.com/comment/41437133
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26377956
score: 0
has text: any sails.js or waterline guys to help?

http://stackoverflow.com/q/26358543
tagged with: python
has answer: http://stackoverflow.com/a/26359575
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I have directory with many JaveScript files. Here I want to scan each file and want to replace each JavaScript variable with string like 'str1', 'str2', 'str3', ..., 'strn' and so on. My question is: how to identify a JavaScript variable? Doubts: If I say keyword after var is a variable, however there is no compulsion of var while declaring variable If I say keyword before = is a variable, however file also contains HTML code, so inside HTML tag there is = sign between attribute and its value. So how can I identify the variables I have to replace?
has answer: http://stackoverflow.com/a/26358654
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41375723
has title: How to search for JavaScript variables in a file, using Python?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41376297
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26359575
possible better answer: http://stackoverflow.com/a/26358654

http://stackoverflow.com/a/26426063
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26423221
type: AcceptedAnswer
has body: First of all you should not mix native js and angularjs unless you know what exactly going on. Use ng-change instead of onchange and check the value if it is value of 'Anywhere'. If it is then route, otherwise do nothing. In your approach you're redirecting in both cases. Anywhere {{prsn.name}} $scope.selectHandler = function(){ if($scope.person == ''){ console.log("route to /home"); //ROUTE WITH $location.path } } Here is a working FIDDLE for demo.
answers question: http://stackoverflow.com/q/26423221
type: Answer

http://stackoverflow.com/comment/41591100
score: 0
type: AnswerComment
has text: Thanks, it works, but say I have 4 products on my page, but using either of these methods, only one product show the countdown, the other ones don't, any suggestion?
type: Comment
comment on: http://stackoverflow.com/a/26476575

http://stackoverflow.com/q/26415331
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26415444
answer count: 3
has comment: http://stackoverflow.com/comment/41478724
has comment: http://stackoverflow.com/comment/41478317
favorite count: 0
has answer: http://stackoverflow.com/a/26415454
has body: Okay, so the only way to explain this is with an example. In javascript you can do something such as: if(condition) { } The { and } are used to identify a code block. But in some cases such as this: window.onload = function() { } You need the function() included. Why can't it just be: window.onload { } Why the need for function() ? Also, I thought functions all have a name associated with them, and when that name is called the function runs, but why in this case is there a function with no associated name?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41478438
has answer: http://stackoverflow.com/a/26415516
has title: Javascript - Why Functions Vs Code Blocks are Needed Sometimes
has comment: http://stackoverflow.com/comment/41478684
score: 1
has comment: http://stackoverflow.com/comment/41478328
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41478666

http://stackoverflow.com/comment/41589735
has text: You are missing the ending `}` of the `if`
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26476219
type: QuestionComment

http://stackoverflow.com/a/26378965
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: You were creating a string contents, but jquery had no way of knowing of its existence. Here's a working fiddle: http://jsfiddle.net/c524Loam/ function create() { var contents = "..." var $contents = $(contents); for (i = 0; i &lt; 3; i++) { var row = $('&lt;tr&gt;&lt;/tr&gt;').addClass('bar').text('result ' + i); $contents.find(".preferences-table-body").append(row); } return $contents; } I created a new jquery object using contents and then manipulated it in the for loop. After return it gets appended to the markup.
has comment: http://stackoverflow.com/comment/41413432
answers question: http://stackoverflow.com/q/26378819
type: Answer
accepted answer of: http://stackoverflow.com/q/26378819

http://stackoverflow.com/a/26498409
type: Answer
has comment: http://stackoverflow.com/comment/41633427
has comment: http://stackoverflow.com/comment/41633384
has comment: http://stackoverflow.com/comment/41632701
answers question: http://stackoverflow.com/q/26495306
has comment: http://stackoverflow.com/comment/41633260
score: 0
has body: You cannot return a parameter using the depends method. Here's a quick test that shows how 200 is interpreted as a boolean true... $('form').validate({ rules: { txtFirstName: { required: true, max: { depends: function (element) { return 200; } } } } }); http://jsfiddle.net/pf6tpamp/ The depends method is for rules that can only be declared with a boolean true and no parameters. (Also, max is looking for numerical input. Maybe you wanted maxlength?)

http://stackoverflow.com/q/26495812
has title: how to implement device orientation in html5 with phaser framework
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26517652
has body: I am trying to make a simple game with phaser framework which uses device orientation API , i tried to do it but the movement is not done. here is the code ` preload: function() { game.stage.backgroundColor = '#64FE2E'; game.load.image('gau','assets/ball.png'); }, create: function() { this.ball = this.game.add.sprite(100,245, 'gau'); }, update: function() { // Function called 60 times per second if(this.ball.inWorld == false) this.restart_game(); keys = this.game.input.keyboard.createCursorKeys(); window.addEventListener("deviceorientation", this.handleOrientation, true); }, handleOrientation: function(e) { var x = e.gamma; // range [-90,90] var y = e.beta; // range [-180,180] this.ball.body.velocity.x -= x*2; this.ball.body.velocity.y -= y*4; }, `
type: Question
answer count: 1
tagged with: phaser-framework
tagged with: device-orientation
upvote count: 1
downvote count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/41662801
has text: @DougR I didn't criticize you at all... was only offering advice and an example of my own workflow. I apologize if your read of my commend came off as criticism. I also didn't down-vote you. (I actually up-voted you, and your comment about the no-comment downvote.)
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26512107

http://stackoverflow.com/q/26394851
has answer: http://stackoverflow.com/a/26394960
accepted answer: http://stackoverflow.com/a/26394960
type: AnsweredQuestion
downvote count: 0
tagged with: if-statement
score: 1
possible better answer: http://stackoverflow.com/a/26394964
type: Question
upvote count: 1
has body: Is there a way to simplify Javascript multiple if? I have this code to make three different divs appear when scrolling to other divs but i'm new with javascript, I tried declaring all the variables first but i'm not sure how to write the if part $(document).ready(function () { var topOfOthDiv1 = $("#cuidamos").offset().top - 490; $(window).scroll(function () { if ($(window).scrollTop() &gt; topOfOthDiv1) { //scrolled past the other div? $("#cuidado").fadeIn(); //reached the desired point -- show div } else { $('#cuidado').fadeOut(); } }); }); $(document).ready(function () { var topOfOthDiv2 = $("#productos").offset().top - 490; $(window).scroll(function () { if ($(window).scrollTop() &gt; topOfOthDiv2) { //scrolled past the other div? $("#sabor").fadeIn(); //reached the desired point -- show div } else { $('#sabor').fadeOut(); } }); }); $(document).ready(function () { var topOfOthDiv3 = $("#encuentranos").offset().top - 490; $(window).scroll(function () { if ($(window).scrollTop() &gt; topOfOthDiv3) { //scrolled past the other div? $("#locat").fadeIn(); //reached the desired point -- show div } else { $('#locat').fadeOut(); } }); });
has comment: http://stackoverflow.com/comment/41441940
tagged with: javascript
has answer: http://stackoverflow.com/a/26394937
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26394964
has comment: http://stackoverflow.com/comment/41441806
answer count: 4
has title: How to simplify Javascript Multiples if?
tagged with: scroll
has answer: http://stackoverflow.com/a/26395145

http://stackoverflow.com/comment/41622410
has text: jquery animations have a `complete` callback.. see docs for examples
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26494493
type: Comment

http://stackoverflow.com/a/26463329
score: 3
has body: keyCode should be readonly in all modern browsers, simply because modifying it is hacky and unnecessary. Looking at the code you provided in your other question: keydown event does not fire correctly using jQuery trigger, we can imitate this functionality rather than attempt to return the altered event. jQuery actually does let us modify the event object when it is passed in to a jQuery event handler. As you have jquery tagged, we can therefore make use of this in our answer, passing the modifications into a trigger() called on the same element. if (e.which === 13) { // Alter the normalised e.which property e.which = 9; // Alter the default properties for good measure e.charCode = 9; e.keyCode = 9; $(this).trigger(e); return false; } Note: I've used e.which rather than e.keyCode as jQuery normalises this across all browsers. Here is a demo which shows this in action. If you press the Enter key when the input element is in focus, the event will be replaced with the Tab event: var $input = $('input'), $p = $('p'); $input.on('keydown', function(e) { if (e.which == 13) { $p.html($p.html() + 'Enter key intercepted, modifying 13 to 9.&lt;br&gt;'); e.which = 9; e.charCode = 9; e.keyCode = 9; $(this).trigger(e); return false; } $p.html($p.html() + 'Key pressed: ' + e.keyCode + '&lt;br&gt;'); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="text" /&gt; &lt;p&gt;&lt;/p&gt; As I've mentioned in my answer here, just because you're changing the event doesn't mean your browser is then going to handle it as if the Tab key has been pressed. The logging lets us know that our event has successfully been intercepted and changed from Enter to Tab, even on Internet Explorer 11.
has comment: http://stackoverflow.com/comment/41565990
downvote count: 0
answers question: http://stackoverflow.com/q/26438274
has comment: http://stackoverflow.com/comment/41565926
type: Answer
upvote count: 3

http://stackoverflow.com/q/26383311
has answer: http://stackoverflow.com/a/26383391
type: Question
tagged with: jsonp
has answer: http://stackoverflow.com/a/26383386
upvote count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26384220
score: 0
has comment: http://stackoverflow.com/comment/41420914
answer count: 3
has body: I got the following code: var url = 'https://lottery.lafunda.com.do/Lottery/WinningNumbers?key=664cf843-8904-4212-9503-d4733651f519&amp;gobackdays=2&amp;grouped=true&amp;language=es-DO&amp;callback=generateTicker'; $.ajax({ url: url, accept: "application/javascript", dataType: "jsonp" }); function generateTicker(returndata) { console.log(returndata); } But nothing happens. In the console Im getting this message: "Resource interpreted as Script but transferred with MIME type text/html" Here is JSfiddle: http://jsfiddle.net/8k8souqj/ Thanks in advance. EDIT: Most of you are pointing out the URL does not return valid json. But if I use a modify header extension for chrome and accept "application/javascript" as a header I do get valid javascript: generateTicker([{"HouseAbbreviation":"LIL","ClosesOn":"2014-10-15T02:10:00","HouseName":"Illinois Noche","Drawings":[{"HouseAbbreviation":"LIL","HouseName":"Illinois Noche","ClosesOn":"2014-10-15T02:10:00","BallCount":2,"PostedNumbers":"3-0"},{"HouseAbbreviation":"LIL","HouseName":"Illinois Noche","ClosesOn":"2014-10-15T02:10:00","BallCount":3,"PostedNumbers":"6-3-0"}... etc EDIT 2: Apparently the problem is that jsonp cannot use modified headers as this is not possible via the script tag. Hence the URL will always return html. Thanks to all
has comment: http://stackoverflow.com/comment/41421094
has comment: http://stackoverflow.com/comment/41421813
has comment: http://stackoverflow.com/comment/41429885
has title: Jsonp request refuses to work
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41420934

http://stackoverflow.com/q/26484400
has title: Extjs How to stop form tooltip from removing focus from a form textfield
has body: I do not know if this happens to you but when I create a form and have a bunch of textfields inside with some type of validation (let's say maxLength) then whenever I violate this and the tooltip appears, for some reason it removes the focus from the textfield. This is really annoying because since you have gone over the max length the next step is to press "backspace" in order to delete some characters but since there is no focus in the textfield backspace executes "Back" of the browser and everything is lost. I tried to search for some related configs and stuff but I haven't found anything yet and there's nothing on the internet. It looks like this:
accepted answer: http://stackoverflow.com/a/26493416
type: AnsweredQuestion
score: 0
tagged with: forms
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26490279
tagged with: tooltip
tagged with: javascript
has answer: http://stackoverflow.com/a/26490279
tagged with: extjs
has answer: http://stackoverflow.com/a/26493416
has comment: http://stackoverflow.com/comment/41614400

http://stackoverflow.com/comment/41518626
comment on: http://stackoverflow.com/q/26437113
type: QuestionComment
has text: possible duplicate of [Are there pointers in javascript?](http://stackoverflow.com/questions/17382427/are-there-pointers-in-javascript)
score: 0
type: Comment

http://stackoverflow.com/a/26365467
upvote count: 1
has comment: http://stackoverflow.com/comment/41396816
score: 1
accepted answer of: http://stackoverflow.com/q/26364633
has body: Ask yourself what you'd do if you had developed it using TDD. It pretty much goes the direction Sam pointed out, but here are some examples: Controller Tests start writing a test which would expect a deleteClick to exist. Expect deleteClick to setup the loading state (check for processing = true) Test whether a service is injected into the controller (peopleNotesSrv) Check whether deleteClick calls the service (as already mentioned via spies) Verify that $scope.noteId and the other $scope.params are present and set This is as far as it relates to the Controller. All the criteria whether it fails or throws errors etc. should be tested in a Service.spec. Since I don't know your service in detail here some examples Service Tests Ensure deleteNote exists Check what happens if wrong number of arguments (less or more) are supplied Make some positive tests (like your noteId = 5) Make some negative tests Ensure callbacks are properly called ... and so on. Testing for validity in controllers doesn't make a lot of sense because than you'd need to do it for every Controller you have out there. By isolating the Service as a separate Unit of Test and ensure that it fulfills all the requirements you can just use it without testing. It's kinda the same as you never would test jQuery features or in case of Angular jQLite, since you simply expect them to do what they should :) EDIT: Make controller tests fail on service call Pretty easy lets take this example. First we create our Service Test to ensure that the call fails if not the proper number of arguments is supplied: describe('Service: peopleNoteSrv', function () { // load the service's module beforeEach(module('angularControllerServicecallApp')); // instantiate service var peopleNoteSrv; beforeEach(inject(function (_peopleNoteSrv_) { peopleNoteSrv = _peopleNoteSrv_; })); it('should throw error on false number of arguments', function () { expect(function() { peopleNoteSrv.deleteNote('justOneParameter'); }).toThrow(); }); }); No…
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26364633
type: Answer
has comment: http://stackoverflow.com/comment/41394913

http://stackoverflow.com/comment/41656351
type: Comment
has text: the process function is defined in boostarp.js file: process: function () { 550 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 551 , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight ... 2049 }
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26498229

http://stackoverflow.com/a/26370236
score: 0
has body: You could use something like this: function plucky(key, obj) { var sum = 0; if(typeof obj == "object") { for(var val in obj) { if(typeof obj[val] == "object") { sum += plucky(key, obj[val]); } else if(val == key) { sum += obj[val]; } } } else if(val == key) { sum += obj[val]; } return sum; }
answers question: http://stackoverflow.com/q/26369267
type: Answer

http://stackoverflow.com/q/26453842
answer count: 3
has answer: http://stackoverflow.com/a/26453892
has title: Efficient way to save DOM elements in an object
has answer: http://stackoverflow.com/a/26456545
favorite count: 0
has body: Is there a efficient way to save DOM elements in an object variable like this: http://img15.hostingpics.net/pics/357570example.png? The aim is to preserve some elements of the DOM object in a variable to be able to add attributes. I can actually go through data- attributes in HTML5 but I prefer a pure JavaScript (JQuery too) solution.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26475479
upvote count: 1
tagged with: object
tagged with: dom
downvote count: 1
type: Question
tagged with: javascript
tagged with: variables
tagged with: jquery
score: 0

http://stackoverflow.com/q/26371221
tagged with: transition
type: Question
answer count: 1
tagged with: javascript
has title: How to interrupt or chain a transition based on the active transition
score: 0
has comment: http://stackoverflow.com/comment/41409589
has comment: http://stackoverflow.com/comment/41508324
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/26516650
accepted answer: http://stackoverflow.com/a/26516650
tagged with: d3.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41450376
has comment: http://stackoverflow.com/comment/41507636
has comment: http://stackoverflow.com/comment/41425739
has body: I have a plot of SVG circles with some filter controls as checkboxes. The circles have an enter transition (filter is checked - come into screen), an exit transition (filter is unchecked - leave screen), and an update transition (filter is hovered over - highlight element). Since I'm using the same control to enter/exit/highlight (i.e. a checkbox), whenever I uncheck a filter and then move the mouse away, the highlight transition cancels the exit transition and the circle sticks around in whatever position it was on its way out. Is there a way to chain the highlight transition so that it doesn't cancel the exit transition? And is there a way to label the transitions so that I can chain or interrupt based on the label of the active transition? I don't think I could use the transition.each or transition.transition methods because the elements selected by the exit transition may not be the same as those selected by the highlight transition (e.g. user clicks on filter1 then hovers over filter2). To be explicit, the end goal is If active transition is enter/exit If subsequent transition is enter/exit, interrupt and apply If subsequent transition is highlight, chain If active transition is highlight If subsequent transition is highlight, interrupt and apply If subsequent transition is enter/exit, chain This can be boiled down to If subsequent transition is same as active transition, interrupt and apply If subsequent transition is not same as active transition, chain Hovering over a button highlights various circles and clicking on it removes them. Try clicking and moving the mouse away to see the problem. // Setup container var container = d3.selectAll('#svgContainer'); var width = 640, height = 480; var nShapes = 50; // Create random data var filteredData, data = d3.range(nShapes).map(function(d, i) { return { id: i, x: Math.floor(Math.random() * width), y: Math.floor(Math.random() * height), r: Math.floor(Math.random() * width / 15), red: Math.floor(Math.random() * 100)…

http://stackoverflow.com/q/26455709
tagged with: php
tagged with: object
type: Question
has answer: http://stackoverflow.com/a/26455791
has title: Printing out array of objects into a HTML data attribute
answer count: 2
tagged with: arrays
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26455855
tagged with: http://stackoverflow.com/tag/html
has body: I'm hoping someone can give me some advice to this problem. I have to print out an array of objects to an HTML data attribute in the format below... [{value:'some_val', text:'some_val'}, {value:'some_val', text:'some_val'}] My PHP code generates this is a string as below... $obj = "["; foreach ( $vals AS $key=&gt;$v ){ $key = addslashes( htmlentities($key) ); $v = addslashes( htmlentities($v) ); $obj .= "{ value:'{$key}',text:'{$v}' },"; } $obj = rtrim($obj, ",") . "]"; This worked fine until the values had double quotes and single quotes in them which is why I added addslashes() and htmlentities(). A Sample of data that I print out that breaks my HTML is below. When the data is sent to the database its fine but as the data is retrieved from the database I end up with an extra single quote on the string, in turn this doesn't match my option value etc etc. Sample data ( from firebug so no entities )... [{ value:'&lt; 5\' (&lt; 152 cm)',text:'&lt; 5\' (&lt; 152 cm)' },{ value:'5\'0" (152 cm)',text:'5\'0" (152 cm)' },{ value:'5\'1" (155 cm)',text:'5\'1" (155 cm)' },{ value:'5\'2" (157 cm)',text:'5\'2" (157 cm)' },{ value:'5\'3" (160 cm)',text:'5\'3" (160 cm)' },{ value:'5\'4" (163 cm)',text:'5\'4" (163 cm)' },{ value:'5\'5" (165 cm)',text:'5\'5" (165 cm)' },{ value:'5\'6" (168 cm)',text:'5\'6" (168 cm)' },{ value:'5\'7" (170 cm)',text:'5\'7" (170 cm)' },{ value:'5\'8" (173 cm)',text:'5\'8" (173 cm)' },{ value:'5\'9" (175 cm)',text:'5\'9" (175 cm)' },{ value:' 5\'10" (178 cm)',text:' 5\'10" (178 cm)' },{ value:'5\'11" (180 cm)',text:'5\'11" (180 cm)' },{ value:'6\'0" (183 cm)',text:'6\'0" (183 cm)' },{ value:'6\'1" (185 cm)',text:'6\'1" (185 cm)' },{ value:'6\'2"(188 cm)',text:'6\'2"(188 cm)' },{ value:'6\'3" (191 cm)',text:'6\'3" (191 cm)' },{ value:'6\'4" (193 cm)',text:'6\'4" (193 cm)' },{ value:'6\'5" (196 cm)',text:'6\'5" (196 cm)' },{ value:'6\'6" (198 cm)',text:'6\'6" (198 cm)' },{ value:'6\'7" (201 cm)',text:'6\'7" (201 cm)' },{ value:'6\'8" (203 cm)',text:'6\'8…
type: UnansweredQuestion

http://stackoverflow.com/a/26438163
downvote count: 0
has comment: http://stackoverflow.com/comment/41521708
has comment: http://stackoverflow.com/comment/41521735
type: Answer
answers question: http://stackoverflow.com/q/26427722
upvote count: 13
score: 13
has comment: http://stackoverflow.com/comment/41522046
accepted answer of: http://stackoverflow.com/q/26427722
has body: Simply said, if you have to integrate/use a library which is written in Typescript in your own project which uses JavaScript, you will use the compiled JavaScript API! You basically throw away everything which TypeScript brings in terms of benefit over pure JavaScript. Meaning you don't have to care about anything specific to TypeScript, like generics etc. You only have to work with the compiled output of the TypeScript library... To give you an example, go to http://www.typescriptlang.org/Playground Select "Walkthrough: Generics". On the right you should see the compiled JavaScript. It has no generics or anything special, it still is pure JavaScript. That's what you have to deal with... to your "specific" questions: what will be the JavaScript shape of the TypeScript API that extensively uses generics, class hierarchies, interfaces? See above. It will be plain good old Javascript. No difference for you. are there any issues with bundling, minification, AMD? No, because compiled TypeScript is plain JavaScript and can be minified etc... is it possible to have the basic Angular controller written in TypeScript and the other JavaScript Angular controller that inherits the functionality from it? What will be the caveats? Yes of course you can do whatever you want with the compiled JavaScript. The only disadvantage of using the compiled JavaScript from Typescirpt is, that you throw away the awesome features TypeScript can give you, like... types... If the other team is already on that route, you may want to consider to write your part in TypeScript as well ;)
has comment: http://stackoverflow.com/comment/41522384
has comment: http://stackoverflow.com/comment/41522373
type: AcceptedAnswer

http://stackoverflow.com/comment/41621932
score: 0
comment on: http://stackoverflow.com/q/26492260
type: Comment
type: QuestionComment
has text: What are you using to serve the php with?

http://stackoverflow.com/comment/95812642
has text: @Arun, you don't need NodeJS if you want to build the frontend with AngularJS.
comment on: http://stackoverflow.com/a/26398691
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26367830
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/26371177
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26368597
possible better answer: http://stackoverflow.com/a/26367930
has comment: http://stackoverflow.com/comment/41398215
has comment: http://stackoverflow.com/comment/41395989
has comment: http://stackoverflow.com/comment/41396735
has answer: http://stackoverflow.com/a/26367930
accepted answer: http://stackoverflow.com/a/26371177
score: 0
type: AnsweredQuestion
type: Question
has title: Selector data- with multiple values
has body: I have some checkbox with values that should filter the content of some div somewhere in the page and I am having some trouble getting those div's selected. $('input[type=checkbox]').on('change', function(){ /*here I hide all the div and then try to generate the correct selector to show the div's that correspond to the checkbox selection*/ $('div').hide(); var listSelection = ''; $('input[type=checkbox]:checked').each(function(){ if(listSelection == '') listSelection = $(this).val(); else listSelection += ' ' + $(this).val(); }); /*here i fail in the selection of them*/ $('[data-category="' + listSelection + '"]').show(); if(listSelection == '') $('div').show(); }); a b c x Let's say I check a -> the result should be the 1st, 2nd, 3rd, and 4th div to show If later I check a and c -> the result should be 1st and 3rd div to show but does not show anything at all
tagged with: javascript

http://stackoverflow.com/comment/41508659
has text: he's catching it, but the `throw` from sindie events.js is still killing the application. or, at least that's how i understand it.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26428965

http://stackoverflow.com/a/26457848
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26457555
has body: You don't need any extra code or api call to set the width of the popover. All you need is basic CSS .map-closures{ width: 200px; } That should do the trick.
answers question: http://stackoverflow.com/q/26457555
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41414677
has text: what you mean? you means to day `prop()` not works on dynamic elements
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26379674
type: AnswerComment

http://stackoverflow.com/a/26364825
answers question: http://stackoverflow.com/q/26364500
score: 0
type: Answer
has body: var status = result.locations[index] &amp;&amp; result.locations[index].status || ''; However, better maje sure before, if result.locations[index] exists... else do whatever is to be done in your code..

http://stackoverflow.com/a/26487680
answers question: http://stackoverflow.com/q/26487177
has body: Media Queries ? CSS : @media screen and (min-width: 768px) { .dropdown button{ display:none; } #mylist { display:block; clear:both; position: relative; } #mylist li{ float:left; } } Fiddle : http://jsfiddle.net/g8c194n4/1/
accepted answer of: http://stackoverflow.com/q/26487177
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/41376552
comment on: http://stackoverflow.com/a/26359105
score: 0
has text: $(this).index() will always return 0 first column. So, just added that condition also.
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26381030
type: AnsweredQuestion
has title: Why is grunt-contrib-jasmine hanging?
score: 1
has body: I'm asking this for posterity because it took me some time to figure this out. I have an application that uses require.js and tests based on jasmine, automated with grunt. I have grouped my modules into logical components, each of which is in a directory under app. My requirejs.config() call sets up path prefixes for those components like so: paths: { /*... vendor libraries are listed here ...*/ ui: 'app/ui', data: 'app/data', /* etc */ } Then I can specify dependencies on those modules like so: define([ 'ui/some/module', 'data/another/module' ], function(ui_module, data_module) { /* code for module being defined goes here */ }); My app works, and my tests pass in my web-based runner, which follows a structure similar to what I've used in the application, which is a single &lt;script&gt; element in the document body pointing to require.js, with a data-main set to test/index, which contains a very similar requirejs.config() call, only with additional paths for the tests themselves, and a call to window.onload(), which runs the tests. When I use grunt-contrib-jasmine, however, the tests hang and no tests are run. The message I get is: &gt;&gt; Error: timeout: Load timeout for modules: [list of modules, all my own application modules] &gt;&gt; http://requirejs.org/docs/errors.html#timeout at &gt;&gt; http:/127.0.0.1:8000/_SpecRunner.html:21 &gt;&gt; http:/127.0.0.1:8000/.grunt/grunt-contrib-jasmine/require.js:12 v &gt;&gt; http:/127.0.0.1:8000/.grunt/grunt-contrib-jasmine/require.js:14 C &gt;&gt; http:/127.0.0.1:8000/.grunt/grunt-contrib-jasmine/require.js:14 How do I get my tests to pass under grunt?
tagged with: gruntjs
has answer: http://stackoverflow.com/a/26381096
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jasmine
favorite count: 0
accepted answer: http://stackoverflow.com/a/26381096
tagged with: grunt-contrib-jasmine
tagged with: requirejs
upvote count: 1

http://stackoverflow.com/q/26391064
upvote count: 1
has title: Trying to get specific values from a custom made drop down menu
accepted answer: http://stackoverflow.com/a/26391162
type: AnsweredQuestion
downvote count: 0
has body: I'm trying to create a custom select menu(I just wanted to see if I could do it) and I'm having some issues. When the user clicks on the box, I want the user to be able to select an option and have it show up in that particular box. The problem I'm having is that the selected text shows up in each box, regardless of which menu they're selecting from. How do I fix this? Here's my pen. http://codepen.io/RobbyT15/pen/LIKsJ select Hello Goodbye A B C script $(document).ready(function(){ var select = $(".select"); $(select).on("click", function(){ $(this).find(".option-menu").each(function(){ $(this).toggle(); }) $(".option").on("click", function(){ $(".active").removeClass("active"); $(this).addClass("active"); $(select).children("p").remove(); var option = $(this).text(); console.log(option); $(select).prepend(" " +option +" "); }) }) })
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26391197
answer count: 2
has answer: http://stackoverflow.com/a/26391197
has answer: http://stackoverflow.com/a/26391162

http://stackoverflow.com/comment/41459317
type: QuestionComment
has text: The `setTimeout` schedules the call to `delay()` so if you want stuff to run *after* delay, put it inside `delay()`
score: 0
comment on: http://stackoverflow.com/q/26403466
type: Comment

http://stackoverflow.com/a/26471737
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26469585
score: 0
answers question: http://stackoverflow.com/q/26469585
type: Answer
has comment: http://stackoverflow.com/comment/41581826
has body: Since you only have one matrix, you don't need the repeat for the matrix label. You only need it for the thumbnails. Title: {{ thisItem.product._Title }} {{ thisItem.product.matrix._myLabel }} {{thisThumbnail._myLabel}} If it were possible to have multiple matrixes, the object would need to be modified to be able to represent that (by wrapping the matrix object in an array.) Update per comments: If you have the possiblity of multiple matrixes, you will need to modify the object to ensure that it is consistent when there is 1 vs when there are 2+. Title: {{ thisItem.product._Title }} {{ thisMatrix._myLabel }} {{thisThumbnail._myLabel}} and in controller: XMLt.controller("Xcontroller",function($scope,Xfactory) { $scope.Xcontroller = []; loadXML(); function loadXML() { Xfactory.getXML().success(function (data) { var x2js = new X2JS(); prodData = x2js.xml_str2json(data); // must always have an array of matrixes if (!prodData.contents.product.matrix.slice) { prodData.contents.product.matrix = [prodData.contents.product.matrix]; } $scope.thisItem = prodData.contents; $scope.matrices = []; angular.forEach($scope.thisItem.matrix,function(value,key) { $scope.matrices.push(value,key); }); }); } });
has comment: http://stackoverflow.com/comment/41581603

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/26360033
tags question: http://stackoverflow.com/q/26451183
tags question: http://stackoverflow.com/q/26355850
tags question: http://stackoverflow.com/q/26407048
tags question: http://stackoverflow.com/q/26364584
tags question: http://stackoverflow.com/q/26444727
tags question: http://stackoverflow.com/q/26459182
tags question: http://stackoverflow.com/q/26495860
tags question: http://stackoverflow.com/q/26371669
tags question: http://stackoverflow.com/q/26398420
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/26429594
tags question: http://stackoverflow.com/q/26481150
tags question: http://stackoverflow.com/q/26447948

http://stackoverflow.com/comment/41441295
has text: +1 - also good practice to end all statements with `;` - `var now = new Date();`
comment on: http://stackoverflow.com/a/26394542
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26424514
type: Question
has answer: http://stackoverflow.com/a/26424563
has body: I want to pass a string to a function that then will use this string as a callback. e.g. app.on('notice', function(data) { var callback = data.func; // this is a string eval(callback + "()"); // trun string into an executable function }); However I'm using this in an environment which prevents eval() from being used... How can I rewrite this to work without eval? I've tried: var self = this; return function(){ self[callback]() }; But it doesn't call the function (and I don't get any errors) Update: I forgot I also need to handle parameters: e.g. var params = ['param1', 'param2']; eval(callback + "("+ params +")");
score: 4
has answer: http://stackoverflow.com/a/26424688
answer count: 2
tagged with: javascript
has title: Use string to call function without eval()
favorite count: 0
has comment: http://stackoverflow.com/comment/41494055
upvote count: 4
possible better answer: http://stackoverflow.com/a/26424688
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26424563

http://stackoverflow.com/q/26493664
upvote count: 3
has title: Find/Replace multiple lines of code in Eclipse
has answer: http://stackoverflow.com/a/26494840
type: Question
score: 3
has body: How do I replace 20+ lines of JavaScript code in Eclipse? I can find and replace one line at a time but not multiple lines at once. I need to completely remove this block of code from all of my files: Contact Us Account Login Username: Password: New users register here Forgot password?
tagged with: javascript
tagged with: eclipse
tagged with: replace
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26494840
type: AnsweredQuestion

iframe
tags question: http://stackoverflow.com/q/26402227
tags question: http://stackoverflow.com/q/26379209
tags question: http://stackoverflow.com/q/26504004
tags question: http://stackoverflow.com/q/26373557
tags question: http://stackoverflow.com/q/26354717
tags question: http://stackoverflow.com/q/26380948
tags question: http://stackoverflow.com/q/26450060
tag name: iframe
tags question: http://stackoverflow.com/q/26354233
tags question: http://stackoverflow.com/q/26509475
tags question: http://stackoverflow.com/q/26365868
tags question: http://stackoverflow.com/q/26424366
tags question: http://stackoverflow.com/q/26492300
tags question: http://stackoverflow.com/q/26450107
tags question: http://stackoverflow.com/q/26497988
tags question: http://stackoverflow.com/q/26368755
tags question: http://stackoverflow.com/q/26493651
tags question: http://stackoverflow.com/q/26488468
tags question: http://stackoverflow.com/q/26377933
type: Tag
tags question: http://stackoverflow.com/q/26434151
tags question: http://stackoverflow.com/q/26446592
tags question: http://stackoverflow.com/q/26475422
tags question: http://stackoverflow.com/q/26490571
tags question: http://stackoverflow.com/q/26472533
tags question: http://stackoverflow.com/q/26496769
tags question: http://stackoverflow.com/q/26438090
tags question: http://stackoverflow.com/q/26501521
tags question: http://stackoverflow.com/q/26394016
tags question: http://stackoverflow.com/q/26508315
tags question: http://stackoverflow.com/q/26423899
tags question: http://stackoverflow.com/q/26490919
tags question: http://stackoverflow.com/q/26473555
tags question: http://stackoverflow.com/q/26426934
tags question: http://stackoverflow.com/q/26385961

http://stackoverflow.com/comment/41603897
has text: @Grimbode, no, it's the regex pattern to match True or true.
type: Comment
comment on: http://stackoverflow.com/a/26484585
score: 1
type: AnswerComment

http://stackoverflow.com/q/26385770
has body: I am creating a website to share wallpapers that can be downloaded and used on users' desktops. But I am not able to find a way to show its resolution to my visitors. Yes, I can write the resolution myself, but the problem is that I share too many images and it is not possible for me to write resolution for each image. I am able to automatically create description but I want to show the image resolution. Is it possible with JavaScript to achieve this? No problem if it shows the result after the image loads.
downvote count: 0
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41425800
has title: How to Show Image Resolution to from its URL
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2179100
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41425747
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26385877
accepted answer: http://stackoverflow.com/a/26385877
tagged with: image
has comment: http://stackoverflow.com/comment/41425907

http://stackoverflow.com/q/26360854
has title: The contents of the div not showing in print preview in safari
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41484143
tagged with: safari
answer count: 0
has comment: http://stackoverflow.com/comment/41379680
type: Question
has comment: http://stackoverflow.com/comment/41380163
has body: I have a jsp which has some divs associated .These divs are populated with contents on runtime. After loading the contents, if i give self.print(), its showing the print preview, but no contents in the preview. This is happening in safari 7 whereas It works well in mozilla. Can anybody help me? Thanks,
tagged with: javascript

http://stackoverflow.com/a/26404220
has comment: http://stackoverflow.com/comment/41458373
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26404112
has body: You can assign controllers to directives: .directive('MyComponent', function() { return { restrict: 'E', controller : 'HomeController', templateUrl: '/MyComponent/Component.html' }; });

http://stackoverflow.com/q/26388894
score: 0
type: AnsweredQuestion
type: Question
has body: In my Ember application I have a categories controller and corresponding template. I want to use this on various routes: When browsing, when advanced searching and when adding a product. I tried to put it together as this: #router this.resource("categories", { path: "/*scope/select-category" }, function() { } ); Scope could be 'search', 'products' or 'products/new'. It would make URLs very pretty! But I'm having difficulties finding back the *scope value from my controller, I found it somewhere nested deeply, but with 'products/new' as the scope the value is 'products'. Also I already experienced some strange behavior, for example, on a fresh page load for 'products/select-category' it wants to go to 'products.product', trying to find the product with ID='select-category'. Which is of course not what I want. The categories route is the first route in the list so I assumed it would always pick that first..? I'm doubting if this is the right way to do this.
answer count: 1
has answer: http://stackoverflow.com/a/26390963
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26390963
tagged with: ember.js
has title: Using template and controller multiple times on different routes in Ember

http://stackoverflow.com/comment/63864639
score: 0
type: Comment
has text: @halter73 So how do we reduce the default wait time? id like to reduce it to around 10.
comment on: http://stackoverflow.com/a/26392362
type: AnswerComment

http://stackoverflow.com/comment/41592435
type: Comment
type: QuestionComment
has text: you should only see 192.168... if your server is running locally, in which case the "call" never leaves your LAN, and you have no public IP. if you run it from, say, a VPS somewhere, you should see the same thing your link sees. indeed, a real server cannot normally see anything on an 192.168 IP...
score: 0
comment on: http://stackoverflow.com/q/26477206

http://stackoverflow.com/q/26415640
has comment: http://stackoverflow.com/comment/41512925
has comment: http://stackoverflow.com/comment/41478846
has comment: http://stackoverflow.com/comment/41478806
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41512913
has comment: http://stackoverflow.com/comment/41478812
type: Question
has title: How can we read text file values in array using Javascript
score: 0
has body: I have a text file with rows of ID's. Example: ID 1 2 3 How can I read this file and store these values in a javascript array, and where should I store my text file? My current file location is: file:///C:/xampp/htdocs/ash/file/js/UserFile.txt How should I specify the file location in code?

http://stackoverflow.com/a/26449167
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26449086
upvote count: 1
has body: You have wrog name in your JavaScript (should be Phone instead of Phoneno): if (!phonepatt1.test(Phone)) { phonetest1 = false; } if (!phonepatt2.test(Phone)) { phonetest2 = false; }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26449086
type: Answer

http://stackoverflow.com/q/26443314
favorite count: 0
downvote count: 3
has answer: http://stackoverflow.com/a/26443353
score: -3
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41529548
has comment: http://stackoverflow.com/comment/41529549
tagged with: javascript
has comment: http://stackoverflow.com/comment/41529542
has body: Uncaught TypeError: undefined is not a function error in this code $(function() { $(".letter-container h1 a").lettering(); }); How can i solve this?
type: Question
has title: Uncaught TypeError: undefined is not a function error
tagged with: function
answer count: 1
tagged with: undefined
tagged with: jquery

http://stackoverflow.com/comment/41488003
type: Comment
type: QuestionComment
has text: you can try using `\b+findstr+\b|\b+findstr2+\b`
score: 1
comment on: http://stackoverflow.com/q/26420054

http://stackoverflow.com/comment/41399229
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26370891
has text: Where is this code located, and what happens when you "open" your extension? The extension lifecycle is - background started once per Chrome launch, and popup (if present) is created and killed on every press.

http://stackoverflow.com/q/26418575
upvote count: 2
type: UnansweredQuestion
has title: $scope.myArray not shown after I switch between pages
has comment: http://stackoverflow.com/comment/41484100
score: 2
has body: I have a two page web-app written in AngularJS, which should get the new data from the database every time the page is displayed. After I load the page freshly, it works perfectly fine. The data is displayed correctly on page A. When I switch to page B, which is not initially visible, it also works. But when I switch back to page A, nothing of the data is displayed. I debugged the array which should be emptied and refilled every time and I saw, that the old data is still there and the new data (which is the same as the old) was added onto this array. Here is a simplified version of my code: Views: &lt;table&gt; &lt;tr ng-repeat="data in mydata"&gt; &lt;td&gt; &lt;a href="{{data.link}}"&gt;{{data.linkname}}&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; Controllers: angular.module('myApp').controller('MainCtrl', ['$scope', function($scope) { $scope.mydata = []; //send request for data to the database... //listener for the incoming data is the following function: var listener = function(message){ $scope.mydata.push(message); //message has the expected format $scope.$apply(); //just for sure }; }]);
type: Question
has comment: http://stackoverflow.com/comment/45302184
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41486683
favorite count: 0
tagged with: angularjs
answer count: 0

http://stackoverflow.com/comment/41553067
has text: @Rebirth then explain in more details, with examples.
type: Comment
comment on: http://stackoverflow.com/a/26456188
score: 0
type: AnswerComment

http://stackoverflow.com/q/26378752
answer count: 1
tagged with: javascript
score: -4
has body: I have a screen which should be shown based on only certain conditions. Is it possible to put the entire screen in a division and show it whenever needed ? If yes, how to enable or disable it ? By default is it enabled ?
favorite count: 0
has answer: http://stackoverflow.com/a/26378944
has title: Is it possible to show a division in html whenever required ? if yes, how to enable and disable it?
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6242976
type: UnansweredQuestion
type: Question
downvote count: 4
upvote count: 0

http://stackoverflow.com/comment/41544170
score: 3
comment on: http://stackoverflow.com/q/26451440
has text: You should provide more context.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26488817
has body: What i would do is skip the regex, and parse as JSON: var jsonObject = JSON.parse(theJsonString); jsonObject.resource = "http://domain.com/page" + jsonObject.resource; theJsonString = JSON.stringify(jsonObject); It's up to you to put theJsonString into the element.
answers question: http://stackoverflow.com/q/26488683
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/41611553
type: Answer
upvote count: 4

http://stackoverflow.com/comment/41457074
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26401940
score: 1
has text: Right. Each WS connection starts always as a HTTP request. Once the WS negotiation is done through HTTP, the connection does not close, it keeps open for messaging using binary frames till it closes, no more HTTP is allowed in that channel. This HTTP negotiation mechanism is very helpful, because it allows to traverse security inspectors and does not need to map and/or open additional TCP ports in routers and firewalls; it also allows to exchange cookies, so it has a great integration into web apps.

http://stackoverflow.com/a/69013236
upvote count: 2
answers question: http://stackoverflow.com/q/26466788
has body: This will make another ajax call but with the same query string as before. Uses event select2:closing to save last query string and select2:open to insert the string into the search input and trigger input event. var lastQueryString = ''; jQuery(".my-select2").select2({ minimumInputLength: 2, placeholder: "Select an option", ajax: { url: "/example", data: function (params) { var query = { search: params.term } return query; }, processResults: function (data) { return { results: JSON.parse(data) }; } } }); jQuery('.my-select2').on('select2:open', function () { if (lastQueryString) { jQuery('.select2-search').find('input').focus().val(lastQueryString).trigger('input'); } }); jQuery('.my-select2').on('select2:closing', function () { lastQueryString = jQuery('.select2-search').find('input').val(); });
downvote count: 0
has comment: http://stackoverflow.com/comment/137207407
type: Answer
score: 2

http://stackoverflow.com/comment/41468820
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26410304
has text: There's the good ol' embed tag: ` `

http://stackoverflow.com/a/26478363
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26477774
downvote count: 0
has body: From the way you've worded your question, it sounds like you're using a &lt;form&gt; with a POST method. If that's the case, then which origin do you expect the submission to go to? Chrome Apps have no server component, so there isn't any meaningful origin. Moreover, even if you did a POST to a full remote-origin URL, a form submission is effectively a navigation to a new origin, and like any single-page application (http://en.wikipedia.org/wiki/Single-page_application), a Chrome App does not have a concept of navigation. If you really do mean to submit a form to a remote origin, then you need to do it with XHR. One of many examples of XHR-based form submission is in https://github.com/GoogleChrome/chrome-app-samples/blob/master/samples/push-guestbook/guestbook-app/Guestbook.js.
upvote count: 2

http://stackoverflow.com/q/26438974
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29368173
score: 0
has comment: http://stackoverflow.com/comment/41674542
answer count: 1
has title: Not able to animate solid gauge chart with Angular Highcharts
favorite count: 0
tagged with: angularjs
tagged with: animation
upvote count: 1
type: AnsweredQuestion
has body: I'm using Highchart with Angular and have used the ng dependency for highchart library from here butI'm not able to animate the guage chart, I want to animate the chart as in the OFFICIAL PAGE I've made sure to add the animate factors but not able to make it work Here is the FIDDLE animation: { duration: 5000, easing: "linear" } Please help me in animate the chart, Thanks.
has answer: http://stackoverflow.com/a/29368173
downvote count: 1
type: Question
tagged with: highcharts
tagged with: javascript

http://stackoverflow.com/comment/41784328
comment on: http://stackoverflow.com/a/26506769
score: 0
type: Comment
has text: thanks for the link, but I am looking for a way out to random salts. I want to avoid any possibility for Brute forces or Rainbow tables
type: AnswerComment

http://stackoverflow.com/comment/41513741
comment on: http://stackoverflow.com/q/26434134
has text: Any example Eric, please?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26506166
score: 0
has comment: http://stackoverflow.com/comment/41644797
has body: Check if this script even fired. Also here is a good guide with examples about asp.Net form dirty confirmations. &lt;script&gt; var formDirty = false; window.onbeforeunload = function () { var confirmMsg = undefined; if (formDirty) { confirmMsg = "You have unsaved changes on the page"; } return confirmMessage; }; &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/26506063
has comment: http://stackoverflow.com/comment/41644699

http://stackoverflow.com/a/26368447
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26368354
has body: The eq operator in VBScript is =, not ==, so change if retValue == 1 Then to if retValue = 1 Then (everywhere!). Update wrt comment: You should use the MsgBox Constants; passing vbOKCancel - 1 - Display OK and Cancel buttons instead of a magic number like 1 would avoid misleading other people.
type: Answer
accepted answer of: http://stackoverflow.com/q/26368354
score: 4
upvote count: 4

http://stackoverflow.com/q/26502214
type: Question
tagged with: angularjs-directive
tagged with: javascript
has comment: http://stackoverflow.com/comment/41636812
score: 0
has comment: http://stackoverflow.com/comment/41636238
linked to: http://stackoverflow.com/q/13471129
tagged with: angularjs-ng-repeat
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has title: Angular js directive wait for nested ng-repeat finish render
has body: I have a little problem and would really appreciate your helps. Here is the description: I have a "kitchen-view" directive in angular-js application. Inside, it contains several nested "ng-repeat" directives. The content of these directives are dynamic and can change while the application is running. Question: How can I manipulate DOM with simple JQuery code after all the nested "ng-repeat" has finished working(done its job) and after the data has changed inside "ng-repeat"? This is my sample code: {{order.date}} #{{order.id}} Table {{order.table_id}} {{key}} {{order_item.quantity}} x {{order_item.dish.name}}

http://stackoverflow.com/q/26453076
has comment: http://stackoverflow.com/comment/41547063
possible better answer: http://stackoverflow.com/a/26453109
accepted answer: http://stackoverflow.com/a/26453117
has body: function readMessages(data, textStatus) { clearChat = data.clear; if (clearChat == 'true') { $('#chatmessageinner')[0].innerHTML = ""; lastMessageID = -1; } if (data.messages.length &gt; 0) { if(lastMessageID &gt; data.messages[0].id) return; lastMessageID = data.messages[data.messages.length - 1].id; } $.each(data.messages, function(i, message) { var htmlMessage = ""; htmlMessage += "&lt;div class="item" style="color:" + message.color + ""&gt;"; htmlMessage += "[" + message.time + "] " + message.name + " said: &lt;br/&gt;"; htmlMessage += message.message; htmlMessage += "&lt;/div&gt;"; $('#chatmessageinner')[0].innerHTML += htmlMessage; }); } This is function, error is: SyntaxError: missing ; before statement In line $.each(data.messages, function(i, message) { What is wrong? Help me, please.
type: Question
has answer: http://stackoverflow.com/a/26453109
upvote count: 0
tagged with: javascript
tagged with: jquery
has title: SyntaxError: missing ; before statement .each
answer count: 3
has answer: http://stackoverflow.com/a/26453118
score: -2
favorite count: 0
has answer: http://stackoverflow.com/a/26453117
downvote count: 2
has comment: http://stackoverflow.com/comment/41547076
tagged with: each
type: AnsweredQuestion

http://stackoverflow.com/q/26384840
has comment: http://stackoverflow.com/comment/41424568
has title: Autocomplete using Javascript/Json just returns error box
type: Question
has comment: http://stackoverflow.com/comment/41425168
tagged with: c#
has body: I am using a user control which I think might be leading to the problem as the example I followed is referencing an actual aspx default page, but could someone possibly help me out here. I am trying to setup an autocomplete textbox and all I seem to be getting the error popup. Can't figure out where my issue is. I have pasted the entire code with the exception of the Page_Load procedures. HTML <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Search Textbox.ascx.cs" Inherits="StagingApplication.Search.Search_Textbox" %> <asp:TextBox ID="searchText" runat="server" class="textboxLargeInline" AutoCompleteType="Search"></asp:TextBox> <asp:Button ID="searchButton" runat="server" class="standardButton" OnClick="searchButton_Click"/> CODE BEHIND [WebMethod] public static string[] GetCategory(string term) { List<string> retCategory = new List<string>(); string ConnectionString = Connect.Connect("Location"); using (SqlConnection con = new SqlConnection(ConnectionString)) { string query = string.Format("SELECT TOP 1000 [CountryName] FROM [Location].[dbo].[Country] WHERE [CountryName] LIKE '%{0}%'", term); using (SqlCommand cmd = new SqlCommand(query, con)) { con.Open(); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { retCategory.Add(reader.GetString(0)); } } con.Close(); } return retCategory.ToArray(); }
has comment: http://stackoverflow.com/comment/41424778
tagged with: javascript
has comment: http://stackoverflow.com/comment/41423819
tagged with: jquery
has comment: http://stackoverflow.com/comment/41423892
has comment: http://stackoverflow.com/comment/41424643
has comment: http://stackoverflow.com/comment/41425026
upvote count: 1
has comment: http://stackoverflow.com/comment/41424449
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/41425240
type: UnansweredQuestion
answer count: 0
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/41424487
comment on: http://stackoverflow.com/q/26385183
score: 1
type: Comment
has text: If you do not want the user to have to press alt, than you will need to add JavaScript to the page and listen for key presses and do all of the work.
type: QuestionComment

http://stackoverflow.com/q/26434018
tagged with: jquery
has answer: http://stackoverflow.com/a/26434291
has comment: http://stackoverflow.com/comment/41512950
has comment: http://stackoverflow.com/comment/41512830
has title: A merge / concat like method for javascript objects.. not extend
has comment: http://stackoverflow.com/comment/41512982
has answer: http://stackoverflow.com/a/26434098
type: UnansweredQuestion
has body: I would like to join nested objects with similar keys: var obj1 = { id: 1, styles: { background: "white" } }; var obj2 = { id: 2, styles: { border: "1px solid #ccc" } }; var merged = merge(obj1, obj2); // desired outcome merged = { id: 2, styles: { background: "white", border: "1px solid #ccc" } } jQuery's extend method and similar ones that I've seen never concat Object properties, which is excactly what I'm looking for. Other than building this method myself, I'm hoping and quite sure there's already a solution for this..
tagged with: object
type: Question
score: 0
answer count: 2
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/41528370
type: QuestionComment
has text: It really seems like you ought to first address this question to the providers of the form to see what capabilities they provide for responsive layout or an alternate form that works on smaller screens. You may or may not find a work-around with help here, but you also may be missing the supported way to solve this problem if you don't contact the people who provide the form service and ask them.
type: Comment
comment on: http://stackoverflow.com/q/26442465
score: 0

http://stackoverflow.com/q/26394488
has title: Not close jQuery popUp window with asp.net button
type: UnansweredQuestion
type: Question
has body: My popup closes when I click in send button but I need this window to stay open .. please if you can help me - thanks! &lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication23.WebForm1" %&gt; &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt; &lt;title&gt;&lt;/title&gt; &lt;link type="text/css" href="css-js/StyleSheet1.css" rel="stylesheet" /&gt; &lt;link rel="stylesheet" href="NewFolder1/Style.css" type="text/css" /&gt; &lt;script type="text/javascript" src="css-js/jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="css-js/jquery-1.7.1.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="css-js/jquery.validate.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="NewFolder1/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="NewFolder1/custom.js"&gt;&lt;/script&gt; &lt;script&gt; $("document").ready(function() { $("#thumb").click(function () { $("#ovelay").fadeIn("slow"); $("#overlay_div").fadeIn("slow"); }); $(".close_button").click(function () { $("#overlay").fadeOut("fast"); $("#overlay_div").fadeOut("fast"); }) }); &lt;/script&gt; &lt;script type="text/javascript" src="css-js/validate.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt; &lt;img src="css-js/66.jpg" alt="" id="thumb"/&gt;&lt;/div&gt; /&gt; &lt;div id ="overlay"&gt; &lt;/div&gt; &lt;div id = "overlay_div" style="background-color:#B5E655;opacity: 0.83; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 67); /*-ms-filter must come before filter*/ filter: alpha(opacity = 67); /*INNER ELEMENTS MUST NOT BREAK THIS ELEMENTS BOUNDARIES*/ /*All filters must be placed together*"&gt; &lt;div&gt; &lt;div id="container" style="margin-top:30px ; margin-left:0px""&gt; &lt;h1&gt; &amp;nbsp;Contact Me&lt;/h1&gt; &lt;form id="contact_form" runat="server"&gt; &lt;div&gt…
has answer: http://stackoverflow.com/a/26394627
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/26422839
score: 0
type: Answer
has body: If your question is about how to handle opacity of the element in jquery, yes you can do it very elegantly. Here is the API link, http://api.jquery.com/category/effects/fading/ And if you want to play with Fiddle, here it is, http://jsfiddle.net/80kqetf4/ Now coming back to your case, something like below would help, slider.ev.on('rsDragStart', function(event) { // mouse/touch drag start var visibility = &lt;calculate visibility based on slider position&gt;; // 0-min &amp; 1-max $('selector').fadeTo(1000, visibility); }); slider.ev.on('rsDragRelease', function() { // mouse/touch drag end var visibility = &lt;calculate visibility based on slider position&gt;; // 0-min &amp; 1-max $('selector').fadeTo(1000, visibility); }); Of course you could optimize this code further..
answers question: http://stackoverflow.com/q/26421733

http://stackoverflow.com/a/26422932
type: Answer
answers question: http://stackoverflow.com/q/26422806
accepted answer of: http://stackoverflow.com/q/26422806
score: 0
has body: Check this. You got to use .on function instead of the viewFunction. $(function(){ $.get("http://localhost:8080/MusicPlayer/GetSongList", function(data){ console.log(data); var library = data; var table = $("#table body"); var row; library.songs.forEach(function(song){ row = $(" ").data('song-title', song.title); $(" ").addClass("song-select").append($(" ").attr({type:"checkbox",class:"checkbox",value:song.title})).appendTo(row); $(" "+song.title+" ").appendTo(row); $(" "+song.album.albumName+" ").appendTo(row); $(" "+song.artist+" ").appendTo(row); $(" "+song.rating+" ").appendTo(row); $(" "+song.composer+" ").appendTo(row); $(" "+song.genre.genreName+" ").appendTo(row); row.appendTo(table); }); }); }); $('#table tbody').on('click', 'td:not(.song-select)',function () { var songTitle = $(this).parent().data('song-title'); location= "http://localhost:8080/MusicPlayer/getSong?songTitle="+songTitle; }); });
type: AcceptedAnswer

http://stackoverflow.com/q/26445117
has title: Javascript on keypress + sign, how do I retrieve it
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41533177
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41532954
possible better answer: http://stackoverflow.com/a/26445247
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26445247
has answer: http://stackoverflow.com/a/26445266
accepted answer: http://stackoverflow.com/a/26445266
type: Question
answer count: 2
has body: Javascript on keypress + sign, how do I retrieve it Currently I got the following script for my enter key &lt;script type="text/javascript"&gt; $(document).ready(function() { $(function(){ $("input[type=text]").keyup(function(e){ if(e.keyCode == "13") { var nextIndex = $(this).prop('tabindex') + 1; var selectedId = $(this).prop('id'); var rowSplit = selectedId.split("_"); var rowIn = rowSplit[1]; if(selectedId.indexOf("big") &gt; -1) { bigFunction(rowIn) $('[tabindex=' + nextIndex + ']').focus(); } $("form :input").on("keypress", function(e) { return e.keyCode != 13; }); }); &lt;/script&gt; I want it to work for if e.g I got a text field with maxlength 4 I enter 4 random number e.g 1234 and then I press the letter + sign, I want to change focus to next tabindex How do I do it, thanks for helping so much !!

http://stackoverflow.com/q/26473896
has comment: http://stackoverflow.com/comment/41585612
tagged with: javascript
tagged with: jquery
score: 0
has title: hide/display JQuery inline datepicker
has comment: http://stackoverflow.com/comment/41585424
tagged with: datepicker
has comment: http://stackoverflow.com/comment/41586202
duplicate of: http://stackoverflow.com/q/152975
answer count: 0
has body: I'm trying to hide inline datepicker when click somewhere else than datepicker, but it also disappears when click on nextMontButton and previousMonthButton Any idea? &lt;div id="all"&gt; &lt;div id="datepicker"&gt; &lt;/div&gt; //here is datpicker &lt;div id="submitDiv"&gt; //here is submit in datepicker style &lt;input type="submit" name="day" value="Done" id="datePickerSubmit"&gt; &lt;input type="hidden" id="date" name="date" value=""&gt; &lt;/div&gt; &lt;/div&gt; jQuery(document).ready(function(){ jQuery('#datepicker').datepicker({ firstDay: 1, minDate: +2, maxDate: "+1m", dateFormat: "yy-mm-dd", inline: true, altField: '#date' }); }) // HIDES DATETIME PICKER WHEN CKICK SOMEWHERE ELSE $(document).click(function(e) { var target = e.target; if (!$(target).is('#all') &amp;&amp; !$(target).parents().is('#all'))) { document.querySelector("#datepicker").style.display = "none"; document.querySelector("#submitDiv").style.display = "none"; } });
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/152975

http://stackoverflow.com/q/26496820
has body: I need to emulate auto-click on matching elements (links) but I also wan to add the click behavior logic right there on the same line, is it possible? Something like below alert("my Click Behavior"); Instead of the following: jQ('tbody[groupstring^=";#Emergency;#"] a').click(function(){ jQ(this).parent().parent().parent().next().find('td:contains("Emergency")').each(function(){ jQ(this).html(jQ(this).html().replace(/Emergency/g,"Urgent")); }); }) I want to chain the above click behavior directly to the below: jQ('tbody[groupstring^=";#Emergency;#"] a').each(function(){ jQ(this).trigger('click').My Click Behavior(); })
score: 0
tagged with: jquery-events
answer count: 1
tagged with: javascript
tagged with: event-handling
tagged with: jquery
has answer: http://stackoverflow.com/a/26497552
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41626903
has title: Trigger click and chain the click behavior
type: Question

http://stackoverflow.com/comment/41614079
score: 0
type: AnswerComment
has text: FYI, I'm checking out the link you sent above, and trying to do it that way first.
type: Comment
comment on: http://stackoverflow.com/a/26489980

http://stackoverflow.com/a/26481005
score: 1
has body: You can use what's called 'Bracket notation' object['@name'] You should use this method when: (taken from this answer) The property name contains characters not permitted in identifiers, e.g. starts with a digit†, or contains a space or dash (-), e.g. obj["my property"]. You can read up on the topic here
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26480797
answers question: http://stackoverflow.com/q/26480797
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41421432
score: 0
type: AnswerComment
has text: Must be the way im trying to send the accept header request? I edited the original post showing I do get a json return.
comment on: http://stackoverflow.com/a/26383391
type: Comment

http://stackoverflow.com/comment/41594440
type: AnswerComment
type: Comment
has text: @Rudy what's the value of $scope.currentOption.colorID?
comment on: http://stackoverflow.com/a/26478540
score: 0

http://stackoverflow.com/comment/41470776
comment on: http://stackoverflow.com/q/26411248
type: Comment
type: QuestionComment
score: 1
has text: Did you really want to type 'data-roll="button"' (DATA-ROLL), not 'data-role="button"'?

http://stackoverflow.com/q/26369535
accepted answer: http://stackoverflow.com/a/26370116
has comment: http://stackoverflow.com/comment/41396306
tagged with: arrays
tagged with: javascript
tagged with: jquery
has title: How to get all unique elements in for an array of array but keep max count of duplicates
score: 0
has comment: http://stackoverflow.com/comment/41396336
has answer: http://stackoverflow.com/a/26370116
has answer: http://stackoverflow.com/a/26370211
has comment: http://stackoverflow.com/comment/41396397
has answer: http://stackoverflow.com/a/26369982
has comment: http://stackoverflow.com/comment/41396366
has comment: http://stackoverflow.com/comment/41396383
has comment: http://stackoverflow.com/comment/41396337
answer count: 4
has comment: http://stackoverflow.com/comment/41397241
type: AnsweredQuestion
has body: The question doesn't make much sense but not sure how to word it without an example. If someone can word it better, feel free to edit it. Let's say I have an array of arrays such as this: [ ['a', 'a', 'b', 'c'], [], ['d', 'a'], ['b', 'b', 'b', 'e'] ] I would like the output to be: ['a', 'a', 'b', 'b', 'b', 'c', 'd', 'e'] Not sure if there is an easy way to do this in javascript/jquery/underscore. One way I could think of is to look through each of these arrays and count up the number of times each element shows up and keep track of the maximum amount of times it shows up. Then I can recreate it. But that seems pretty slow considering that my arrays can be very large.
type: Question
possible better answer: http://stackoverflow.com/a/26369982
has comment: http://stackoverflow.com/comment/41396458
has comment: http://stackoverflow.com/comment/41397560
has answer: http://stackoverflow.com/a/26369884

http://stackoverflow.com/a/26433434
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26414646
type: Answer
answers question: http://stackoverflow.com/q/26414646
has body: Add the concat task to your watch and that should fix it. watch: { grunt: { files: ['Gruntfile.js'] }, sass: { files: 'scss/**/*.scss', tasks: ['sass'] }, concat: { files: ['js/custom/*.js'], tasks: ['concat'] } }
upvote count: 1

http://stackoverflow.com/comment/41655883
comment on: http://stackoverflow.com/q/26512784
score: 0
type: Comment
type: QuestionComment
has text: less doesn't work in browser, unless you have compiled it to css.

http://stackoverflow.com/q/26477875
has title: How to compare datetime in Javascript?
tagged with: datetime
has answer: http://stackoverflow.com/a/26477925
has comment: http://stackoverflow.com/comment/41592619
favorite count: 0
linked to: http://stackoverflow.com/q/492994
has body: Given var fromDatetime = "10/21/2014 08:00:00"; var toDatetime = "10/21/2014 07:59:59"; Target Need to compare this two given datetime to check if this is a valid datetime inputs. Im thinking that I could use this solution. . var fromDatetime = new date("10/21/2014 08:00:00"); var toDatetime = new date("10/21/2014 07:59:59"); then compare each segment fromDatetime.getFullYear() to toDatetime.getFullYear(), fromDatetime.getMonth() to toDatetime.getMonth(), so on so forth until I get a non equal comparison, then return. My question is. . Is that the best case in comparing datetime in Javascript? Any suggested solutions other than this will be much appreciated. . Thank you in advance.
type: AnsweredQuestion
upvote count: 9
accepted answer: http://stackoverflow.com/a/26477925
has comment: http://stackoverflow.com/comment/41592646
has comment: http://stackoverflow.com/comment/41592630
score: 9
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: comparison

http://stackoverflow.com/comment/41408518
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26376409
has text: can you please provide some code or reference link or some images what you want?
score: 0

http://stackoverflow.com/a/26409368
answers question: http://stackoverflow.com/q/26406331
type: Answer
has body: Now playing: My 40th Aniversary Trips Trip to Elgin Trip to Waco
score: 0

http://stackoverflow.com/a/26367425
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26365113
has body: To avoid the duplication before the while loop, you could do something as simple as this: var it = makeIterator(someArray); while (true) { var current = it.next(); if (current.done) break; console.log(current.value); } But really, in ES6, you'd be doing this: for (var val of makeIterator(someArray)) { console.log(val); } The ES6 iterator protocol is simple in that the Iterator iterface only requires a single method (next) which returns an IteratorResult containing done and optionally value. Once the protocol becomes standard, then anything implementing it will get all of the benefits of language-level statements that support it (like for...of).
score: 2
answers question: http://stackoverflow.com/q/26365113
upvote count: 2
type: Answer

http://stackoverflow.com/a/26387261
score: 19
has comment: http://stackoverflow.com/comment/89162642
upvote count: 19
has comment: http://stackoverflow.com/comment/83504980
has comment: http://stackoverflow.com/comment/89162076
has body: Use moment().format("h:mm:ss") that returns time in a h:mm:ss format. var midnight = "0:00:00"; var now = null; setInterval(function () { now = moment().format("H:mm:ss"); if (now === midnight) { alert("Hi"); } $("#time").text(now); }, 1000); JSFIDDLE A better way would be to compute the seconds until midnight. This is very simple and human readable using MomentJS: // returns the number of seconds until next midnight moment("24:00:00", "hh:mm:ss").diff(moment(), 'seconds'); So, just do: setTimeout( midnightTask, moment("24:00:00", "hh:mm:ss").diff(moment(), 'seconds') ); function midnightTask() { /* do something */ } JSFIDDLE
answers question: http://stackoverflow.com/q/26387052
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26387052
type: Answer

http://stackoverflow.com/comment/41558559
type: Comment
type: QuestionComment
has text: Actually the page hangs in Chrome but not in firefox. In firefox, it works fine.
score: 0
comment on: http://stackoverflow.com/q/26397714

http://stackoverflow.com/comment/41654788
has text: I'm bummed about the down-vote. I'd really appreciate an experienced node developer explaining the magnitude of the difference between the two JavaScript environments. A downvote makes that much less likely
score: 1
comment on: http://stackoverflow.com/q/26512107
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41499784
comment on: http://stackoverflow.com/q/26412032
score: 0
type: QuestionComment
type: Comment
has text: @MichaelCrook i tried the attr still didnt work I found that example somewhere where they were able to bind the grid like I have above

http://stackoverflow.com/q/26368084
tagged with: arrays
has answer: http://stackoverflow.com/a/26368361
tagged with: javascript
tagged with: jquery
score: 0
has title: Searching value in array
has answer: http://stackoverflow.com/a/26368702
has answer: http://stackoverflow.com/a/26368297
has answer: http://stackoverflow.com/a/26368214
has comment: http://stackoverflow.com/comment/41393745
has comment: http://stackoverflow.com/comment/41393340
has body: I have this type of data var rooms = [ {roomID:'room1',memberID:['1111','2222']}, {roomID:'room2',memberID:['1111','3333']}, {roomID:'room2',memberID:['3333','1111']}] var test = ['1111','2222'] OR var test = ['2222','1111'] I want to select the room which have memeberID equal to test i.e room1 should be selected for both value of test Please help.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26368249
possible better answer: http://stackoverflow.com/a/26368214
has answer: http://stackoverflow.com/a/26368258
has answer: http://stackoverflow.com/a/26368197
has answer: http://stackoverflow.com/a/26387498
accepted answer: http://stackoverflow.com/a/26368702
type: Question
answer count: 8
linked to: http://stackoverflow.com/q/12553274

http://stackoverflow.com/a/26492905
has comment: http://stackoverflow.com/comment/41619455
downvote count: 0
has body: If you want it to be an "associative" array, you would need to make the array element an object: var b = [{name:'DFDSF'}]; console.log(b[0].name);
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26492863

http://stackoverflow.com/q/26403889
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/17676521
accepted answer: http://stackoverflow.com/a/26404755
has comment: http://stackoverflow.com/comment/41457897
upvote count: 2
has comment: http://stackoverflow.com/comment/41458158
has comment: http://stackoverflow.com/comment/41456846
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/41457025
type: Question
has body: I asked this question already here, unfortunately the problem could not be solved, so I ask here :) I've got a JQM page in which I show a map. Stupidly, to show the map correctly, I have to reload the page. This is how the map gets displayed on the first load of the page: And this is how it gets displayed after refreshing the page: Here is my code: var map; require([ "esri/map", "dojo/dom", "esri/layers/ArcGISTiledMapServiceLayer", "dojo/domReady!" ], function (Map, dom, Tiled) { map = new Map("map", { logo: false, minZoom: 1, maxZoom: 11 }); var luftbild = new Tiled(URL); map.addLayer(luftbild); }); And this is how I style the map: &lt;style&gt; html, body, #map { padding: 0; margin: 0; height: 100%; } &lt;/style&gt; And how I display it: &lt;div data-role="page" style="background-color:red" ...&gt; &lt;!--Header--&gt; .... &lt;!--/Header--&gt; &lt;!--Content--&gt; &lt;div id="map"&gt; &lt;/div&gt; &lt;!--/Content--&gt; &lt;/div&gt; EDIT: After putting this code of line: $(document).on("pageshow","#page",function(){ // initialize map and show }); the Map looks like this now: Is it possible to set the width and height to 100%?
has answer: http://stackoverflow.com/a/26404755
linked to: http://stackoverflow.com/q/21997604
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41458213
tagged with: arcgis-js-api
has title: Why do I have to reload the page to display the map correctly?
tagged with: arcobjects

http://stackoverflow.com/q/26485459
has answer: http://stackoverflow.com/a/26485523
has answer: http://stackoverflow.com/a/26485526
tagged with: arrays
downvote count: 0
tagged with: javascript
has title: Javascript: object from array, what contains object with id
favorite count: 0
has body: I have an array like this: [ {id: 32, color: 'ff00dd'}, {id: 64, color: 'ab230b'}, {id: 102, color: '5f561d'} ] How can I convert it to this format: { 32: 'ff00dd', 64: 'ab230b', 102: '5f561d'} (LoDash is useable) Thanks in advance!
tagged with: lodash
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26485526
has answer: http://stackoverflow.com/a/26485518
upvote count: 1
type: Question
tagged with: object
score: 1
has comment: http://stackoverflow.com/comment/41605430
possible better answer: http://stackoverflow.com/a/26485523
answer count: 3

http://stackoverflow.com/a/26368695
has comment: http://stackoverflow.com/comment/41394673
has comment: http://stackoverflow.com/comment/41394603
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41394494
downvote count: 0
answers question: http://stackoverflow.com/q/26368602
has comment: http://stackoverflow.com/comment/41394486
type: Answer
has comment: http://stackoverflow.com/comment/41394865
score: 2
has body: The problem is with this line document.getElementById("paragraph"+p).innerHTML = "Paragraph"; You are destroying the html content of your label element. Try to comment it and you will see what you get ! Also, I noticed these line div2.appendChild(text); label.appendChild(div2); div1.appendChild(label); Will produce this output I think what you are trying to do is div2.appendChild(text); div1.appendChild(div2); div1.appendChild(label); That would produce your expected output.
upvote count: 2
has comment: http://stackoverflow.com/comment/41394638
accepted answer of: http://stackoverflow.com/q/26368602

http://stackoverflow.com/comment/41459801
has text: I use Models and Collections. But I only want to render this special Type of Data...there is no need to create an Model.
type: QuestionComment
comment on: http://stackoverflow.com/q/26404780
score: 0
type: Comment

http://stackoverflow.com/comment/41532433
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26444792
has text: A node values sequence is not enough to describe the path, since there can be same values in each level. You need to add some metadata.
score: 0

variant
tags question: http://stackoverflow.com/q/26425501
type: Tag
tag name: variant

http://stackoverflow.com/a/26443174
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26443139
has comment: http://stackoverflow.com/comment/41529299
type: Answer
upvote count: 1
has body: unlink for remove file on server in php unlink("./uploads/filename"); sent ajax request and unlink the file function removeFile(){ $.ajax({ url:'fileDel.php', data:'fllename', dataType:'json', success:function(){ alert("file deleted"); } }); }
accepted answer of: http://stackoverflow.com/q/26443139

http://stackoverflow.com/comment/41516494
has text: If you're willing to stipulate what browser is used, you could use a browser add-on to talk to the USB hardware and have your web page talk to the browser add-on. Any solution will require some custom code installed on the computer though because you can't get to a USB port from a standard browser.
type: Comment
comment on: http://stackoverflow.com/q/26435557
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41438391
has text: Taking the absolute value will return the positive number with the same magnitude. So Math.abs(-10) = 10
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26391449
type: Comment

http://stackoverflow.com/q/26509216
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26509296
tagged with: ajax
tagged with: php
has answer: http://stackoverflow.com/a/26509296
type: AnsweredQuestion
downvote count: 0
has title: Un-usual behavior on AJAX post
score: 1
tagged with: mysql
type: Question
tagged with: javascript
upvote count: 1
has body: When I try to post a symbol ?? two times through AJAX jQuery it posts like this jQuery18306004520743153989_1413985407818. For example if I post this: What ?? then it posts like What jQuery18306004520743153989_1413985407818 and if I post like: What ??? then it posts like this: What jQuery18306004520743153989_1413985407818? &lt;-- Notice the ending one ? Why it is so? My jQuery posting code is: $( ".textbox2" ).on( 'keypress', function (e) { if (e.keyCode == 13 &amp;&amp; !e.shiftKey) { e.preventDefault(); var message = $( "#message" ).val(), privateid = $( "#private" ); if (message == '') { alert( "Message is missing!!" ); return; } if (privateid.is( ':checked' ) ? 1 : 0) { var privateidVal = privateid.val(); } $.ajax( { type : "post", dataType: "json", url : "chat_insert.php", data : "message=" + message + "&amp;private=" + privateidVal + "&amp;action=addcomment", success : function (data) { showComment(); document.getElementById( 'message' ).value = ''; document.getElementById( 'message' ).focus(); document.getElementById( 'private' ).checked = ''; if (data.error) { alert(data.error); } } } ); } } ); and Yes my message column in SQL has collation utf8_general_ci. Please help
answer count: 1

http://stackoverflow.com/comment/41877078
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26419531
has text: Same problem, switching to tlsv1 resolved it for me. Error I was receiving: "Loading resource failed with status=fail:"

http://stackoverflow.com/comment/41554513
has text: @fab Yes, there are some differences but it's the only way to run local script. You are probably providing wrong filepath. Try using absolute one and see if it works.
comment on: http://stackoverflow.com/a/26456916
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41541769
score: 0
comment on: http://stackoverflow.com/q/26450007
has text: jQuery(document).ready(function(){ setTimeout(function(){ jQuery.lightbox("www.mydomain.com/popup.html?lightbox[width]=650&lightbox[height]=480"); },10000); }); Just you will try this code this is just example
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26435044
tagged with: javascript
has title: ng-click not firing with django/angular
answer count: 1
accepted answer: http://stackoverflow.com/a/26443264
favorite count: 0
tagged with: angularjs
upvote count: 2
tagged with: django
has comment: http://stackoverflow.com/comment/41515631
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26443264
type: Question
has body: I have a template which is rendered by Django, and am trying to add some js behavior with angular. It's a pain. here's the form. The ng_controller is a django context variable, set by my view. Search Add Search Results the clicking the Search button works as expected, here's the function search: (search_url) => console.log "Searching..." success = (result) -> $("#search_results").replaceWith(result.data) error = (result) -> console.log "Error: #{result}" url = "#{search_url}/?#{form_data}" @$http.get(url).then(success, error) The problem is that result.data, which is correctly swapped out in the #search_results element contains the ng-click directives that don't fire Do Foo Log Foo When those elements are there (after clicking search) they do nothing except jump to the top of the page, as per the anchor element. No errors or anything. (For the sake of argument, foo() would just call console.log 'foo' My suspicion is that because these directives are added after the page load, they're not actually wired up by angular. So is that correct? And if that's the problem, how can I get them to compile the directives in this scheme, or otherwise get the behavior I'm looking for? I understand that there's issues with manipulating the DOM via jQuery while using Angular, so I'd be grateful for suggestions to tackle the problem by making the replacement code more idiomatic, so long as it can do so by an AJAX request to a Django endpoint.
has comment: http://stackoverflow.com/comment/41528391
downvote count: 0

http://stackoverflow.com/comment/41578666
comment on: http://stackoverflow.com/q/26470334
type: QuestionComment
type: Comment
score: 1
has text: `function toType(x) { return ({}).toString.call(x).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); }` is a nice 1-line replacement for `typeof` that I use regularly.

http://stackoverflow.com/a/26402120
type: Answer
answers question: http://stackoverflow.com/q/26400886
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: No. Fundamentally, there is no significant difference between a robot and a UA operated by a person. Robots can execute JS. Robots can bypass captcha (though image analysis, or feeding them to humans who will translate them for money, or various other techniques). Robots can implement time delays to look less like machines. Etc.
accepted answer of: http://stackoverflow.com/q/26400886

http://stackoverflow.com/q/26471138
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26471208
has body: I have a downloaded CSV file which I would like to parse and use to create JSON objects for each record. The file is on my local machine but I have read that JavaScript has security measures in place that prevent access to these files. Some examples show using csv.js with the following: $.ajax({ url: "G:\downloaded_files\filename.csv", aync: false, success: function (csvd) { csv_as_array = $.csv.toArrays(csvd); }, dataType: "text", complete: function () { // use the array of arrays (variable csv_as_array) // for further processing } }); When running this it just creates a GET request in the console. I am treading on unfamiliar territory here so any explanations would be great. If I was to do this using Ruby I would do this, which hopefully will give you an indication of what I am trying to achieve: require 'csv' class FileRead csv_text = File.read('/home/richardlewis/Downloads/csvtest.csv') csv = CSV.parse(csv_text, headers: true) csv.each do |row| hash = row.to_hash puts(hash) end end I'm hoping this makes sense and someone can point me in the right direction.
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: ruby
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/csv
has title: Reading a CSV file with jQuery

http://stackoverflow.com/comment/41662057
type: Comment
has text: Thank you for your thoughtful answer
comment on: http://stackoverflow.com/a/26513637
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41609098
comment on: http://stackoverflow.com/a/26487029
has text: I guess the issue is in PHP not in JS. Your Js code looks good. Please check PHP code
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41461077
has text: I wasn't sure if that was possible. If you can do it that'd be amazing! :D
comment on: http://stackoverflow.com/q/26402789
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41438406
has text: Maybe because you have padding and/or margin. Use `outerHeight()` or `outerHeight(true)` for that. See the [doc](http://api.jquery.com/outerheight/)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26392117
type: Comment

http://stackoverflow.com/comment/41579198
type: QuestionComment
has text: Ye thats the exact problem. I'll add the answer to how i fixed it. Its a bloody horrible horrible... horrible hac KD:
comment on: http://stackoverflow.com/q/26452359
score: 0
type: Comment

http://stackoverflow.com/q/26467248
has answer: http://stackoverflow.com/a/26478238
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41605195
answer count: 1
has title: Zombie + NodeJS + Express - Errors while working with tabs
accepted answer: http://stackoverflow.com/a/26478238
tagged with: zombie.js
has comment: http://stackoverflow.com/comment/41593162
has body: I'm building a small application using Zombie.js, but tabs dont seem to work properly. My current code follows: // libs used var Zombie = require("zombie"); var assert = require("assert"); var http = require('http'); var express = require('express'); var bodyParser = require('body-parser'); // server port and host configs var server_port = 7777; var server_ip_address = '127.0.0.1' var app = express(); var httpServer = http.Server(app); app.use( bodyParser.json() ); // to support JSON-encoded bodies app.use( bodyParser.urlencoded() ); // to support URL-encoded bodies // o navegador var browser = null, result = "", SITE_URL = 'http://en.wikipedia.org/wiki/Programming_language'; app.get('/', function (response, request) { console.log('GET request received.'); console.log('Opening new tab: ' + SITE_URL); // opens a tab browser.open(SITE_URL); // gets page content result = browser.html('#content'); console.log('Tab open: '+browser.tabs.index); console.log('Content: '+result); request.send(result); }); httpServer.listen(server_port, server_ip_address, function() { console.log('Listening on ' + server_ip_address + ':' + server_port); // creates the browser. browser = new Zombie(); }); But browser.html('#content'); returns nothing. It seems to me that those tabs are open, but when I try to extract data from the current open tab, by using the browser object, it never works. Am I doing the right way? Whats the 'right way' of working with tabs in Zombie 2.0.8 ? I just cant find any information/tutorial and the oficial docs arent clear enough for me. EDIT: As pointed by P.scheit, open(url) was not enough. Heres the main resulting code: app.get('/', function (request, response) { console.log('GET request received.'); if (request.query.url &amp;&amp; request.query.selector) { console.log('Opening new tab: ' + request.query.url); browser.open(request.query.url); browser.visit(request.query.url, function () { result = browser.html(request.query.selector); console.log('Loaded tab co…

http://stackoverflow.com/comment/41461702
score: 0
type: AnswerComment
has text: Thanks Gustav & Derek, your solutions seems not working in my code something i'm doing wrong now missile not moving any ware. Can you make quick fiddle?
type: Comment
comment on: http://stackoverflow.com/a/26405773

radgrid
tags question: http://stackoverflow.com/q/26407127
type: Tag
tag name: radgrid

http://stackoverflow.com/comment/41571015
has text: @JensonMJohn: I think I couldn't explain my question well... I mean I want to disable auto-complete feature for actors name or TV-Series, so if I type tom.. it shouldn't show me "Tom Criuse".. I hope I could clarify
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26465916

http://stackoverflow.com/a/26378600
type: Answer
has body: Using JQuery: See here to scroll and animate to your ID. To add your class after scrolling past your ID use: //assign the window and all the contents into variables //instead of going and grabbing it from the DOM on every scroll var $window = $(window), $content = $('.content'); $window.scroll(function () { $content.each(function () { //for each element that has a class of content //check its position and add SomeClass if ($window.scrollTop() &gt;= $(this).position().top) { $(this).addClass('SomeClass'); } else if ($window.scrollTop() &lt;= $(this).position().top) { //if window position is less then remove it $(this).removeClass('SomeClass'); } }); });
has comment: http://stackoverflow.com/comment/41413179
has comment: http://stackoverflow.com/comment/41412489
has comment: http://stackoverflow.com/comment/41419734
has comment: http://stackoverflow.com/comment/41415062
has comment: http://stackoverflow.com/comment/41421251
answers question: http://stackoverflow.com/q/26378308
score: 0

maxscript
tags question: http://stackoverflow.com/q/26483167
type: Tag
tag name: maxscript

http://stackoverflow.com/comment/41491262
type: Comment
has text: btw, the "they have many upvotes" argument is tired and lacking in merit: the masses are ignorant.
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/26422909

http://stackoverflow.com/q/26472210
type: Question
has answer: http://stackoverflow.com/a/26496477
tagged with: canvas
tagged with: google-visualization
has comment: http://stackoverflow.com/comment/41582768
tagged with: javascript
tagged with: image
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41582595
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41583163
upvote count: 1
has body: I have a calender chart being created using the Google Charts API. I have been looking for a way to print the chart as png and I haven't been able to find a good working answer. Since getImageURI() is not a method listed for Calendar Charts so I can't use the Printing PNG Charts guidelines on Google Developer either. Update: I was able to find this tutorial which has been helpful in downloading the image but the issue is that the filename of the file being downloaded is the image bytecode and the solution offered on this page by greenthumb doesn't work properly. Using the package downloaded from CanvasSaver GitHub which was linked to on the greenthumb page, the file downloaded upon clicking the save image button is the saveme.php file and not the actual image. I have tried placing obj_close(); before echo $decoded; in saveme.php but that hasn't helped solve the issue either. All help is greatly appreciated.
has title: Alternative to getimageuri() for google charts calendar
score: 1
has comment: http://stackoverflow.com/comment/41582295

http://stackoverflow.com/comment/41685127
score: 0
type: AnswerComment
type: Comment
has text: Change speed to 1 instead of 0.03, you will see that it moves :)
comment on: http://stackoverflow.com/a/26405773

http://stackoverflow.com/comment/41559747
comment on: http://stackoverflow.com/q/26459454
type: QuestionComment
has text: `order deny,allow deny from all allow from [ip]` and this is for htaccess [Htaccess: Deny all, allow only one ip](http://stackoverflow.com/a/4400412/1700963)
score: 0
type: Comment

http://stackoverflow.com/comment/41587334
type: QuestionComment
score: 0
has text: will do so tomorrow, since I don't have access to the code at home
comment on: http://stackoverflow.com/q/26474858
type: Comment

http://stackoverflow.com/comment/41410761
type: Comment
has text: @AdrianoRepetti using windows authentication only works on intranet but not in internet isnt it ?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26360544

http://stackoverflow.com/a/26417845
has body: First of all, having scripts inside partial views is not recommended, so I'll illustrate my answer using a non-partial view. What you are asking is not possible, however you could certainly have something like this in your Partial View's Parent view: @model MyProject.Models.ParentModel ... &lt;script src=".../myScript.js"&gt;&lt;script&gt; ... &lt;span&gt; ... @Html.DisplayFor(model =&gt; model) ... &lt;/span&gt; ... &lt;script&gt; $(document).ready(function(){ var jsVariable = '@Model.MyModelVariable' }) &lt;script&gt; ... That way you'll get in your script the benefits of a strongly typed model, although note that this violates the unobtrusive js principles... However, making a rational use is harmless. I find a good practice to use the Module pattern like this: &lt;script&gt; $(document).ready(function(){ var mod = new MyModule({ foo : '@Model.Foo', bazSelector: '@Html.NameFor(model =&gt; model.Baz).ToString()' // ... other module options }) }); &lt;script&gt; Then in your external file you can have your module: function MyModule(options){ // use the options created from a strongly typed model... }
accepted answer of: http://stackoverflow.com/q/26417751
answers question: http://stackoverflow.com/q/26417751
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41485094
score: 0
type: Answer

http://stackoverflow.com/a/26401505
has body: There are a couple or three errors in your code. Assuming country has a list of countries and state keeps the states of the country... country = ["USA"]; state = {"USA": [["NewYork","NY"],["Ohio","Oh"]] }; for (var i = 0; i &lt; state[country[0]].length; i++) { var key = state[country[0]] [i][0]; var value = state[country[0]] [i][1]; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26401253

http://stackoverflow.com/comment/41514264
type: Comment
has text: Sure thing, check the info before JSFIDDLE in a minute.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26434475

http://stackoverflow.com/comment/41451926
score: 0
type: Comment
type: QuestionComment
has text: By validation failing, you mean following condition is satisfying? ($('#'+namespaceInJs+'issueNumber').val()==null || $('#'+namespaceInJs+'issueNumber').val()== '')
comment on: http://stackoverflow.com/q/26400739

http://stackoverflow.com/comment/41540475
type: Comment
type: QuestionComment
has text: You need to remember that `.bind()` takes a `thisArg` before the list of bound arguments, which is what the `this` value within the function will be bound to.
score: 0
comment on: http://stackoverflow.com/q/26449370

http://stackoverflow.com/comment/41631088
type: AnswerComment
score: 0
type: Comment
has text: Not always reliable. Sometimes your not even in a terminal and it's running. That's why I specifically stated **other than CTRL + ALT + C**.
comment on: http://stackoverflow.com/a/26497097

oop
tags question: http://stackoverflow.com/q/26358531
tags question: http://stackoverflow.com/q/26412567
tags question: http://stackoverflow.com/q/26359891
tag name: oop
tags question: http://stackoverflow.com/q/26509976
tags question: http://stackoverflow.com/q/26484805
tags question: http://stackoverflow.com/q/26491118
tags question: http://stackoverflow.com/q/26497765
tags question: http://stackoverflow.com/q/26404194
tags question: http://stackoverflow.com/q/26421476
tags question: http://stackoverflow.com/q/26374706
type: Tag

http://stackoverflow.com/a/26405168
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26404836
has body: Add an ID to form and checkbox, for example: "form1", "checkbox1" &lt;form id="form1" ...&gt; &lt;input type="checkbox" id="checkbox1" ... /&gt; ... &lt;/form&gt; Then add jQuery to current code: $('#form1 button[type="submit"]').click(function(e){ e.preventDefault(); // this for prevent form from submit if($(this).val() == "Approve"){ // check if third button was clicked if($('#form1 #checkbox1').is(':checked')){ // check if checkbox is checked $('#form1').submit(); // submit form }else{ // here paste your info code, that checkbox is not checked } }else{ // any other button $('#form1').submit(); } });
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26404836
type: AcceptedAnswer

developer-tools
tags question: http://stackoverflow.com/q/26505189
type: Tag
tag name: developer-tools

http://stackoverflow.com/q/26424805
has comment: http://stackoverflow.com/comment/41495042
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/5250244
tagged with: jquery
has body: For the site I am developing, I use a form to update the different fields of a model. Some of those fields need to be updated according to the values of others. For example, each instance of a Task, has a start date, an end date, and a length which have to verify the following : End = Start + Length (where weekends are not counted, but that is a secondary issue). So one of the functions I am trying to write would do : When the user changes the value of the input Start_date Get that date from the input field Get the value of the field Length Update the value of the input "End date" with (Start_date + Length) The three inputs concerned by my example have the following IDs : id_start, id_length, id_finish. Here is what I have written, but which doesn't work at all (nothing visible happens...) : Any hint at a solution to make it work would be hugely appreciated.
accepted answer: http://stackoverflow.com/a/26425572
tagged with: jquery-events
linked to: http://stackoverflow.com/q/6471959
has comment: http://stackoverflow.com/comment/41495271
has comment: http://stackoverflow.com/comment/41495892
type: AnsweredQuestion
has title: JavaScript to update End Date when Start Date is changed
has comment: http://stackoverflow.com/comment/41494989
score: 0
has comment: http://stackoverflow.com/comment/41495081
type: Question
has comment: http://stackoverflow.com/comment/41495294
has comment: http://stackoverflow.com/comment/41495383
has comment: http://stackoverflow.com/comment/41496398
has answer: http://stackoverflow.com/a/26425572
has comment: http://stackoverflow.com/comment/41494905
tagged with: forms
has comment: http://stackoverflow.com/comment/41496319
has comment: http://stackoverflow.com/comment/41495136

http://stackoverflow.com/a/26488640
has comment: http://stackoverflow.com/comment/99313334
has comment: http://stackoverflow.com/comment/107824899
has comment: http://stackoverflow.com/comment/107825691
type: Answer
accepted answer of: http://stackoverflow.com/q/26488043
answers question: http://stackoverflow.com/q/26488043
upvote count: 21
downvote count: 1
has comment: http://stackoverflow.com/comment/41611976
has comment: http://stackoverflow.com/comment/107826305
score: 20
has comment: http://stackoverflow.com/comment/71298182
has comment: http://stackoverflow.com/comment/41611813
has body: var myVariable = "28 Aug 2014" var makeDate = new Date(myVariable); makeDate = new Date(makeDate.setMonth(makeDate.getMonth() - 1)); Update: A shorter version: var myVariable = "28 Aug 2014" var makeDate = new Date(myVariable); console.log('Original date: ', makeDate.toString()); makeDate.setMonth(makeDate.getMonth() - 1); console.log('After subtracting a month: ', makeDate.toString()); Update 2: If you don't want to deal with corner cases just use moment.js. Native JavaScript API for Date is bad.
type: AcceptedAnswer

http://stackoverflow.com/comment/41627137
has text: Seems, you have set the fadeTo-parameters wrong. See jquery API documentation: .fadeTo( duration, opacity [, complete ] ) http://api.jquery.com/fadeto/
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26496966

http://stackoverflow.com/q/26380086
favorite count: 0
has answer: http://stackoverflow.com/a/26381899
score: 4
downvote count: 1
accepted answer: http://stackoverflow.com/a/26381899
type: AnsweredQuestion
has body: Here is the code on jsfiddle Run Sync 1 Run Sync 2 Run Async http://jsfiddle.net/himaneasy/y1534ths/ when I click 'Run Sync 1' the code will run to 999 directly. When I click 'Run Sync 2',the code will run to 999 directly. When I click 'Run Async',the page will render one by one. Can anyone help explain the difference between Run Sync1 & Run Sync2? Why setTimeout in Run Sync 2 does not make it render one by one?
possible better answer: http://stackoverflow.com/a/26381956
tagged with: performance
linked to: http://stackoverflow.com/q/21718774
tagged with: settimeout
has answer: http://stackoverflow.com/a/26381956
has title: How browser executes Javascript and renders asynchronously
upvote count: 5
tagged with: dom
type: Question
answer count: 2
tagged with: javascript
tagged with: dom-events

http://stackoverflow.com/q/26489990
answer count: 1
has answer: http://stackoverflow.com/a/26493943
tagged with: google-closure
tagged with: google-closure-library
has body: I am using google closure, I am currently trying to use the timezonelist class which is http://docs.closure-library.googlecode.com/git/local_closure_goog_locale_timezonelist.js.html The thing is that any functions in this class depends on goog.locale.TimeZoneAllLongNames__ available from go/js_locale_data. Users of this method must add a dependency on this according to the documentation. I do not understand what does this mean and www.go/js_local_data is not a valid link, any help how to get this to work is appreciated
type: AnsweredQuestion
has title: Google closure timezone
type: Question
accepted answer: http://stackoverflow.com/a/26493943
tagged with: javascript
score: 0

http://stackoverflow.com/a/26354987
has body: Apparently, I have to modify the plugin. Have to set the "hours" to be less than 48 hours. var words = seconds &lt; 45 &amp;&amp; substitute($l.seconds, Math.round(seconds)) || hours &lt; 48 &amp;&amp; substitute($l.hours, Math.round(hours)) ||
upvote count: 1
answers question: http://stackoverflow.com/q/26354167
has comment: http://stackoverflow.com/comment/41369318
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/26390526
has title: how much rows handsontable can load?
tagged with: jquery
type: Question
has body: Exception in queued task: Error: Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars. at WalkontableTable._doDraw (client/libs/handsontable-0.10.5/jquery.handsontable.full.js?37b46fd989b9a974c3501865b51effd7adec37e4:12859:15) at WalkontableTable.draw (client/libs/handsontable-0.10.5/jquery.handsontable.full.js?37b46fd989b9a974c3501865b51effd7adec37e4:12760:10) at Walkontable.draw (client/libs/handsontable-0.10.5/jquery.handsontable.full.js?37b46fd989b9a974c3501865b51effd7adec37e4:10435:16) at Handsontable.TableView.render (client/libs/handsontable-0.10.5/jquery.handsontable.full.js?37b46fd989b9a974c3501865b51effd7adec37e4:2781:11) at Object.selection.selection.refreshBorders (client/libs/handsontable-0.10.5/jquery.handsontable.full.js?37b46fd989b9a974c3501865b51effd7adec37e4:646:21) at render (client/libs/handsontable-0.10.5/jquery.handsontable.full.js?37b46fd989b9a974c3501865b51effd7adec37e4:1398:17) at $.fn.handsontable (client/libs/handsontable-0.10.5/jquery.handsontable.full.js?37b46fd989b9a974c3501865b51effd7adec37e4:2382:35) i got this error at client browser console when i load more than 1500 rows in handsontable-10.0.5, currently i used data binding to load these amount of rows is there any way to load more than 1500 rows in handsontable ?
has answer: http://stackoverflow.com/a/26631938
tagged with: handsontable
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/26459753
has title: how can js(jquery) run before image is loaded
answer count: 3
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41559604
has answer: http://stackoverflow.com/a/26459835
has comment: http://stackoverflow.com/comment/41559771
has answer: http://stackoverflow.com/a/26460189
has answer: http://stackoverflow.com/a/26459840
has comment: http://stackoverflow.com/comment/41559296
has body: I want to change image url when the images are not loaded in html DOM. (before browser loads image) Can js do this? demo code: ... &lt;body&gt; &lt;img src="old src"&gt; &lt;!-- this **HTML** is loaded from a database and i want to change this src using javascript--&gt; &lt;/body&gt; .... I tried $(function(){$(img).attr('src','new src');}); //it is can work ,but the brower will load old image first. then the js will run. Beacause the HTML is loaded from a database, I have no idea how to operate html string in server code(java). so i want use js to change image src. EDIT: for example: old src = "old domain/test.jpg" i want to change it to "right domian2(CDN)/test_width_height.jpg" the old src is not in server, so the brower will get 404 error from server first. when the src change to new src, then brower will reload image from new src, then the correct image will display. i do not want the borwer 404 error first, i just want the browser to load the right image from the right address.
score: 1
upvote count: 1
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/41559242
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41559112
tagged with: image

http://stackoverflow.com/comment/41648427
type: Comment
has text: [Put the `get` immediately after the `find`, then replace `map` with `every`, and you're spot on](http://stackoverflow.com/a/26509036/356541).
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26508927

http://stackoverflow.com/comment/41648538
has text: This is what I to resorted to, thanks for the response
type: AnswerComment
comment on: http://stackoverflow.com/a/26507951
score: 0
type: Comment

http://stackoverflow.com/a/26438114
type: Answer
has comment: http://stackoverflow.com/comment/41628763
has comment: http://stackoverflow.com/comment/41568283
has comment: http://stackoverflow.com/comment/41530665
score: 0
answers question: http://stackoverflow.com/q/26434817
has body: The code that runs in the context of chrome://test_addon/content/data/index.html is not sandboxed, so it can't access the SDK APIs.

http://stackoverflow.com/a/26403426
type: Answer
answers question: http://stackoverflow.com/q/26362622
score: 0
has body: Assuming you're using MVC 3 or higher, you need to include the "messages" and "methods" locale files for the jQuery validation plugin that MVC uses. You can get them here: https://github.com/jzaefferer/jquery-validation/tree/master/src/localization messages_nl.js methods_nl.js Unfortunately, the methods_nl.js file lacks a number validator that would match the decimal format you're using. According to the Decimal mark Wiki article, in the Netherlands, the format you're using is generally only used for currency. The number validator is probably not overridden because of this, so you may need to add one yourself: $.extend($.validator.methods, { date: function(value, element) { return this.optional(element) || /^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(value); }, // Add this: number: function(value, element) { return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value); } }); To avoid overriding the general number format, you may want to add it as a custom validation method instead (use a different attribute name): $.extend($.validator.methods, { date: function(value, element) { return this.optional(element) || /^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(value); }, // Add this: currency: function(value, element) { return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value); } }); You will then have to build custom validation classes as described in this article: http://www.devtrends.co.uk/blog/the-complete-guide-to-validation-in-asp.net-mvc-3-part-2 In the class derived from ModelClientValidationRule, you can specify the validation type as "currency". You will register that subclass to glue it all together. Good luck!

http://stackoverflow.com/comment/41435595
comment on: http://stackoverflow.com/a/26386793
has text: I loved this answer so much I implemented the algorithm in JS as well, running over at http://jsbin.com/mutaracihafi/1/edit
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26368354
type: AnsweredQuestion
tagged with: vbscript
type: Question
has body: I used to have a script (msgbox.vbs) that was this: Set objArgs = WScript.Arguments messageTitle = objArgs(0) messageText = objArgs(1) MsgBox messageText, 1, messageTitle I'm new to coding, and I've never coded in VBScript before, but I needed to change this script so that I can read from my JavaScript script that calls this script whether a user clicked OK or Cancel in the dialogue box that appeared when the MsgBox dialog box gets brought up. So I tried this: Set objArgs = WScript.Arguments messageTitle = objArgs(0) messageText = objArgs(1) retValue = MsgBox (messageText, 1, messageTitle) if retValue == 1 Then WScript.Quit 11 ElseIf retValue == 2 Then WScript.Quit 22 Else End If I figured I'd try and get the return value from MsgBox from what I learned here and then write an if then else statement to get it to quit with an error code that I can read from my callback function in JS that reads the quit code. From the first script, I was getting an error code of 0, and the dialog box was coming up beautifully. Now, with my new code, I am getting an error code of 1 and the dialog box no longer appears :( I miss the dialog box, I need it. I also need to know which button the user clicks so I can get on with the rest of my program. Thanks in advance for any help, I really appreciate it! Here's the Javascript that calls the .vbs if you're curious (just an edited version of the NPM found here): /* By Tomas Pollak &lt;tomas@forkhq.com&gt;. MIT License. */ var join = require('path').join, spawn = require('child_process').spawn; var Dialog = module.exports = { info: function(str, title, callback){ this.show('info', str, title, callback); }, warn: function(str, title, callback){ this.show('warning', str, title, callback); }, show: function(type, str, title, callback){ if (!str || str.trim() == '') throw('Empty or no string passed!'); if (typeof title == 'function') { callback = title; title = null; } var cmd = [], title = title ? title : 'Important'; var str = (str+'').replace…
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26368447
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26368447
upvote count: 2
has title: I need to know what a user does with MsgBox. Very basic VBScript
tagged with: node.js
score: 2

http://stackoverflow.com/q/26467946
has body: I read articles about $digest cycle and $scope.$apply() as many as possible, but couldn't get to the point how to change my data on the callback. This is my method: vm.showAllResults = showAllResults; function showAllResults(){ // Prevent 'bubbling' event.preventDefault(); event.stopPropagation(); // Second parameter notifies search to show full list of elements vm.search(vm.input.query, true); $scope.$apply(function(){ vm.showAll = false; }); } vm.search(vm.input.query, true) - is doing some async work with vm.showAll too. Afterwards I want to set it as false. But I can't get inside of $scope.$apply(). What am I doing wrong? Thanks!
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41574315
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41574073
has answer: http://stackoverflow.com/a/26469125
has comment: http://stackoverflow.com/comment/41574034
has comment: http://stackoverflow.com/comment/41573604
has comment: http://stackoverflow.com/comment/41573838
score: 1
has comment: http://stackoverflow.com/comment/41574230
has comment: http://stackoverflow.com/comment/41573783
has comment: http://stackoverflow.com/comment/41573941
type: Question
has comment: http://stackoverflow.com/comment/41573900
has comment: http://stackoverflow.com/comment/41573566
downvote count: 0
tagged with: javascript
has title: Callback is never called
has comment: http://stackoverflow.com/comment/41573636
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41573570

http://stackoverflow.com/q/26381069
has comment: http://stackoverflow.com/comment/41418668
has comment: http://stackoverflow.com/comment/41422334
has answer: http://stackoverflow.com/a/26384945
upvote count: 1
has title: Retain textbox value on return to same button
tagged with: php
answer count: 1
accepted answer: http://stackoverflow.com/a/26384945
tagged with: laravel-4
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: Question
has body: The question look quite confusing but here is what i need, I use snipe IT ams application which is built on laravel framework. I have a html page with a textbox and two radio button namely automatic and manual when user clicks on automatic button a php function is called and a random number is generated and the textbox field will become disabled on the other hand whenever a user clicks the manual button the textbox field must become enabled and the user can enter a value in the textbox field. has('asset_number') ? ' has-error' : '' }}"> @lang('admin/assetdetails/form.number') asset_number) }}" /> {{ $errors->first('asset_number', ' :message') }} automatic) }}" class="align-check1"> @lang('admin/assetdetails/form.auto') manual) }}"> @lang('admin/assetdetails/form.manual') /* CreateRandomNumber Function */ /* This function is written seperately in a php file */ <?php function CreateRandomNumber() { $letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $numbers = rand(100, 999999); $prefix = "SS-"; $randomNumber = $prefix . $numbers ; echo $randomNumber; } ?> Now the problem is whenever a user clicks on automatic a number is getting generated and if returned back to manual the text field gets enabled as expected, but i need do design it in such a way that if the user return backs to automatic button the pre-generated number must be display in the textfield. Please note that the form is not yet submitted i need to store the generated random number in a variable and get the same number back when gets backs to the automatic field i do know how to achieve this please help me i am new to php and laravel.

http://stackoverflow.com/comment/41627413
has text: It does generate a sitemap, just not as a static file. It sounds like you want something like [Screaming Frog](http://www.screamingfrog.co.uk/seo-spider/)
comment on: http://stackoverflow.com/q/26493391
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26383688
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26383780
has title: setting viewmodel property to be an item from a list
tagged with: knockout.js
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: ok so i have my view model function viewModel(calendarData) { var self = this; self.Calendars = ko.mapping.fromJS(calendarData); self.ViewedCalendar = {};//what can/should i set this to be on initial creation? self.DisplayCalendar = function (calendar) { self.ViewedCalendar = calendar; }; }; I then have my html: 0"> You have calendars Calendars events View Your are viewing What I am trying to achieve is when the user clicks View for a given calendar, that via DisplayCalendar() I set the property ViewedCalendar to be set to the given calendar. This then shows my div that contains the label stating what calendar is being viewed. This is all rough code at the minute just to get the basic functionality in place but I'm new to knockout so could use some help. I'm getting TypeError: ViewedCalendar is not a function or ViewedCalendar is undefined. Any help would be much appreciated.
has answer: http://stackoverflow.com/a/26383780

http://stackoverflow.com/comment/41663181
type: QuestionComment
comment on: http://stackoverflow.com/q/26509773
score: 0
has text: Do you want use different layouts for different pages?
type: Comment

http://stackoverflow.com/q/26357653
score: 0
has comment: http://stackoverflow.com/comment/41373895
has body: On ducument load i protecting my form from 'not safe' submit: $("#my_form").submit(function(event){event.preventDefault();}); And after button click form are checked and should be submited but nothing happens: $('#submit_b').click(function(){ if ($('input[name=site]:checked', '#my_form').attr('id') == 'E1') { //alert('ok' + $('input[name=site]:checked', '#my_form').attr('id') ); $('#my_form')[0].submit(); } else { if (($('input[name=site]:checked', '#my_form').attr('id') !== 'E1') &amp;&amp; ($('input[name=site]:checked', '#my_form').attr('id') !== 'OTR')) { //alert('Not E ' + $('input[name=site]:checked', '#my_form').attr('id') ); $('#my_form')[0].submit(); } else { if ($('input[name=site]:checked', '#my_form').attr('id') == 'OTR'){ //alert('other'); $('#my_form')[0].submit(); } } } });
has comment: http://stackoverflow.com/comment/41373860
has title: form not been submited after jquery validation
answer count: 3
has comment: http://stackoverflow.com/comment/41374007
has comment: http://stackoverflow.com/comment/41373847
has comment: http://stackoverflow.com/comment/41373998
favorite count: 0
has comment: http://stackoverflow.com/comment/41373972
possible better answer: http://stackoverflow.com/a/26357810
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26357810
has answer: http://stackoverflow.com/a/26358642
upvote count: 1
has comment: http://stackoverflow.com/comment/41373910
tagged with: forms
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26358642
has answer: http://stackoverflow.com/a/26357816
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41373869
has comment: http://stackoverflow.com/comment/41374052
has comment: http://stackoverflow.com/comment/41373964

http://stackoverflow.com/q/26469495
has comment: http://stackoverflow.com/comment/41576805
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41576711
answer count: 2
accepted answer: http://stackoverflow.com/a/26470238
downvote count: 3
has answer: http://stackoverflow.com/a/26469675
has title: Match input value and array
tagged with: arrays
possible better answer: http://stackoverflow.com/a/26469675
tagged with: javascript
score: -3
type: AnsweredQuestion
upvote count: 0
has body: I am confusing about match the input value and array. I have a input box which can enter author name: Author's name: And there are three authors in total, and I put them in an array: var authorName =["a","b","c"]; There are three books match these authors in a drop down list: Select Book: - My Decade In The Premier League Harry Potter Twilight Here is a textarea to show the information of the book; If user input "a" and choose drop down list "q", give the information "x"; If user input "b" and choose drop down list "r", give the information "y"; if user input "c" and choose drop down list "s", give the information "z"; If the input name is not in the array or not match the book name. The textarea box will output "author name is incorrect!" I don't know how to do that.
has answer: http://stackoverflow.com/a/26470238

http://stackoverflow.com/a/26435877
answers question: http://stackoverflow.com/q/26401687
accepted answer of: http://stackoverflow.com/q/26401687
score: 0
type: AcceptedAnswer
has body: There are variety of plugins you can use this purpose. If you are JavaScript needs to be loaded in the HEAD tags, most of these components allow it. Read the component descriptions to get a better idea. http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-modules
type: Answer

http://stackoverflow.com/q/26354472
tagged with: php
score: 31
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/36494235
type: Question
accepted answer: http://stackoverflow.com/a/26354847
downvote count: 0
tagged with: javascript
tagged with: latitude-longitude
favorite count: 0
has title: How can I get user's location without asking for the permission or if user permitted once so need not to ask ever again?
has answer: http://stackoverflow.com/a/74807804
has body: I am creating a portal using MySQL, JavaScript and Ajax and I want to fetch user's location in terms of latitude and longitude. if it is not possible to fetch the location without asking then once user grant the permission, I could fetch the location from any page without asking ever again. Thanks in Advance.
answer count: 4
upvote count: 31
has answer: http://stackoverflow.com/a/26354632
has answer: http://stackoverflow.com/a/26354847
has answer: http://stackoverflow.com/a/36494235

sha
tags question: http://stackoverflow.com/q/26402497
tag name: sha
type: Tag

http://stackoverflow.com/a/26486925
score: 0
type: Answer
has body: I guess there is no issue with the code, you just alert / console.log the data inside the success, please see the sample below, $.ajax({ type: 'POST', url: '/Module/findByType', dataType: 'json', data: { request: 'ajax', type_id: id }, success: function (data) { var i = 0; console.log("Value of i:" + i); console.log("Result:" + data); })
answers question: http://stackoverflow.com/q/26486781
has comment: http://stackoverflow.com/comment/41608144

http://stackoverflow.com/a/26390963
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41478374
has comment: http://stackoverflow.com/comment/41478760
has comment: http://stackoverflow.com/comment/41478276
has comment: http://stackoverflow.com/comment/41846295
type: Answer
has body: You probably should do it this way, by handling the scope on a separate route: #router this.resource("scope", { path: "/scope/:scope" }, function() { this.route("categories", { path: "/select-category" } } ); This way you can handle scope nicely in the ScopeRoute, with a proper scope parameter.
accepted answer of: http://stackoverflow.com/q/26388894
has comment: http://stackoverflow.com/comment/41478041
answers question: http://stackoverflow.com/q/26388894
has comment: http://stackoverflow.com/comment/41856419
score: 0
has comment: http://stackoverflow.com/comment/41474218

http://stackoverflow.com/a/26409875
type: Answer
has comment: http://stackoverflow.com/comment/41468421
has comment: http://stackoverflow.com/comment/41468382
accepted answer of: http://stackoverflow.com/q/26409331
has body: When running parseInt() on an empty string (which is what you get when getting the .value of an empty text field) it will return NaN. Simple solution is to just add an additional check. if(x==null || x=="" || x.toString()=="NaN"){}
upvote count: 1
answers question: http://stackoverflow.com/q/26409331
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41468467

http://stackoverflow.com/comment/41497561
has text: Nevermind I figured it out. I will put the solution in an answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/26414611
score: 0
type: Comment

http://stackoverflow.com/comment/41551417
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26454578
has text: You may be getting to 0 with no digest() cycle to update. There is a callback - 'finishCallback' that may be more appropriate in the case, look at timer about line#242-ish.

http://stackoverflow.com/comment/41605825
has text: It's a pretty new feature :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26485516

http://stackoverflow.com/q/26387637
has answer: http://stackoverflow.com/a/26387874
has comment: http://stackoverflow.com/comment/41430613
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41429279
type: Question
has answer: http://stackoverflow.com/a/26388669
has body: just a little bit stuck at the moment I know how to show and hide divs using jQuery, one thing I have not been able to find out is how to hide and show divs based on there numerical value. Here is a small example of my code: £10,989 Mileage: 49,695 As you can see this HTML contains a h3 with the class of 'price-listing', I want to show and hide the div with the class of 'makes' based on whether the 'price-listing' div contains the value that the form is filtering. Just so you know there is a list of these 'make' divs on my page with different values. Right so to my form I currently have this form: Min price £0 £500 ... Max price £0 £500 ... So the first select element is to hide the values in the h3 that have a smaller numerical value than the option selected. The second select element is to hide any h3s with values higher than the numerical value option selected. I could give the price a value if one is needed just like I have with the li in the first example. Could anyone show me a code example on how this might be done? Thanks.
has title: Hide divs based on two select elements numerically
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26389210
has comment: http://stackoverflow.com/comment/41429193
has comment: http://stackoverflow.com/comment/41429188
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41429306
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26388669
possible better answer: http://stackoverflow.com/a/26387874

http://stackoverflow.com/q/26496720
has answer: http://stackoverflow.com/a/26496891
score: 4
has answer: http://stackoverflow.com/a/26496744
has answer: http://stackoverflow.com/a/26496746
upvote count: 4
has answer: http://stackoverflow.com/a/26496757
has body: I want to select certain HTML elements in a DIV. Something like this: $("#foo table,tr,td,span,p" ).addClass( Myclass ); But it adds the class also outside of DIV "#foo". I.e. only the elements in div "#foo" are the class "Myclass" to add. Thanks.
has comment: http://stackoverflow.com/comment/41626487
possible better answer: http://stackoverflow.com/a/26496744
downvote count: 0
has comment: http://stackoverflow.com/comment/41626470
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26496797
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/26496757
type: Question
type: AnsweredQuestion
has title: How can I select certain HTML-Element in div

http://stackoverflow.com/comment/41514885
score: 0
type: Comment
has text: i think your forgot to put something after "along these lines". i have the answers variable as an array currently
type: AnswerComment
comment on: http://stackoverflow.com/a/26432925

http://stackoverflow.com/q/26488693
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41612571
tagged with: forms
has answer: http://stackoverflow.com/a/26489494
has title: Looping through function causes error and fails on first change
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41611729
has comment: http://stackoverflow.com/comment/41611865
has comment: http://stackoverflow.com/comment/41612907
score: 2
type: AnsweredQuestion
tagged with: validation
has body: I have here the following script which is causing me some errors: var sections = ["#general_info", "#address_records", "#employment_history", "#driver_experience", "#military_experience", "#eeo_survey", "#psp_notice", "#eva"]; for(var i = 0; i < sections.length; i++){ $(sections[i]).find('input, select').each(function(){ $(this).change(function(){ validate(); $(this).closest('.placement').find('.module-heading').removeClass('module-heading-bad'); $(this).closest('.placement').find('.glyphicon').addClass('glyphicon-ok text-success'); $(this).closest('.placement').find('.glyphicon').removeClass('glyphicon-warning-sign text-danger'); $(sections[i]).find('input, select').each(function(){ if($(this).closest('div').hasClass('has-error')){ $(this).closest('.placement').find('.module-heading').addClass('module-heading-bad'); $(this).closest('.placement').find('.glyphicon').addClass('glyphicon-warning-sign text-danger'); $(this).closest('.placement').find('.glyphicon').removeClass('glyphicon-ok text-success'); return false; } }); }); }); } function validate(){ var driving_qs = ['driving_exp_qa', 'driving_exp_qb', 'driving_exp_qc', 'driving_exp_qd']; for( var i = 0; i < driving_qs.length; i++){ if($('input[name='+driving_qs[i]+']:checked').val()){ $('input[name='+driving_qs[i]+']').closest('.form-group').removeClass('has-error'); $('input[name='+driving_qs[i]+']').closest('.form-group').addClass('has-success'); }else{ $('input[name='+driving_qs[i]+']').closest('.form-group').addClass('has-error'); $('input[name='+driving_qs[i]+']').closest('.form-group').removeClass('has-success'); } } var fields = [{ selector: $('.not-empty'), validations: [ isNotEmpty] },{ selector: $('.email'), validations: [ isNotEmpty, isEmail] },{ selector: $('.number'), validations: [ isNotEmpty, isNumber] },{ selector: $('.number-noreq'), validations: [isNumberNotRequired] }]; $('.form-control').closest('div').removeClass('has-error'); var i = 0, k = 0, z = 0, j = fields.length, item, selector, fn, in…
downvote count: 0
accepted answer: http://stackoverflow.com/a/26489494
favorite count: 0
has comment: http://stackoverflow.com/comment/41611781
type: Question
upvote count: 2

http://stackoverflow.com/a/26433256
has comment: http://stackoverflow.com/comment/41581568
accepted answer of: http://stackoverflow.com/q/26433147
answers question: http://stackoverflow.com/q/26433147
score: 0
type: AcceptedAnswer
has body: You can achieve this using jQuery: var data = " ", $xml = $( data ), data = " 123 456 "; $xml.append(data); jsFiddle Demo In the Fiddle, ignore the outerHTML() function - that's just to debug the code so you can see the entire XML structure.
type: Answer

http://stackoverflow.com/comment/41376683
type: Comment
comment on: http://stackoverflow.com/a/26359105
has text: no that i understood i'm asking about which method is better out of the 2
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41520517
has text: the code `document.title = 'The hash is ' + ( hash.replace( /^#/, '' ) || 'blank' ) + '.';` doesnt require any jquery, also why would head/body tags make any difference ? my code doesnt require any .js file
type: AnswerComment
comment on: http://stackoverflow.com/a/26437919
type: Comment
score: 0

http://stackoverflow.com/a/26460691
answers question: http://stackoverflow.com/q/26460576
type: Answer
has body: Here is an update to your fiddle http://jsfiddle.net/99pxz8et/2/ what you need is to listen on change event for the new text area and then update it $area.one('focusout', function() { $p.show(); $p.text($area.val()); $area.remove() }); Edit: changed .on() to .one()
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/41413652
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26360544
has text: Yes, only in Intranet because accessing that information with JavaScript cannot from an untrusted site can be a security issue.
type: Comment

http://stackoverflow.com/q/26373470
has answer: http://stackoverflow.com/a/26373655
type: AnsweredQuestion
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41403559
accepted answer: http://stackoverflow.com/a/26373655
has title: Why this 'collapse' div isn't closing once opened?
has body: I'm trying to have a div element close and open using Twitter Bootstraps collapse feature, and for some reason, despite opening just fine it will not close. I've tried to trigger it via Javascript and data attributes and neither has worked. Adding width and/or height properties to the CSS of it also changes nothing. I can reset it via removeClass('in');, but that is sudden and isn't preferable. Javascript: // Hide/show achievement reward on mouse enter/leave $(".achievement").each(function (i) { var reward = $(this).find(".reward"); $(this).mouseenter(function () { reward.collapse('toggle'); }); $(this).mouseleave(function () { reward.collapse('toggle'); }); }); HTML: A Step Forward Make one dollar. +1 Stock CSS: .reward { font-style: italic; font-size: 110%; font-weight: bold; color: rgba(0,170,0,1); }
has comment: http://stackoverflow.com/comment/41403609
has comment: http://stackoverflow.com/comment/41403755
tagged with: twitter-bootstrap-3

http://stackoverflow.com/comment/41528320
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26442603
type: QuestionComment
has text: *'Minimum length of string may be 500'* - You mean maximum, right?

http://stackoverflow.com/comment/41621471
comment on: http://stackoverflow.com/q/26490861
score: 0
has text: Hopefully a math inclined person will come through and answer this question well. In the mean time, here's a thought: if you express the path as a series of straight (non-collinear) segments, then you just have to check whether any segment intersects with any of the other segments (excluding the 2 segments it's connected to). Finding the [intersection of two segments](http://en.wikipedia.org/wiki/Line%E2%80%93line_intersection) is rather straightforward. However, if the path consists of hundreds of segments, this can become computationally expensive.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26437093
has answer: http://stackoverflow.com/a/26441033
tagged with: nvd3.js
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41519555
upvote count: 1
has answer: http://stackoverflow.com/a/26453140
type: Question
score: 1
answer count: 2
tagged with: visualization
downvote count: 0
accepted answer: http://stackoverflow.com/a/26453140
tagged with: javascript
favorite count: 0
has title: Curving a line chart inside a curved arc
has body: I am new to D3 and learning it. I am trying to build a curved line chart. That is i want to bend the line chart inside a half circle. It will be helpful if any one can tell me how to approach this in D3. Something as shown in the link below: http://www.cs.toronto.edu/~jianzhao/snapshots/kronominer.jpg
tagged with: graph-visualization
possible better answer: http://stackoverflow.com/a/26441033
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41519260

http://stackoverflow.com/comment/41422258
comment on: http://stackoverflow.com/q/26384013
score: 0
has text: Have you checked, that the items get correctly serialized?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41475799
has text: I've made a few sliders... I would imagine that the setTimeouts are getting stacked on top of eachother each time that you click, so that they end up playing on after another. For starters, don't use nested setTimeouts like this, unless you are going to unset it before you run another one. The easier way I've found, which I can try to write up, is to use a variable to let you know if the slider is currently moving or not, that you can toggle when you want to stop... basically the first thing clickin could do is check 'isPlaying == true' and just return if it is.
score: 0
comment on: http://stackoverflow.com/q/26413778
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26508190
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26513902
has title: $(selector) equivalent in Ext 3
accepted answer: http://stackoverflow.com/a/26513902
type: Question
answer count: 1
tagged with: javascript
has body: I have a menu component and I am trying to select the link selected by adding a class on click and removing the class from all menu items before adding it again to the newly clicked link. So I simply find the parent component and query it to find all anchors. Then I try to chx the classes of all the anchors and remove the one/ones that are the "selected" class. var anchors = component.el.query("a"); Ext.iterate(anchors, function(anchor, i){ anchor.removeClass('selected'); }); this.el.addClass('selected'); Does not work. Yet: var anchors = component.el.query("a"); Ext.iterate(anchors, function(anchor, i){ $(anchor).removeClass('selected'); }); this.el.addClass('selected'); Does work. What would be the Ext native equivalent to make this work?
tagged with: extjs
score: 0

http://stackoverflow.com/comment/41373895
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26357653
has text: check your console to see if there are any errors.. also try to log `console.log($('#my_form')[0].submit)` in the click handler before calling submit
score: 0

http://stackoverflow.com/q/26402563
tagged with: optimization
has comment: http://stackoverflow.com/comment/41454608
has comment: http://stackoverflow.com/comment/41454437
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has body: In a fairly large application made in Cordova, we keep going back and forth taking a set of variables from the user's LocalStorage. I mean, this set is quite big (in can go from some kbytes to fairly 10mb). I'm pretty sure that keeping variables loaded in memory may not be a pretty good idea (especially in low power, low memory devices), but it turns out that getting them from the LocalStorage looks like it's taking too long. At this moment, our practice is something like this: function doSomething() { var ourData = JSON.parse(localStorage.getItem('ourData')); ourData = processingBackAndForth(ourData); localStorage.setItem('ourData', JSON.stringify(ourData)); syncWithServer(ourData); } Where processingBackAndForth(ourData) is pretty intensive and the whole function is used almost once per 10 seconds. Now, I was thinking, should this be faster? ourData = JSON.parse(localStorage.getItem('ourData')); function doSomething() { ourData = processingBackAndForth(ourData); localStorage.setItem('ourData', JSON.stringify(ourData)); syncWithServer(ourData); } After reading a little on this, well, it basically tells that it's better to keep them in the local scope (which I know is better for encapsulation), but isn't this process a little too much? Just picture it, retrieving from LocalStorage, saving it back again, and letting GC to clean a variable with will be used afterwards once again. I know one of the points that states the link is that if something needs to be used across the app, and only in really special cases, then make it global, but anyway things like keeping a synced version between the server and LocalStorage still concern a lot to me, so actually I only remove the weight of retriving and garbage collecting. Would a JavaScript code use a big global variable instead of big local variables to gain some micro-optimizations?
tagged with: cordova
upvote count: 1
has comment: http://stackoverflow.com/comment/41637265
tagged with: local-storage
has answer: http://stackoverflow.com/a/26403401
type: AnsweredQuestion
has title: Big variables in JavaScript - make them global?
accepted answer: http://stackoverflow.com/a/26403401
tagged with: global-variables
type: Question
tagged with: javascript

http://stackoverflow.com/a/26376221
has body: Use the code below to retrieve the affid from cookie function getCookie(name) { var re = new RegExp(name + "=([^;]+)"); var value = re.exec(document.cookie); return (value != null) ? unescape(value[1]) : null; } Remember to set cookie named "affid" with the value on server side. If you want to set cookie from javascript you can make use of the code below. function SetCookie(cookieName, cookieValue, nDays) { var today = new Date(); var expire = new Date(); if (nDays == null || nDays == 0) nDays = 1; expire.setTime(today.getTime() + 3600000 * 24 * nDays); document.cookie = cookieName + "=" + escape(cookieValue) + ";expires=" + expire.toGMTString(); }
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41408444
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41408335
answers question: http://stackoverflow.com/q/26376009

http://stackoverflow.com/a/26415133
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26414990
accepted answer of: http://stackoverflow.com/q/26414990
has body: Considering you're using jQuery, it should be relatively easy. jQuery('img').index(jQuery(this)); This will show the current image's index comparative to all other images on the site. Example usage: jQuery('img').on('click',function(){ console.log(jQuery('img').index(jQuery(this)); //will return index based on all images }); The click function should demonstrate that the index is based on all images, not just images with the same parent.
score: 0

http://stackoverflow.com/q/26444478
tagged with: wordpress
has answer: http://stackoverflow.com/a/26629694
tagged with: php
has comment: http://stackoverflow.com/comment/41835650
has comment: http://stackoverflow.com/comment/41587458
has answer: http://stackoverflow.com/a/26672218
type: Question
has comment: http://stackoverflow.com/comment/41721069
has body: I'm trying to make a form with a autocomplete and fields that must be completed according to data entered in the previous field, the data from the database and all that stuff in Wordpress ... For autocomplete, no problem, it work with Wordpress, I just added a bit of code like: $("#nomPersonne").autocomplete ({ source: 'wp-content/themes/hero-child/listePersone.php' }); And a page listePersonne like this : &lt;?php include_once 'connexion.php'; $term = $_GET['term']; $requete = $link-&gt;prepare("SELECT `wp_terms`.`name` FROM `wp_term_taxonomy` JOIN `wp_terms` ON `wp_terms`.`term_id`=`wp_term_taxonomy`.`term_id` WHERE `wp_term_taxonomy`.`taxonomy`='nomPersonne' AND `wp_terms`.`name` LIKE :term"); $requete-&gt;execute(array('term' =&gt; '%' . $term . '%')); $array = array(); // on créé le tableau while ($donnee = $requete-&gt;fetch()) { // boucle pour obtenir les données array_push($array, $donnee['name']); // et on ajoute celles-ci à notre tableau } echo json_encode($array); // il n'y a plus qu'à convertir en JSON ?&gt; So the list of persons appears and when one selects one person (if one is found suitable), the following list of organizations will only list the organization(s) of the selected person in the The above list. I took the lead with Ajax before discovering that it was necessary to use a Wordpress statement: add_action('wp_ajax_do_ajax', 'notre_fonction_ajax'); I still do not manage to pass my variable (value PersonName) in order to make my reqête to the next field. So I have a JS file: jQuery(document).ready(function(){ jQuery('#nomPersonne').mouseleave(function(){ doAjaxRequest(); }); }); function doAjaxRequest(){ jQuery.ajax({ url: 'wp-admin/admin-ajax.php', data:{ 'action':'do_ajax', 'fn':'get_id_value' }, dataType: 'JSON', success:function(data){ jQuery("#nomOrgani").html(data); }, error: function(errorThrown){ alert('error'); console.log(errorThrown); } }); } My function in function.php: function notre_fonction_ajax(){ // ce switch lancera les fonct…
tagged with: javascript
has comment: http://stackoverflow.com/comment/41822928
has answer: http://stackoverflow.com/a/26711919
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/26612304
has title: Recovery variable Ajax in Wordpress
answer count: 4
type: UnansweredQuestion

http://stackoverflow.com/comment/41384370
type: Comment
comment on: http://stackoverflow.com/q/26363123
type: QuestionComment
has text: Set your ajax type post or get
score: 0

http://stackoverflow.com/comment/41517835
has text: Sorry I mean, above I am just loading each value of my table into a google map, and am using the values for what are in the 'type' column of my table to display in the infobox. But say for instance, I only wanted to load markers that have a specific value (within the table) to my map.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26436654
type: QuestionComment

http://stackoverflow.com/comment/41618389
type: Comment
type: QuestionComment
has text: @ juvian - well said!
comment on: http://stackoverflow.com/q/26492300
score: 0

http://stackoverflow.com/a/39216375
type: Answer
answers question: http://stackoverflow.com/q/26480857
downvote count: 0
score: 1
has body: This is what worked for me, and it's simple. function changevalues() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('NameOfSheet'); var rangecells = sheet.getRange('DesiredRange'); rangecells.setValue('DesiredValue') }
upvote count: 1

http://stackoverflow.com/q/26440054
has answer: http://stackoverflow.com/a/26440080
score: -1
has body: I have the following code which I'm using to create a timer that counts up: 00 : 00 Reset All function loadHard() { drawImage('image.png', 268, 5); console.log('idle'); clearInterval(setTime); } var minutesLabel = document.getElementById("minutes"); var secondsLabel = document.getElementById("seconds"); var totalSeconds = 0; setInterval(setTime, 1000); function setTime() { ++totalSeconds; secondsLabel.innerHTML = pad(totalSeconds%60); minutesLabel.innerHTML = pad(parseInt(totalSeconds/60)); } However, when I click my Reset All button, the timer keeps on counting and won't reset to 0. Is there a way to reset the timer back to 0, that I'm missing from this?
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/26440503
has answer: http://stackoverflow.com/a/26440103
has title: Javascript clearInterval usage
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26440080
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41523648
answer count: 4
downvote count: 1
possible better answer: http://stackoverflow.com/a/26440082
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26440082

http://stackoverflow.com/comment/41481796
has text: Thank you so much, I'm not really sure what the e.options[e.selectedInsex].value; does.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26381601

http://stackoverflow.com/comment/41466695
type: AnswerComment
comment on: http://stackoverflow.com/a/26401990
type: Comment
has text: I probably didn't make my point clear. I was referring to not using a main template and leave it all inside the tag of my page. This way I wouldn't need to pull out all the static content into a template. Is that possible? Thanks.
score: 0

http://stackoverflow.com/a/26490299
answers question: http://stackoverflow.com/q/26438032
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26438032
has body: This was addressed by making the following changes. - Taking the data from #badgeSelect not #category - From section 3, the line var categorySelected = $('#category').val(); was changed to categorySelected = $('#badgeselect .categorylabel').text(); By taking the data from #badgeSelect it meant that the only data being available was that shown shown in the text box, instead of '#category'that returned all results. The it was simply targeting the text correctly with the change to the var categorySelected
type: Answer

http://stackoverflow.com/q/26367028
has comment: http://stackoverflow.com/comment/41391563
favorite count: 0
has body: The actual table is written in jqgrid. I'm trying to figure out a way to quickly do a .equals() comparison on every line of each column. If one of them turns out to be false, then I'm quickly going to throw a red background and an error message. 1. Daniel Radcliff / Treecrest / 10 2. Daniel Radcliff / Treecrest / 11 3. Daniel Radcliff / Treecrest / 10 The 3rd column should throw the red background, but the others should be fine. What's the most efficient solution?
has comment: http://stackoverflow.com/comment/41392134
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Large Column Comparisons on jqGrid
type: Question
score: 1
tagged with: jqgrid
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26464445
score: 1
has comment: http://stackoverflow.com/comment/41568106
downvote count: 1
has body: You can use the string's replace() method with the following regular expression: var str = 'Welcome, your bed is made, your tea is ready.' str = str.replace(/,([^,]*)$/, ''); $('#result').text(str);
has comment: http://stackoverflow.com/comment/72606656
answers question: http://stackoverflow.com/q/26464384
has comment: http://stackoverflow.com/comment/41567497
has comment: http://stackoverflow.com/comment/41568049
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41567190

http://stackoverflow.com/a/26400117
upvote count: 2
has comment: http://stackoverflow.com/comment/41450902
answers question: http://stackoverflow.com/q/26400050
has comment: http://stackoverflow.com/comment/41450856
accepted answer of: http://stackoverflow.com/q/26400050
has comment: http://stackoverflow.com/comment/41452005
has comment: http://stackoverflow.com/comment/41450936
has body: var result = [], i; for (i = 0; i &lt; members.length; ++i) { result.push({name: members[i], startPoint: startPoint[i], maxPoint: maxPoint[i]}); } return JSON.stringify(result);
has comment: http://stackoverflow.com/comment/41450664
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41450604
has comment: http://stackoverflow.com/comment/41451034
type: Answer
has comment: http://stackoverflow.com/comment/41452038
score: 2

http://stackoverflow.com/q/26506513
has comment: http://stackoverflow.com/comment/41643667
has comment: http://stackoverflow.com/comment/41643704
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/9073690
score: 0
has body: I have a form like this : &lt;form&gt; &lt;input type="text" name="employee[][name]"/&gt; &lt;input type="text" name="employee[][name]"/&gt; &lt;/form&gt; And I use the result in a php file like this : echo $_POST['employee'][0]['name']; echo $_POST['employee'][1]['name']; The fields are converted in arrays. It's a dynamic form, I can add or remove some fields so it is usefull to not have a fixed name for each fields. I want to do the same thing in Javascript/JQuery. Is tried to do $('[name="employee[0][name]") and it return an empty array. I don't know what to do. Is there a simple way to do this?
answer count: 1
accepted answer: http://stackoverflow.com/a/26506956
has comment: http://stackoverflow.com/comment/41643670
tagged with: php
type: AnsweredQuestion
has title: How to have array of fields with names?
type: Question
has answer: http://stackoverflow.com/a/26506956

http://stackoverflow.com/comment/41427549
comment on: http://stackoverflow.com/a/26385200
type: AnswerComment
has text: Okay, so this might work. i didn't know that disabling the field would prevent it from being included in the post. Thanx for that info.
type: Comment
score: 0

http://stackoverflow.com/comment/41474043
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26412752
has text: I just tried implementing this and it works! Thank you so much :) I really need to learn jQuery/JS better so I can start dealing with things like this easier. I had a similar solution with a regex but couldn't figure out how to split the 3-3-4 digit pattern. You guys are awesome!

http://stackoverflow.com/comment/41420934
comment on: http://stackoverflow.com/q/26383311
type: Comment
type: QuestionComment
score: 2
has text: Um the url you are fetching is not returning JSONP. That is why it is not working.

timer
tag name: timer
tags question: http://stackoverflow.com/q/26487439
tags question: http://stackoverflow.com/q/26453439
tags question: http://stackoverflow.com/q/26378587
type: Tag
tags question: http://stackoverflow.com/q/26381366
tags question: http://stackoverflow.com/q/26452053

function
tags question: http://stackoverflow.com/q/26490674
tags question: http://stackoverflow.com/q/26416973
tags question: http://stackoverflow.com/q/26391581
tags question: http://stackoverflow.com/q/26409321
tag name: function
tags question: http://stackoverflow.com/q/26427707
tags question: http://stackoverflow.com/q/26456558
tags question: http://stackoverflow.com/q/26364704
tags question: http://stackoverflow.com/q/26475247
tags question: http://stackoverflow.com/q/26439948
tags question: http://stackoverflow.com/q/26455094
tags question: http://stackoverflow.com/q/26356484
tags question: http://stackoverflow.com/q/26384886
tags question: http://stackoverflow.com/q/26422243
tags question: http://stackoverflow.com/q/26496289
tags question: http://stackoverflow.com/q/26410073
tags question: http://stackoverflow.com/q/26382313
tags question: http://stackoverflow.com/q/26431699
tags question: http://stackoverflow.com/q/26509520
tags question: http://stackoverflow.com/q/26463491
tags question: http://stackoverflow.com/q/26487522
tags question: http://stackoverflow.com/q/26454574
type: Tag
tags question: http://stackoverflow.com/q/26445555
tags question: http://stackoverflow.com/q/26426567
tags question: http://stackoverflow.com/q/26412567
tags question: http://stackoverflow.com/q/26489782
tags question: http://stackoverflow.com/q/26443314
tags question: http://stackoverflow.com/q/26440553
tags question: http://stackoverflow.com/q/26497205
tags question: http://stackoverflow.com/q/26471555
tags question: http://stackoverflow.com/q/26393860
tags question: http://stackoverflow.com/q/26368321
tags question: http://stackoverflow.com/q/26445541
tags question: http://stackoverflow.com/q/26409415
tags question: http://stackoverflow.com/q/26417934
tags question: http://stackoverflow.com/q/26510922

reactjs
tags question: http://stackoverflow.com/q/26407273
tags question: http://stackoverflow.com/q/26358144
tags question: http://stackoverflow.com/q/26447368
tags question: http://stackoverflow.com/q/26473002
tags question: http://stackoverflow.com/q/26448929
type: Tag
tags question: http://stackoverflow.com/q/26510850
tags question: http://stackoverflow.com/q/26470679
tags question: http://stackoverflow.com/q/26474617
tags question: http://stackoverflow.com/q/26465993
tags question: http://stackoverflow.com/q/26463924
tags question: http://stackoverflow.com/q/26354600
tags question: http://stackoverflow.com/q/26422639
tags question: http://stackoverflow.com/q/26402534
tags question: http://stackoverflow.com/q/26430757
tag name: reactjs
tags question: http://stackoverflow.com/q/26465011
tags question: http://stackoverflow.com/q/26408388
tags question: http://stackoverflow.com/q/26510782
tags question: http://stackoverflow.com/q/26428488
tags question: http://stackoverflow.com/q/26485392
tags question: http://stackoverflow.com/q/26478468
tags question: http://stackoverflow.com/q/26488089
tags question: http://stackoverflow.com/q/26365287
tags question: http://stackoverflow.com/q/26416334

calendar
tags question: http://stackoverflow.com/q/26414561
tags question: http://stackoverflow.com/q/26458108
tags question: http://stackoverflow.com/q/26493816
tags question: http://stackoverflow.com/q/26464894
tags question: http://stackoverflow.com/q/26461629
tag name: calendar
type: Tag
tags question: http://stackoverflow.com/q/26465739

http://stackoverflow.com/comment/41612757
score: 0
comment on: http://stackoverflow.com/q/26450551
type: Comment
type: QuestionComment
has text: I'm confused now, fiddle also works well. Have you tried another browsers? Can you post a screen, movie or give us better explanation of the problem (what does happen if you touch the delete button and what behaviour do you need)?

http://stackoverflow.com/a/26398840
upvote count: 8
type: Answer
has body: Use haven't use getDay today.getDay(); first of month firstOfMonth.getDay(); last of month lastOfMonth.getDay(); or if u want to get dayname use var days = ['Sun','Mon','Tues','Wed','Thrus','Fri','Sat']; //First of month days[firstOfMonth.getDay()]; //last of month days[lastOfMonth.getDay()];
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26398727
downvote count: 0
score: 8
answers question: http://stackoverflow.com/q/26398727

http://stackoverflow.com/comment/41763468
comment on: http://stackoverflow.com/a/26572393
type: Comment
score: 1
has text: while loop ends with a semicolon, so nothing is executed in that loop but that empty statement, what is executed is in the control expression :)
type: AnswerComment

http://stackoverflow.com/q/26416078
has title: Dynamically updating Bootstrap Modal with AJAX results without leave the modal or reload it's content
tagged with: javascript
has comment: http://stackoverflow.com/comment/41496405
has comment: http://stackoverflow.com/comment/41536129
has comment: http://stackoverflow.com/comment/41483097
upvote count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41483611
has body: I need to load a content dynamically from a Ajax call result in a Bootstrap Modal but I don't know how to or if it's possible. This is what I'm doing in my jQuery code: $('button#btnBuscar').on('click', function (ev) { ev.preventDefault(); $.post(Routing.generate('filtrarNormas'), $('#buscadorNorma').serialize(), 'json') .done(function (data, textStatus, jqXHR) { if (data.entities.length > 1) { $('#resultadoNorma').show(); var $html = ''; data.entities.forEach(function (value, index, array) { $html += ' '; $html += ' '; $html += ' ' + value.codigo + ' '; $html += ' ' + value.norma + ' '; $html += ' ' + value.anno + ' '; $html += ' ' + value.comiteTecnico + ' '; $html += ' '; }); $("#resultadoNormaBody").html($html); } }) .fail(); }); And basically this is the modal (I remove some code for leave the post readable): // here goes some fields for search purpose Buscar Nro. Name Year CT Name When any click the button#btnBuscar the $.post is triggered and then with the results in JSON format I should update dynamically the #resultadoNormaBodybut my solution is not not working since I get not results in #resultadoNormaBody and also fieldset#resultadoNorma is never show, so I miss something, can any give me some help or tips on how to do this? Ahhh important!! The modal should't be leave meaning should not be closed and reopened since then I'll lost the form values and that's wrong
has comment: http://stackoverflow.com/comment/41536624
tagged with: twitter-bootstrap-3
downvote count: 0
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/41483044
type: Question
has comment: http://stackoverflow.com/comment/41496452
has comment: http://stackoverflow.com/comment/41483615

http://stackoverflow.com/q/26401374
has title: jQuery: CSS Display block not working
type: AnsweredQuestion
has body: I'm trying to make a simple dropdown menu, this is my code so far: HTML item 1 Sub 1 Sub 2 item 1 Sub 1 Sub 2 JQUERY jQuery(".activate").hover(function(){ jQuery(this).find('.subs').css("display", "block"); }, function(){ jQuery(this).find('.subs').css("display", "none"); }); When I try it on my site nothing happens, what am I doing wrong?
type: Question
has comment: http://stackoverflow.com/comment/41452541
tagged with: javascript
score: 0
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/26401384
possible better answer: http://stackoverflow.com/a/26401397
has comment: http://stackoverflow.com/comment/41452629
has answer: http://stackoverflow.com/a/26401464
has answer: http://stackoverflow.com/a/26401397
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26401384
tagged with: css

http://stackoverflow.com/comment/41586834
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26474542
type: Comment
has text: I've added a `/*` to make sure that the ` ` tags themselves will not show up in the HTML. Most likely, they will be ignored but they are not required either.

http://stackoverflow.com/a/26468723
type: Answer
has body: You could take a look at the jQuery UI method addClass which allows you to pass in some animation parameters into it. View the example and documentation here http://api.jqueryui.com/addClass/ For your use, it should be as simple as adding in the delay to addClass() Add a reference to the jQuery Library, then change your code to; $("body").addClass("myclass", 300);
has comment: http://stackoverflow.com/comment/41575491
answers question: http://stackoverflow.com/q/26468624
has comment: http://stackoverflow.com/comment/41576023
score: 0
has comment: http://stackoverflow.com/comment/41575647

http://stackoverflow.com/comment/41513888
type: AnswerComment
has text: I added a bunch of code, but looking through it nothing is really popping out offhand. What you say makes sense though, I'll keep scouring through it as well... :)
comment on: http://stackoverflow.com/a/26433924
type: Comment
score: 0

http://stackoverflow.com/comment/41654259
type: QuestionComment
comment on: http://stackoverflow.com/q/26511897
has text: Why is the `$(window).resize()` function called outside of the `$(document).ready()` function? Do you see a change if you move it inside?
score: 0
type: Comment

http://stackoverflow.com/comment/41407064
has text: your not modifying the dom
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26375325
type: Comment

http://stackoverflow.com/comment/41463188
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26406710
has text: try to change your model definition for the user type to Schema.Types.ObjectId

http://stackoverflow.com/q/26447551
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26447610
has answer: http://stackoverflow.com/a/26447610
downvote count: 2
score: -2
answer count: 1
tagged with: javascript
favorite count: 0
has title: Javascript on counting occurence of letter 'Z' in for loop textfield
upvote count: 0
has body: Javascript on counting occurence of letter 'Z' in for loop textfield I have like 50 text fields, user can enter up to 5 letter or number I need a counter to count how many time did the letter "z" appear on all the text field. I tried something like this, my textfield is with class mytext and id mytext_NUM, the textfield could be empty or with value. var zoccur=0; for(i=1;i&lt;=50;i++) { $('.mytext').each(function () { var value = document.getElementById("mytext_"+i).value; zoccur = zoccur + value.match(/z/g); }) alert("z occur is " + zoccur); It return me z is 0zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz null null null null repeatly

http://stackoverflow.com/q/26481447
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I have used jquery for date picker. Before selecting the date the page scrolls smoothly, but if I select the date in datepicker. the page starts flickering while scrolling. $("#datepickerTo").datepicker({ dateFormat: 'dd/mm/yy', showOtherMonths: true, selectOtherMonths: true }); $("#datepickerFrom").datepicker({ dateFormat: 'dd/mm/yy', showOtherMonths: true, selectOtherMonths: true }); SEARCH CALL DETAILS From Number To Number Mode From Date To Date Start Time End Time ALL IN-COMING OUT-GOING MISSED what could be the problem. Please help me.
tagged with: jquery-ui
score: 1
tagged with: jquery-ui-datepicker
type: Question
has title: jquery page flickers in chrome

http://stackoverflow.com/a/26363489
upvote count: 3
has comment: http://stackoverflow.com/comment/41397802
has comment: http://stackoverflow.com/comment/41422809
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41399400
has comment: http://stackoverflow.com/comment/41395951
downvote count: 0
has body: Use XMLSerializer to serialize the content to a string then create a data uri for the background image from that.
has comment: http://stackoverflow.com/comment/41422714
type: Answer
accepted answer of: http://stackoverflow.com/q/26363258
answers question: http://stackoverflow.com/q/26363258
score: 3
has comment: http://stackoverflow.com/comment/41410984

http://stackoverflow.com/q/26419711
has comment: http://stackoverflow.com/comment/41486469
has title: echo PHP array in javascript
linked to: http://stackoverflow.com/q/5618925
accepted answer: http://stackoverflow.com/a/26420165
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26419785
has answer: http://stackoverflow.com/a/26419785
has answer: http://stackoverflow.com/a/26420165
has body: Answer from here : https://stackoverflow.com/a/12863675/894470 is how to assign array to variable. I'm getting my data from php but when I echo it inside javscript like example below my chart wont draw. var month_data= [&lt;?php echo json_encode($lol); ?&gt;]; but I can show alert and see all my data no problem like below: If I copy the text from alert and paste it in array like below: var month_data= [{month: '2014-01', KFC: 0, PizzaHut: 1},{month: '2014-03', KFC: 2, PizzaHut: 1},{month: '2014-04', KFC: 1, PizzaHut: 0},{month: '2014-05', KFC: 0, PizzaHut: 1},{month: '2014-07', KFC: 1, PizzaHut: 0},{month: '2014-10', KFC: 42, PizzaHut: 42}]; my chart will draw. What is wrong here?? UPDATE: My query: $lol = array(); while ($row = mysqli_fetch_array($result)) { $lol[] = "{month: '". $row['year'] ."-". $row['month'] ."', KFC: ". $row['kfc'] .", PizzaHut: ". $row['pizzahut'] ."}"; } and I'm using Morris.js: http://morrisjs.github.io/morris.js/ to generate my chart.
type: Question
tagged with: echo
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41487263
score: 0
answer count: 2

http://stackoverflow.com/comment/41489081
score: 0
has text: yeah I think the selector.options[ClubForm.Index] should just read selector.options.index also. Basically learning this stuff as I go sometimes a good explination is all that is needed. I'll work on messing with the code to see if I can get it to work.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26421266

http://stackoverflow.com/q/26411091
has answer: http://stackoverflow.com/a/26411213
type: Question
score: 0
has body: I found very good project on Github, but I can not understand all of it. I installed a signaling server (socket.io) and a turn server. I'm trying to make an app for IOS and I'm using code like: &lt;video height="300" id="localVideo"&gt;&lt;/video&gt; &lt;video id="remotesVideos"&gt;&lt;/video&gt; &lt;script type="text/javascript"&gt; document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { var phonertc = cordova.require('com.dooble.phonertc.PhoneRTC'); var socket = io('http://mysait.com:3000'); socket.on("connect", function() { socket.emit("join", "myroom"); socket.on("message", function(message) { console.log("GOT MESSAGE:"); message.payload.sdp = message.payload.sdp.replace(/(\r\n|\n|\r)/gm,""); // when a message is received from the signaling server, // notify the PhoneRTC plugin. phonertc.receiveMessage(message.payload); }); }); socket.on('connect',function() { alert ('is connect!'); }); phonertc.call({ isInitator: true, // Caller or callee? turn: { host: 'turn:mysait.com:3478', username: 'test', password: 'test' }, sendMessageCallback: function (data) { // PhoneRTC wants to send a message to your target, use // your signaling server here to send the message. console.log(data); socket.emit("message", data); }, answerCallback: function () { alert('Callee answered!'); }, disconnectCallback: function () { alert('Call disconnected!'); }, video: { // Remove this property if you don't want video chat localVideo: document.getElementById('localVideo'), remoteVideo: document.getElementById('remoteVideo') } }); } &lt;/script&gt; I have an alert when connection is made to server, but I don't see local and remote video. Can someone suggest what could be wrong? Can you send me example of client-side, I can't find it here.
answer count: 1
tagged with: ios
tagged with: javascript
tagged with: sockets
tagged with: cordova
has title: can't create phonertc client
type: UnansweredQuestion
tagged with: phonertc

http://stackoverflow.com/comment/41563220
has text: @Andy: you can drop the `? false : true`
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26462061
type: Comment

http://stackoverflow.com/q/26405268
score: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/15410652
has comment: http://stackoverflow.com/comment/41459396
has body: I have a table where rows are generated using AngularJS ngRpeat: {{player.name}} {{player.score}} The array looks a bit like this: $scope.divison = [ { name: "John Doe", score: "10", goingUp : true }, { name: "Bob Marley", score: "20" } ]; Now, what if I wanted to apply ng-class to the table row based on that particular ng-repeat? I would have though this might work: {{player.name}} {{player.score}} Alas this doesn't work. Probably because the ng-class doesn't sit inside that repeat element. How can I get this working though?
tagged with: angularjs
has answer: http://stackoverflow.com/a/26405634
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41459657
has comment: http://stackoverflow.com/comment/41460085
has comment: http://stackoverflow.com/comment/41459834
type: Question
has answer: http://stackoverflow.com/a/26405423
answer count: 2
accepted answer: http://stackoverflow.com/a/26405634
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26405423
has title: apply ngClass to element where ngRepeat is declared

http://stackoverflow.com/comment/41591210
has text: thanks :). One last question- For instance I make a ajax call to external URL and get the content of the website. Will this be useful as this is finding DOM in the HTML templates?. I am getting everything in Angular Controller and can see DOM of external URL , what i want to do now is just get specific Form ID and display in my page. Is this something you can help me with please?
comment on: http://stackoverflow.com/a/26472997
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41644434
comment on: http://stackoverflow.com/a/26486967
score: 0
type: AnswerComment
type: Comment
has text: But you still should add `valueSearch = valueSearch.replace(/[-\\()\[\]{}^$*+.?|]/g, '\\$&');` to his solution to escape the metacharacters, especially if `valueSearch` comes from an external source like user input: try searching for `a$01`.

http://stackoverflow.com/comment/41450542
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26398435
has text: window.location.reload will only reload the page right? I also used window.location.replace("linkToOtherPage.html"), that will not add it to the history list, but no succes.
score: 0

http://stackoverflow.com/comment/41385135
has text: @mybirthname: look at EasyPush. Is it obvious? PS: I cannot write on Javascript page any explanation if it's not clear.. And it's very counterintuitive!
type: Comment
comment on: http://stackoverflow.com/q/26363708
type: QuestionComment
score: 0

http://stackoverflow.com/q/26403204
type: Question
tagged with: canvas
has title: add image on canvas on button click using fabric.js
has answer: http://stackoverflow.com/a/26403259
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has body: I am trying to add images on button click on canvas. . By default there is 1 image on canvas. Images are getting added on button click, But all images are erased when i click on canvas. Only the background image remains constant. add images Please help me with this code
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: fabricjs

http://stackoverflow.com/q/26359883
tagged with: css
accepted answer: http://stackoverflow.com/a/26361408
type: AnsweredQuestion
tagged with: svn
linked to: http://stackoverflow.com/q/787789
downvote count: 1
has comment: http://stackoverflow.com/comment/41380595
type: Question
has body: I want to compress all the Javascript and CSS files in my codebase,separately. How can I do it right from the scratch using only YUI Compressor ? Solution with steps will be appreciable . I need it for SVN windows machine. The setup should be such that when any developer runs two separate bat files(one for JS and other for CSS), the main files say min.js &amp; min.css should get compressed. Regards.
answer count: 1
tagged with: javascript
score: 0
tagged with: minify
favorite count: 0
has answer: http://stackoverflow.com/a/26361408
has title: Steps to Minify JS and CSS in SVN windows
upvote count: 1

http://stackoverflow.com/comment/66182421
score: 0
type: AnswerComment
type: Comment
has text: @jfriend00 This is not any singleton more this is factory pattern, every time function is called IIFE is returning new object, objects has the same properties but it is not object reference as it should be in singleton.
comment on: http://stackoverflow.com/a/26498022

http://stackoverflow.com/a/39783030
has body: Here is sample code for reading csv file into array var request = new XMLHttpRequest(); request.open("GET", url, false); request.send(null); var csvData = new Array(); var jsonObject = request.responseText.split(/\r?\n|\r/); for (var i = 0; i &lt; jsonObject.length; i++) { csvData.push(jsonObject[i].split(',')); } // Retrived data from csv file content console.log(csvData); Here is the working fiddle example: http://jsfiddle.net/BdCnm/450/
accepted answer of: http://stackoverflow.com/q/26416304
type: AcceptedAnswer
upvote count: 6
downvote count: 0
answers question: http://stackoverflow.com/q/26416304
type: Answer
score: 6

http://stackoverflow.com/a/26512874
has body: The code is actually executing what you told it to do, i.e. every time I click the checkbox on top click to other checkboxes. This way if a box is checked it will uncheck itself, because it won't mind if the top is checked or not. What you really want is "when I check the box on top, check all the others, when I uncheck it, then uncheck all the others", which is sort of different as you see. Try this: $(function () { // best practice: always store the selectors you access multiple times var checkboxes = $("#codigoArancelarioBody").find("input:checkbox"), toggleAll = $('#toggleCheckbox'); toggleAll.on('click', function () { // is the top checkbox checked? return true, is it unchecked? Then return false. var $toggle = $(this).is(':checked'); // .prop('checked', true) makes it checked, .prop('checked', false) makes it unchecked checkboxes.prop('checked', $toggle); }); }); see: http://jsfiddle.net/gleezer/nnfg80x1/3/
answers question: http://stackoverflow.com/q/26512637
score: 0
type: Answer

http://stackoverflow.com/q/26430814
has body: I'm using jekyll with liquid for my website. I want to use angularjs to read json and parse the data on the html page. but both liquid and angularjs use {{}}. So when i try to display angularjs data, it won't because liquid thinks it's a variable created by jekyll. How can i use both jekyll and angularjs? or is there a better approach?
score: 3
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: displaying angularjs model data when using jekyll and liquid?
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41508027
linked to: http://stackoverflow.com/q/13671701
has answer: http://stackoverflow.com/a/29860827
tagged with: jekyll
tagged with: liquid
has comment: http://stackoverflow.com/comment/41506500
tagged with: angularjs
upvote count: 3
type: UnansweredQuestion

http://stackoverflow.com/q/26473912
has title: Having problems getting variable into javascript generated input
tagged with: escaping
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26474003
accepted answer: http://stackoverflow.com/a/26474003
type: Question
answer count: 2
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26474005
has body: So I'm trying to generate an input form using Javascript so that I can add multiple lines of the same input boxes. var color_form = document.getElementById('color_form'); var create = document.createElement('input'); create.setAttribute('method', 'post'); create.setAttribute('name', "\"red[" + i + "]"); create.setAttribute('class', 'color_entry'); create.setAttribute('placeholder', 'red'); color_form.appendChild(create); //Append red value to color_form I've tried adding another ending quote and leaving it off but sometimes it will just omit the form altogether and sometimes it gives me this &lt;input class="color_entry" method="post" name=""red[" + i + "]"" placeholder="red"&gt;&lt;/input&gt; Can anybody point me to what i'm doing wrong here?
has answer: http://stackoverflow.com/a/26474005

http://stackoverflow.com/comment/41664131
score: 0
type: QuestionComment
has text: Mark -- Thank you for this effort. I have modified your simplistic code and gotten failures, but not the one I have reported here. I will continue trying to reproduce.
type: Comment
comment on: http://stackoverflow.com/q/26480006

http://stackoverflow.com/comment/41483954
type: QuestionComment
has text: Of course, you shouldn't be using inline event handler attributes in the first place.
score: 1
comment on: http://stackoverflow.com/q/26418587
type: Comment

http://stackoverflow.com/comment/41633063
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26500190
type: Comment
has text: @Phil yeah thats a better idea and the proper way. use `data-value` data tags instead.

http://stackoverflow.com/q/26417254
has answer: http://stackoverflow.com/a/26417392
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26417392
type: AnsweredQuestion
upvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41481676
has body: My program works like this. I click on the '#cslp_hov' and function in img_mask.js will be called and then it will go to an external php and return some data. The 'agenda_success' function breaks that data and appends html into clickable links. And when I click them, I wanted to change #main_content's content. But then error says: "Cannot read property html of null". Why is it null, when the script and the element are on the same php file. index.php img_mask.js (function($){ $(document).ready(function() { function agenda_success(dataset){ var str = dataset; var res = dataset.split("/"); loop_cnt = res.length-1; for(i=0;i<loop_cnt;i++){ $('.sidebar-nav').append(" "+res[i+1]+" "); i++; } }; $('#cslp_hov').click(function() { $(this).parent().css('background', '#4B42AB'); $('.sidebar-nav').html(' CSLP '); $.ajax({ type: "POST", url: 'templates/cslptemplate/agenda_menu.php', data: {key: 2}, success : function(data) { //First Sol // $('.sidebar-nav').append(data); // $('#main_content').html('Hello'); //End of First Sol agenda_success(data); } }); $('.sidebar-nav').append(' Edit Description '); });}) })(jQuery);
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41481731
has title: My elementID is null even when my script is on the same page
score: -1
has comment: http://stackoverflow.com/comment/41481771
downvote count: 1
has comment: http://stackoverflow.com/comment/41481721

http://stackoverflow.com/comment/41500225
type: Comment
score: 0
type: AnswerComment
has text: This doesn't seem to work for me. Yes it is a date string on the database. My own user expiry date is 2016 so, for this test, the #expiryDate div shouldn't appear. Do I wrap this in a $(function)? I've tried both..
comment on: http://stackoverflow.com/a/26427168

http://stackoverflow.com/comment/41637508
type: QuestionComment
has text: The formula is `factorial(str.length)`.
score: 1
comment on: http://stackoverflow.com/q/26502895
type: Comment

http://stackoverflow.com/comment/41432030
comment on: http://stackoverflow.com/q/26389175
has text: Code is fine, you are missing a closing ` ` of williamsHall
type: Comment
type: QuestionComment
score: 4

http://stackoverflow.com/comment/41487027
comment on: http://stackoverflow.com/a/26397679
has text: I tried it on windows and rasbian (debian) and it works on both. Please register to the [`remote.message`](http://docs.casperjs.org/en/latest/events-filters.html#remote-message) and [`page.error`](http://docs.casperjs.org/en/latest/events-filters.html#page-error) events. Maybe there are errors. You could also try the `ressource.*` events.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41560320
type: AnswerComment
type: Comment
has text: Using CSS: `iframe { width: 100%; height: 500px }`.
comment on: http://stackoverflow.com/a/26449187
score: 0

http://stackoverflow.com/comment/41521137
type: QuestionComment
has text: By calling `Math.random()` 35 times (instead of storing it in a variable) you exponentially reduce the probability of getting the next song. That means you will probably never get the last song while the first ones will appear almost everytime.
score: 0
comment on: http://stackoverflow.com/q/26438499
type: Comment

http://stackoverflow.com/comment/41371629
has text: Not sure either ;) One thing I'm pretty confident about is that it is most probably not a Node.js issue, your code seems fine to me. Have you tried using netcat like suggested in the comments to validate the 'OS issue' theory?
comment on: http://stackoverflow.com/a/26355608
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41469039
has text: From the console on Chrome: Failed to load resource: the server responded with a status of 404 (Not Found) http://latitudesign.net/css/jplayer.css. Can't do much more without some code.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26410344
score: 0

http://stackoverflow.com/comment/41677337
type: AnswerComment
score: 0
type: Comment
has text: It's more verbose than I'd expect it'd need to be, but it works -- thanks!
comment on: http://stackoverflow.com/a/26449874

http://stackoverflow.com/q/26469415
has title: How to find background color behind transparent image using JavaScript
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/41577073
downvote count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41576679
answer count: 0
score: 1
linked to: http://stackoverflow.com/q/10781953
has body: I want to select the color for the title which is a text inside an svg. The color has to be darker or lighter depending on the background-color of the body or the div containing the svg. The body may not have any background color specified. How to find background color to understand the theme so that I can decide whether to use darker or lighter color. NOTE: I am using jquery.colorBrightness.js to understand whether the background color is dark or light
type: Question
linked to: http://stackoverflow.com/q/5999209

http://stackoverflow.com/comment/41546996
type: Comment
has text: @TovlyDeutsch if it helped, don't forget to mark it as answer by clicking on the tick.. BTW, glad to have helped :)
comment on: http://stackoverflow.com/a/26452961
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41423731
type: AnswerComment
has text: you could simply do something like this `var d =$('#myDate_year').val()+$('#myDate_month').val()+$('#myDate_day').val()`
type: Comment
comment on: http://stackoverflow.com/a/26360676
score: 0

http://stackoverflow.com/comment/41482928
has text: Please take a look at the following [article](http://www.codeproject.com/Articles/784106/AngularJS-Token-Authentication-using-ASP-NET-Web-A). Also this article may [help](http://stackoverflow.com/questions/22260513/angularjs-and-web-api-form-authentication). or even [this](http://www.seankenny.me/blog/2013/10/02/angularjs-formsauthentication-in-net-land/)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26412773
score: 0

http://stackoverflow.com/comment/41397521
type: QuestionComment
comment on: http://stackoverflow.com/q/26370009
type: Comment
has text: I am making this request on page load, in order to get info from an external sharepoint list.
score: 0

http://stackoverflow.com/q/26387121
downvote count: 0
answer count: 0
score: 1
type: Question
tagged with: javascript
has title: AngularJS Exception Handler: Using service with unknown provider injection
upvote count: 1
favorite count: 0
tagged with: angularjs
tagged with: exception
type: UnansweredQuestion
has body: I'm using AngularJS and I've created a custom exception handler. angular.module('moduleName') .factory('$exceptionHandler, () =&gt; { return (exception, cause) =&gt; { try { var someService = $injector.get('serviceName'); someService.alert(exception); } catch (ex) { window.alert(ex); } }; }) I caught up a situation when i forgot to run a script (in the html page) of one of the injections services that the service (named 'serviceName') are using. This has caused an exception when there is a use of the 'alert' function of the service. I added the try/catch code in order to use regular 'alert' function whenever the service is malfunction (wrong injection or couldn't initialized) so the flow of the application won't hurt and in case of an exception handler exception catch, the code will run with or without the service. However, even with the try zone, when there is use of the alert function of the service (when the service is malfunction), the $exceptionHandler function is invoked again instead of reaching to the catch zone... Is there a way to get to the catch zone instead of invoking again the $exceptionHandler function? or is there a different way i could use in order to see if the service is good to use and all of his injections were loaded correctly? Thanks in advanced

http://stackoverflow.com/q/26384211
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41422679
tagged with: c#
has answer: http://stackoverflow.com/a/26384246
has answer: http://stackoverflow.com/a/26384920
has title: In ASP.NET user control, i want to expose a method to client side
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/41422737
tagged with: ajax
has body: I have an User Control Which is having a lot of lot methods. I want to expose a method to client. So that i can call the method of the control in javascript and get the result. For Example: A method called, GetData(), which will get the data from the server. Currently i am calling this method only on code behind. It will return the data. Now i want to call the same method in client side. Is it possible?
type: UnansweredQuestion

http://stackoverflow.com/q/26397697
has title: Fallback plan for loading fontawesome
favorite count: 0
type: UnansweredQuestion
has body: UPDATE: to make my question clearer, I referred the following code snippet and implemented something similar- &lt;script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='/js/jquery-1.4.2.min.js' type='text/javascript'%3E%3C/script%3E")); } &lt;/script&gt; I'm loading font-awesome.css and the fallback in my JSP this way- &lt;link type="text/css" rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css" /&gt; &lt;script&gt; function fallbackForFontAwesome() { if (typeof bootstrapcdn == "undefined") { document.write(unescape('%3Clink type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.1/css/font-awesome.min.css" /%3E')); if (typeof cloudflare == "undefined") { document.write(unescape('%3Clink type="text/css" rel="stylesheet" href="/common/fontawesome/css/font-awesome.min.css" /%3E')); } else { alert('loading from cloudfare'); } } else { alert('loading from bootstrap cdn'); } } fallbackForFontAwesome(); &lt;/script&gt; As per this code snippet, I expected for the execution of alert('loading from bootstrap cdn'); to happen. But it didn't. Does the code if (typeof bootstrapcdn == "undefined") and if (typeof cloudflare == "undefined") check if the css has been loaded from respective URLs or not? Am I going wrong somewhere?
has comment: http://stackoverflow.com/comment/41447920
tagged with: css
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/36633009
has comment: http://stackoverflow.com/comment/41447658
type: Question
has comment: http://stackoverflow.com/comment/41447715
has answer: http://stackoverflow.com/a/33651424
tagged with: font-awesome
tagged with: fallback
has answer: http://stackoverflow.com/a/26397805
answer count: 3
upvote count: 1
tagged with: cdn
tagged with: javascript

http://stackoverflow.com/q/26420527
tagged with: php
has body: I am having trouble getting a basic ajax POST to work. I switched to an onclick after I was having trouble getting using a jquery .click, among other things. Just wondering if I am making some blatant mistake or what. If no obvious mistake, it may be something with apache? Not too much experienced here so any help would be appreciated. Here is a link to a function: click this for php page Here is the function: function postData() { console.log("outside ajax is working"); $.ajax({ type: "POST", url: "/markerpages.php", data: { source1: "some text", source2: "some text 2"}, success: function (data) { console.log("inside ajax is working"); }, error: function () { console.log("ajax post failed") } }); here is what I have on my php webpage: <?php if (isset($_POST['source1'])) $src1 = $_POST['source1']; else $src1 = "post data not obtained"; echo $src1; echo " " . print_r($_REQUEST, 1) . " "; print_r($_POST); var_dump($_POST); var_dump($_POST);die; ?> I am not returning errors in firebug, and I am getting the log statements I placed inside ajax and outside, just not getting empty arrays on the PHP page. Sincere thanks for any help.
has comment: http://stackoverflow.com/comment/41487145
has comment: http://stackoverflow.com/comment/41487127
has answer: http://stackoverflow.com/a/26420868
linked to: http://stackoverflow.com/q/8389646
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41487556
has title: cannot retrieve POST data
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41487189
has comment: http://stackoverflow.com/comment/41487131
possible better answer: http://stackoverflow.com/a/26420634
has comment: http://stackoverflow.com/comment/41487148
tagged with: javascript
has answer: http://stackoverflow.com/a/26420582
tagged with: jquery
has answer: http://stackoverflow.com/a/26420634
tagged with: ajax
answer count: 3
has comment: http://stackoverflow.com/comment/41487251
accepted answer: http://stackoverflow.com/a/26420582

http://stackoverflow.com/q/26395528
has title: Javascript callback function not work
score: 0
answer count: 1
tagged with: callback
has answer: http://stackoverflow.com/a/26395607
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26395607
type: AnsweredQuestion
has body: I'm working with nodeJS and expressJS. I Have 2 functions, main functions: download(imgUrl, imgMD5, function(fileLength, fileSize) { console.log(fileLength); var qb = data.Img.query(); qb.where('img_md5', '=', imgMD5).update({ img_downloaded: 1 }).then(function() {}); }); and external function module.exports = function() { return function(uri, filename) { request(uri, function(err, res, callback) { fileLength = res.headers['content-length']; var mkdirs = function(fold, callback) { var pf = path.dirname(fold); fs.exists(pf, function(exists) { var create = function() { fs.mkdir(fold, callback); }; if (exists) { create(); } else mkdirs(pf, create); }) }; var folder = ('./downloaded/' + yy + '/' + mm + '/' + dd + '/' + ho + '/'); mkdirs(folder, function() { var r = request(uri).pipe(fs.createWriteStream(folder + filename)); r.on('close'); }); callback(fileLength); }); }; }; but it's fired an error when running: TypeError: string is not a function I don't know if I'm uses the callback right or not? thank you
type: Question
has comment: http://stackoverflow.com/comment/41443008
tagged with: javascript

http://stackoverflow.com/comment/41491928
comment on: http://stackoverflow.com/q/26423235
type: QuestionComment
has text: Value of console.log(ar[0]['product_name']) is "Test product"
score: 0
type: Comment

http://stackoverflow.com/comment/41646823
type: Comment
comment on: http://stackoverflow.com/a/26507254
score: 1
type: AnswerComment
has text: I have choosen this as the correct answer as it gives me exactly what I wanted in a clean way.

http://stackoverflow.com/a/26408653
downvote count: 0
type: Answer
upvote count: 2
has body: Clean and simple regex using positive lookahead. var string = "rgba(255,255,255,.75),#000000"; string.split(/(?:,(?=#)|,(?=r))+/); return ["rgba(255,255,255,.75)", "#000000"] Work with hex, rgb and rgba colors.
score: 2
answers question: http://stackoverflow.com/q/26407592
accepted answer of: http://stackoverflow.com/q/26407592
type: AcceptedAnswer

http://stackoverflow.com/a/26357821
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
has body: You are running the page locally. Please add http://:
accepted answer of: http://stackoverflow.com/q/26357707
answers question: http://stackoverflow.com/q/26357707

http://stackoverflow.com/q/26365233
has comment: http://stackoverflow.com/comment/41388025
tagged with: lightbox
has comment: http://stackoverflow.com/comment/41411241
has comment: http://stackoverflow.com/comment/41388471
has comment: http://stackoverflow.com/comment/41388316
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
type: UnansweredQuestion
score: 0
type: Question
has body: how to create 2 lightboxes on another div? i created a sample code for lightbox but the problem is... i dont know how to create the second lightbox that will appear in the same page by clicking the link... here's the css: #fade{ display: none; position: fixed; top: 0%; left: 0%; width: 100%; height: 100%; background-color: #000; z-index:1001; -moz-opacity: 0.7; opacity:.70; filter: alpha(opacity=70); } #light{ display: none; position: absolute; top: 50%; left: 50%; width: 300px; height: 200px; margin-left: -150px; margin-top: -100px; padding: 10px; border: 2px solid #FFF; background: #fff; z-index:1002; overflow:visible; the script: window.document.onkeydown = function (e) { if (!e){ e = event; } if (e.keyCode == 27){ lightbox_close(); } } function lightbox_open(){ window.scrollTo(0,0); document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block'; } function lightbox_close(){ document.getElementById('light').style.display='none'; document.getElementById('fade').style.display='none'; } then the body content: Open lightbox lightbox1 click to open lightbox2 open
has title: multiple lightboxes in one div
tagged with: javascript

http://stackoverflow.com/comment/41440684
type: QuestionComment
comment on: http://stackoverflow.com/q/26393471
score: 0
has text: Sure, I should have said "…the mask **might** be…", mask values can be any sensible Type. In ancient times, bit masks were popular, e.g. in UNIX permissions 7 -> 111 -> rwx or read, write, execute permission and 0 -> 000 -> --- or no permission. :-)
type: Comment

http://stackoverflow.com/comment/41474133
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26413003
has text: `$.ajax` doesn't read `done:` and `fail:` properties on the options object. http://api.jquery.com/jQuery.ajax

http://stackoverflow.com/a/52232755
has body: This one shows how to print only selected element on the page with dpi/resolution adjustments HTML: This is the header This is the element you only want to capture Download Pdf This is the footer CSS: body { background: beige; } header { background: red; } footer { background: blue; } #content { background: yellow; width: 70%; height: 100px; margin: 50px auto; border: 1px solid orange; padding: 20px; } JS: $('#print').click(function() { var w = document.getElementById("content").offsetWidth; var h = document.getElementById("content").offsetHeight; html2canvas(document.getElementById("content"), { dpi: 300, // Set to 300 DPI scale: 3, // Adjusts your resolution onrendered: function(canvas) { var img = canvas.toDataURL("image/jpeg", 1); var doc = new jsPDF('L', 'px', [w, h]); doc.addImage(img, 'JPEG', 0, 0, w, h); doc.save('sample-file.pdf'); } }); }); jsfiddle: https://jsfiddle.net/marksalvania/dum8bfco/
type: Answer
upvote count: 14
score: 13
downvote count: 1
has comment: http://stackoverflow.com/comment/137723335
answers question: http://stackoverflow.com/q/26481645

http://stackoverflow.com/q/26354917
accepted answer: http://stackoverflow.com/a/26354959
downvote count: 0
possible better answer: http://stackoverflow.com/a/26355128
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41368974
answer count: 2
has comment: http://stackoverflow.com/comment/41369250
has title: Display selected html tag only that is stores in js variable
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26355128
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has body: &lt;div id="div1"&gt; &lt;div id="div2"&gt; &lt;/div&gt; &lt;/div&gt; above code is responseText from ajax call. Now I am using below syntax. document.getElementById("Result").innerHTML=xmlhttp.responseText; And this displays all html tags from response. What i want is to display only div2 tag element. Thanks in advance
has comment: http://stackoverflow.com/comment/41369209
favorite count: 0
has comment: http://stackoverflow.com/comment/41369031
has answer: http://stackoverflow.com/a/26354959
type: AnsweredQuestion

http://stackoverflow.com/q/26380611
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41417573
has answer: http://stackoverflow.com/a/26380765
possible better answer: http://stackoverflow.com/a/26380667
type: Question
tagged with: jslint
has answer: http://stackoverflow.com/a/26381544
has answer: http://stackoverflow.com/a/42400644
tagged with: javascript
has body: I have been wondering what the best method is to deal with the following. someCallback: function(param1,param2,paramThatIActuallyNeed) { doSomethingWith(paramThatIActuallyNeed) } So in this example, param1 and param2 are unused, however I need to place them there in order to access that third parameter. This makes JSLint sad and I'm wondering what the practice is to avoid this? This tends to happen when using libraries with many callback results.
accepted answer: http://stackoverflow.com/a/26381544
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41419073
linked to: http://stackoverflow.com/q/6583623
has title: Best practice for unused function parameters
has answer: http://stackoverflow.com/a/26380667
has comment: http://stackoverflow.com/comment/41416037
answer count: 4
tagged with: parameters
type: AnsweredQuestion

http://stackoverflow.com/comment/41413472
type: QuestionComment
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26378656
has text: If you have a JS object you can convert it to form data with jQuery's `$.param` and PHP will read this just fine. If you aren't using jQuery you can rip it out or find equivalent

http://stackoverflow.com/q/26491897
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/26492402
tagged with: jquery
favorite count: 0
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/41617954
score: 2
has comment: http://stackoverflow.com/comment/41617905
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41617754
has title: Angular ng-blur is being triggered on focus
possible better answer: http://stackoverflow.com/a/32514411
has answer: http://stackoverflow.com/a/32514411
linked to: http://stackoverflow.com/q/27804949
type: Question
has answer: http://stackoverflow.com/a/26492402
has comment: http://stackoverflow.com/comment/41618405
tagged with: javascript
has body: I have a textarea that when one types the hash symbol "#" the focus switches to an input. The issue I am having is that when the cursor switches to the input element it is triggering the ng-blur function. angular.element('#inputElement').focus(); is triggering a blur event. Why is it triggering ng-blur? That makes no sense to me. See the demo: http://plnkr.co/edit/D3dOj90I3uQlz0OGaNjV?p=preview

http://stackoverflow.com/q/26430308
tagged with: trigonometry
tagged with: css
has answer: http://stackoverflow.com/a/26430549
has comment: http://stackoverflow.com/comment/41662399
tagged with: geometry
linked to: http://stackoverflow.com/q/26599782
has comment: http://stackoverflow.com/comment/41505773
upvote count: 1
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26430549
has comment: http://stackoverflow.com/comment/41662117
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41662155
has title: Absolutely Position Element Around a Circle
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/42748429
has body: I've got some html with an embedded SVG within it as below &lt;section id="deck-head"&gt; &lt;svg xmlns="http://www.w3.org/2000/svg" width="250" height="250"&gt; &lt;g&gt; &lt;title&gt;Marker&lt;/title&gt; &lt;g id="marker-frame"&gt; &lt;path fill="white" d="m133.300003,64.800003l0,-33.500004l-16.100006,0l0,33.299999c-30.799995,3.700005 -53.499996,29.599998 -53.499996,60.800003c0,33.900002 27.600002,61.299995 61.299999,61.299995s61.300003,-27.399994 61.300003,-61.299995c0,-30.900002 -23.600006,-56.599998 -53,-60.599998zm-53.5,60.699997c0,-24.900002 20.299995,-45.199997 45.199997,-45.199997s45.199997,20.299995 45.199997,45.199997s-20.199997,45.300003 -45.199997,45.300003s-45.199997,-20.400009 -45.199997,-45.300003z"/&gt; &lt;/g&gt; &lt;/g&gt; &lt;/svg&gt; &lt;mark&gt;90&amp;deg;&lt;/mark&gt; &lt;/section&gt; I need to be able to replicate the following layout without using any external javascript libraries Ignore Red I've managed to rotate the SVG simply enough to face the correct direction - however the trouble I'm having is getting the element to absolutely position by the tick/tip of the pink circle, depending on where its rotated to. The logic in my head that I was following was something along the lines of: Get the circle center point Get the rotation Find out what the left &amp; top position would be based off the above. However I'm completely lost on what the calculation would be to get the top and left coordinates to be able to absolutely position the mark where it should be.

http://stackoverflow.com/comment/41497795
comment on: http://stackoverflow.com/a/26425456
has text: I agree a front-end solution was not the way to go, so I ended up using the backend casting solution which worked great. I think by the time the data gets to the front end, it should be in the correct datatype.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26492285
has comment: http://stackoverflow.com/comment/41622906
has body: From your example, as to why $('#report tr') does not receive the keypress event: A keypress event handler can be attached to any element, but the event is only sent to the element that has the focus. (https://api.jquery.com/keypress/) However you cannot simply give focus to $('#report tr') with $('#report tr').focus(): The focus event is sent to an element when it gains focus. This event is implicitly applicable to a limited set of elements, such as form elements (, , etc.) and links (). In recent browser versions, the event can be extended to include all element types by explicitly setting the element's tabindex property. (https://api.jquery.com/focus/) If you wish to give $('#report tr') focus you will need to set a tabindex on your $('#report tr') elements. An example of how this may be implemented: Pass keypress event to TR data 1 data 2 data 3 data 4
type: Answer
has comment: http://stackoverflow.com/comment/41618572
score: 0
answers question: http://stackoverflow.com/q/26490594

http://stackoverflow.com/comment/41506611
type: QuestionComment
comment on: http://stackoverflow.com/q/26430628
has text: added a fiddle above
score: 0
type: Comment

http://stackoverflow.com/a/26370755
type: Answer
answers question: http://stackoverflow.com/q/26370662
has body: You might try replacing the "--" part with "00" - just insert the replace before the ,€ part.
score: 0

http://stackoverflow.com/q/26355919
score: 1
has comment: http://stackoverflow.com/comment/41371330
accepted answer: http://stackoverflow.com/a/26356347
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41370969
has body: I have a side bar menu there are items home, gallery , who is the best and competition. There is a collapse and expand drop down for gallery and who is the best and that are working properly.There in the competition tab a dropdown name toplist this week, and the toplist this week have another drop down of 5 items.I want that like gallery when i clik the competition the toplist this week appear and when i click the toplist this week the items appear and like gallery there be expand and collapse. HTML: Home Gallery Cars Movies Babies Puppies Who is the best Vote for Cars Vote for Sports Vote for Movies Competition Toplists of Weak Sports Cars Movies Images Babies CSS: #nav { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } #nav, #nav ul { list-style: none; padding: 0; width: 199px; } #nav ul { position: relative; z-index: -1; } #nav li { position: relative; z-index: 100; } #nav ul li { margin-top: -23px; -moz-transition: 0.4s linear 0.4s; -ms-transition: 0.4s linear 0.4s; -o-transition: 0.4s linear 0.4s; -webkit-transition: 0.4s linear 0.4s; transition: 0.4s linear 0.4s; } #nav li a { background-color: #d4d5d8; color: #000; display: block; font-size: 12px; font-weight: bold; line-height: 28px; outline: 0; padding-left: 15px; text-decoration: none; } #nav li a.sub { background: #d4d5d8 url("../images/down.gif") no-repeat; } #nav li a + img { cursor: pointer; display: none; height: 28px; left: 0; position: absolute; top: 0; width: 200px; } #nav li a img { border-width: 0px; height: 24px; line-height: 28px; margin-right: 8px; vertical-align: middle; width: 24px; } #nav li a:hover { background-color: #bcbdc1; } #nav ul li a { background-color: #eee; border-bottom: 1px solid #ccc; color: #000; font-size: 11px; line-height: 22px; } #nav ul li a:hover { background-color: #ddd; color: #444; } #nav ul li a img { background: url("images/bulb.png") no-repeat; border-width: 0px; height: 16px; line-height: 22px; margin-right: 5px; vertical-align: middle; …
has comment: http://stackoverflow.com/comment/41370928
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: web
favorite count: 0
has answer: http://stackoverflow.com/a/26356347
has comment: http://stackoverflow.com/comment/41371005
has comment: http://stackoverflow.com/comment/41370987
upvote count: 1
tagged with: css
has title: Collapse and Expand not working in css
type: AnsweredQuestion

http://stackoverflow.com/comment/41372853
score: 0
comment on: http://stackoverflow.com/a/26356497
type: Comment
has text: @Roamer-1888 yes that may be possible, depending on the app - if you have a different solution, you can still post an answer
type: AnswerComment

http://stackoverflow.com/q/26512402
has title: CSS scale and translate issues. How do they do it properly?
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41655668
tagged with: scaling
type: Question
tagged with: transform
has comment: http://stackoverflow.com/comment/41655149
has body: This is all mobile browser related, not desktop. I'm trying to make a certain div to maintain its dimensions relative to device screen. So when the user zoom in/out, the DIV and its content (image) will stay the same, nor blurry, not pixelated. It's very hard to do it XBrowser. I thought that I was almost there but then I saw it on iPhone 5S and every time I used my method, it came out blurry. I wish it could look like they did it on this website. Please try it on mobile and wait for the footer splash to appear. They made it so well, no matter which device you have, the splash in the footer remains the same. Could you please help me on establishing a similar splash behavior? I am this close to give up :( Here's what I tried so far. A bit of code and pseudo code: I get the current viewport width and height I get the scaleW and scaleH by dividing the vpWidth and vpHeight by screen.availWidht and screen.acailheight accordingly. I have a problem on choosing which scale to put in the CSS so if it's portrait, i use the scaleW or else, scaleH (Is this a good method?). I calculate the left and top of the element in this way: left = (vpWidth-width*scale)/2; top = (vpHeight-height*scale)/2; where width and height are the div's width and height I calculate the 'translate' like this: translate = -((1 - scale) / 2) * 100; I saw it in the website that I talked about and frankly, it makes sense. I then apply this code to the div style: -webkit-transform:translate(&lt;%= translate + '%' + ',' + translate + '%' %&gt;) scale(&lt;%= scale %&gt;) translateZ(0px); and of course add the left and top properties. I'm pretty novice in CSS :( so i learn from code and examples. Not novice in coding at all.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41663850
answer count: 0

http://stackoverflow.com/comment/41468453
type: AnswerComment
comment on: http://stackoverflow.com/a/26410111
type: Comment
has text: Thanks a lot, but if I want to include some CSS code or a local file? .insertCSS('/path/style.css') ?
score: 0

http://stackoverflow.com/comment/41480447
comment on: http://stackoverflow.com/q/26416513
score: 0
type: Comment
has text: you're missing the closing quote on you're ng-controller attribute. can't say that's the issue for sure, but if those functions aren't running (can't determine if they are from your post), it probably is...
type: QuestionComment

http://stackoverflow.com/q/26431010
tagged with: http://stackoverflow.com/tag/json
has body: How i can parse this json [ {"CODE":"1","MONTH":"1","TOTAL":78}, {"CODE":"1","MONTH":"2","TOTAL":122}, {"CODE":"1","MONTH":"3","TOTAL":102}, {"CODE":"1","MONTH":"4","TOTAL":65}, {"CODE":"1","MONTH":"5","TOTAL":134}, {"CODE":"1","MONTH":"6","TOTAL":88}, {"CODE":"1","MONTH":"7","TOTAL":77}, {"CODE":"1","MONTH":"8","TOTAL":58}, {"CODE":"1","MONTH":"9","TOTAL":67}, {"CODE":"1","MONTH":"10","TOTAL":69}, {"CODE":"2","MONTH":"5","TOTAL":4}, {"CODE":"2","MONTH":"6","TOTAL":87}, {"CODE":"2","MONTH":"7","TOTAL":81}, {"CODE":"2","MONTH":"8","TOTAL":105}, {"CODE":"2","MONTH":"9","TOTAL":112}, {"CODE":"2","MONTH":"10","TOTAL":85}, ] To this format series: [{ name: '1', data: [78, 122, 102, 65, 134, 88, 77, 58, 67, 69, 0, 0] }, { name: '2', data: [0, 0, 0, 0, 4, 87, 81, 105, 112, 85, 0, 0] }] With an javascript or jquery function efficiently? In the Json every row represents a total value for each code (1 or 2) per month For the CODE=1 i have totals only for ten months (month 1 = jan, month 2= feb ... month 10= oct) For the CODE=2 i have totals only for five months between may and octuber. In this array [78, 122, 102, 65, 134, 88, 77, 58, 67, 69, 0, 0] 78 is the total for january, 122 for february, 102 for march ... For those months that i do not have a total, like november or december for example , i need to put a 0 My json will return more info, with more codes i can't use brute force Thanks in advance JC
has title: Parse json to especific format
has answer: http://stackoverflow.com/a/26431404
has comment: http://stackoverflow.com/comment/41508029
has comment: http://stackoverflow.com/comment/41509034
has answer: http://stackoverflow.com/a/26431543
has comment: http://stackoverflow.com/comment/41506889
tagged with: javascript
type: UnansweredQuestion
downvote count: 4
answer count: 3
has answer: http://stackoverflow.com/a/26431716
tagged with: jquery
has comment: http://stackoverflow.com/comment/41507000
favorite count: 0
type: Question
upvote count: 2
score: -2
has comment: http://stackoverflow.com/comment/41509128

http://stackoverflow.com/q/26491000
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26491167
type: Question
score: -2
has body: please help to fix the script. after the user clicks on an item .menu_button, there is a call function initForm(). This function should print one console.log(N) but displays 3: console.log(1) console.log(2) console.log(3) I do not understand js: $(document).ready(function() { // --- PLUGIN kalininModals INITIALIZATION --- $('.menu_button').kalininModals(); ); (function($){ // --- options --- $.fn.kalininModals = function(options) { var options = $.extend({},options); return this.each(function(e) { // --- properties --- var self = $(this), selfModals = $('#modalOuter'), selfModalsWindow = $('#modalWindow'), head, info, actionsArr; // --- methods --- function initForm(formNum){ //console.log('___' + self.text()); if(formNum == 1){ console.log(1); head = 'Обратный звонок'; } else if(formNum == 2){ console.log(2); head = 'Обратный звонок'; } else if(formNum == 3){ console.log(3); head = 'Обратный звонок'; }; } function makeBody(){ console.log('make'); $('#head .h2').text(head); $('#info').html(info); } // --- handlers --- function onClickControls(e){ self = $(e.currentTarget); initForm(self.attr('data-form-num')); makeBody(); } // --- events --- $('#menuButton1, #menuButton2, #menuButton3').on('click', onClickControls); }); }; })($);
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41616156
has comment: http://stackoverflow.com/comment/41616335
downvote count: 3
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41616382
favorite count: 0
has title: how to identify the element that was clicked?

http://stackoverflow.com/a/26356748
answers question: http://stackoverflow.com/q/26356667
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41372592
has comment: http://stackoverflow.com/comment/41372403
type: Answer
has body: $scope.$watch('dt',function(oldVal,newVal,attr){ if($scope.dt &gt; $scope.dt2){ $scope.dt2 = newVal; } }); $scope.$watch('dt2',function(oldVal,newVal,attr){ if($scope.dt &gt; $scope.dt2){ $scope.dt = newVal; } });
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26356667

http://stackoverflow.com/a/26383411
answers question: http://stackoverflow.com/q/26382146
score: 0
type: Answer
has body: I found what was causing the error: Why does JavaScript only work after opening developer tools in IE once? So frustrating and so simple. It was caused by the console.logs in the script. Without them it works like a charm.
accepted answer of: http://stackoverflow.com/q/26382146
type: AcceptedAnswer

http://stackoverflow.com/a/26416998
has comment: http://stackoverflow.com/comment/41481433
answers question: http://stackoverflow.com/q/26416973
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41481312
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26416973
has comment: http://stackoverflow.com/comment/41482687
has body: var test1 = function() {...}; var test2 = test1; // now both of the following work test1(); test2(); If you are working in a web browser you can also assign this function to a string value in the global object, window. Such as this var originalFunction = function() {....}; var newName = "foo"; window[newName] = originalFunction; // now both of the following work. foo(); originalFunction();
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/26439906
upvote count: 1
has comment: http://stackoverflow.com/comment/41523459
has body: The problem here is that the first one does not match because there is nothing after the e, thus it has to check for an e followed by something that isn't a letter or end of input. However, the third example doesn't work because in 2*e*e*2 the first match is *e*, thus both * are "consumed", so what's left of the string is only e*2. This obviously doesn't fix the problem. What can be used in stead is a negative lookahead. They are written as a(?!b) in regex and (in this case) means an a not followed by a b. So we make the regex into ([^a-zA-Z])e(?![a-zA-Z). However, this still does not match the simple string e, because there is nothing in front of it. In something that's not JavaScript we could use a negative lookbehind, though js doesn't support this, so rather just change it to (^|[^a-zA-Z])e(?![a-zA-Z]). The meaning is: Find any e that is at the beginning of the string, or after something that's not a-z or A-Z, and is not followed by an a-z or A-Z. Here is working demo: http://regex101.com/r/wQ1oW3/3 (note, I replaced with &lt;input&gt; though, because it's simpler to see that the replacing is right.)
answers question: http://stackoverflow.com/q/26439658
has comment: http://stackoverflow.com/comment/41523784
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41523745
accepted answer of: http://stackoverflow.com/q/26439658
has comment: http://stackoverflow.com/comment/41523728
type: Answer
has comment: http://stackoverflow.com/comment/41523767
score: 1

http://stackoverflow.com/comment/41374052
has text: IE 9 But in another pages i have same structure and it works
type: Comment
comment on: http://stackoverflow.com/q/26357653
score: 0
type: QuestionComment

http://stackoverflow.com/a/26379957
has body: If you are getting the data in the alert box then the error may be the format in which you are getting the response data. It might not be a integer value. It might be a string with white spaces. you can try data.trim() == '0'
type: Answer
has comment: http://stackoverflow.com/comment/41415026
score: 0
answers question: http://stackoverflow.com/q/26379767

http://stackoverflow.com/comment/41405294
type: AnswerComment
type: Comment
has text: I wanted to send pixel data of one canvas to another canvas. So from this I understand that there is no frame buffer associated with an html canvas. If I need a frame buffer I would need to use the buffer of the display system (like the X window system), right? Emitting signals such as 'line' from the server and redrawing them in the client works fine. But the same can't be done for canvases containing non-vector graphics (jpeg images for eg). In those cases having a frame buffer is the only way to go I guess
comment on: http://stackoverflow.com/a/26370354
score: 0

http://stackoverflow.com/comment/41485220
comment on: http://stackoverflow.com/q/26417816
has text: Please provide a test case to reproduce.
score: 0
type: Comment
type: QuestionComment

razor
tags question: http://stackoverflow.com/q/26377648
tags question: http://stackoverflow.com/q/26403701
tags question: http://stackoverflow.com/q/26362654
tags question: http://stackoverflow.com/q/26471805
tags question: http://stackoverflow.com/q/26489314
type: Tag
tags question: http://stackoverflow.com/q/26423083
tags question: http://stackoverflow.com/q/26361876
tag name: razor
tags question: http://stackoverflow.com/q/26504609
tags question: http://stackoverflow.com/q/26440554
tags question: http://stackoverflow.com/q/26359893
tags question: http://stackoverflow.com/q/26465915
tags question: http://stackoverflow.com/q/26393629
tags question: http://stackoverflow.com/q/26378121
tags question: http://stackoverflow.com/q/26397830

http://stackoverflow.com/a/26466841
has comment: http://stackoverflow.com/comment/41599840
accepted answer of: http://stackoverflow.com/q/26466570
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26466570
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41597395
has body: As far as I am aware .click will attach to the item when it is executed, if the item is not there, in the case of a widget it will not be attached. I could be wrong on that, try this and see if it works. $('body').on('click', '#myID', function() { ... });
type: Answer

http://stackoverflow.com/comment/41630036
type: QuestionComment
has text: Add a common class name to the elements you want to sum and then use `getElementsByClassName()`. You can have as many different class names on any given object so you can always add a class name to a set of objects for purposes like this.
score: 0
comment on: http://stackoverflow.com/q/26498177
type: Comment

http://stackoverflow.com/q/26377509
has body: I want to do JavaScript validation for Checkbox If Value from Checkbox is not selected, it should get alert "Please Select Languages You Know" But if user select 2 Languages from list of checkbox. I need that 2 languages should get alert using JavaScript. I know to do with single checkbox, but not getting how to do using array. Here is my Code... Language : English Marathi Hindi Submit Thank You, Rahul
answer count: 2
tagged with: arrays
tagged with: listbox
has comment: http://stackoverflow.com/comment/41411683
has title: JavaScript Validation For Checkbox, When Multiple checkbox selected from option list
tagged with: javascript
has answer: http://stackoverflow.com/a/26378502
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
downvote count: 0
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/41413520
has answer: http://stackoverflow.com/a/26379722
has comment: http://stackoverflow.com/comment/41410369
favorite count: 0
has comment: http://stackoverflow.com/comment/41411525
type: Question
upvote count: 2

http://stackoverflow.com/a/26377832
accepted answer of: http://stackoverflow.com/q/26377780
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41410974
type: Answer
score: 1
upvote count: 1
has body: You only need this: $("#createmangelpagecollapsible").on("click", 'li', function() { alert($(this).text()); }); Demo As #test1 and #test2 uls are also genrated on the fly so you can't have it as a closest parent element as a selector, the other side you're appending ul to #createmangelpagecollapsible div so use it as a closest parent element(container).
answers question: http://stackoverflow.com/q/26377780

http://stackoverflow.com/comment/41463403
type: QuestionComment
has text: @SimonPaquet In firebug, the status is showing `Aborted`
score: 0
comment on: http://stackoverflow.com/q/26406996
type: Comment

http://stackoverflow.com/q/26384696
has comment: http://stackoverflow.com/comment/41423577
tagged with: javascript
has comment: http://stackoverflow.com/comment/55582812
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41423515
has body: I am trying to use pace to show animation while models are load asynchronously I installed it using bower and imported the js and css files. app.import('bower_components/pace/pace.js'); Then I created a loading route //app/routes/loading.js var LoadingRoute = Ember.Route.extend({ activate: function() { this._super(); return Pace.restart(); }, deactivate: function() { this._super(); return Pace.stop(); } }); But on application loading it says Pace is not defined. Shoudn't ember-cli set Pace as a global variable. what am I missing. What is the right way to integrate pace in your ember cli project?
tagged with: ember-cli
accepted answer: http://stackoverflow.com/a/26385002
tagged with: ember.js
has comment: http://stackoverflow.com/comment/41423858
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/55748718
has title: How to use pace with ember cli application
type: Question
has answer: http://stackoverflow.com/a/26385002

http://stackoverflow.com/q/26429449
has title: Add data in the duplicate row in table using jquery
has body: So let say I have a data date row in my table already and I enter another data with the same date. How can I add my other inputted dates to the duplicated row. I'm doing this using jquery I'm also dynamically adding table row using jquery Example: I have this table 2014-10-18 1 then I have a modal form which has date picker and textbox let say I Pick the same data "2014-10-18" and added a new value 2. What I want is when I add this record I want my table row with the same date "2014-10-18" be added the value 2 to the data 1 The output would be like this 2014-10-18 3
answer count: 0
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/41503861
has comment: http://stackoverflow.com/comment/41504483
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/41512269
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0

http://stackoverflow.com/q/26438825
has title: How do I unbind this piece of jquery?
has answer: http://stackoverflow.com/a/26448462
score: 0
tagged with: jquery-ias
type: Question
has comment: http://stackoverflow.com/comment/41522782
tagged with: shopify
tagged with: javascript
has body: My Shopify store uses Ajax call's to add products to the cart and jQuery to update the front-end. I recently installed infinite-ajax-scroll but this brought some issues. When scrolling down to the products loaded by infinite-ajax-scroll, and then click on the add to cart button, the ajax calls &amp; jQuery updates don't work anymore, it redirects me to the cart page. I solved this by reinitialising the piece of jQuery code that "ajaxifies" the shop using infinite-ajax-scroll's rendered event. But now when scrolling down to the 20 new products loaded by infinite-ajax-scroll, ajaxifyShopify get's initialized for the second time on the first 20 products. When adding one of the first 20 products to the cart, they get added twice. I tried unbinding the first ajaxifyShopify with jQuery's .off() but it doesn't work. The complete code for ajaxifyShopify can be found on line 261 here. Every time a new page loads, ajaxifyShopify get's initialized to "ajaxify" the page. Here's my code: jQuery(function($) { ajaxifyShopify.init({ method: '{{ settings.ajax_cart_method }}', wrapperClass: 'wrapper', formSelector: '#addToCartForm', addToCartSelector: '#addToCart', cartCountSelector: '#cartCount', toggleCartButton: '.cart-toggle', useCartTemplate: true, btnClass: 'btn', moneyFormat:, disableAjaxCart: false, enableQtySelectors: true }); }); console.log('ajaxifyShopify initialized for the first time'); var ias = jQuery.ias({ container: '#products', item: '.single-product', pagination: '.pagination-custom', next: '.next' }); ias.extension(new IASSpinnerExtension({ src: '{{ "spiffygif_36x36.gif" | asset_url }}' })); ias.on('rendered', function(data, items) { console.log('ias rendered'); // Unbind ajaxifyShopify $("html").off("ajaxifyShopify"); console.log('ajaxifyShopify off'); // Initialize ajaxifyShopify jQuery(function($) { ajaxifyShopify.init({ method: '{{ settings.ajax_cart_method }}', wrapperClass: 'wrapper', formSelector: '#addToCartForm', addToCartS…
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26448462
tagged with: ajax
answer count: 1
has comment: http://stackoverflow.com/comment/41522933
has comment: http://stackoverflow.com/comment/41522867
type: AnsweredQuestion

http://stackoverflow.com/q/26408074
upvote count: 1
has answer: http://stackoverflow.com/a/26408423
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41465220
answer count: 1
tagged with: javascript
has body: I'm wondering, as there are domainLookupStart and domainLookupEnd attributes in the window.performance object in modern browsers, is there any way to know the domain lookup time of scripts that are hosted on third-party sites ? or is this time already included in the given domainLookupStart and domainLookupEnd ?
score: 0
tagged with: cross-domain
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has title: Get HTML5 performance object for cross-domain script tag

http://stackoverflow.com/a/26363285
has comment: http://stackoverflow.com/comment/41384862
score: 2
has body: You say your files are in the root. What you can try is to add / before the file to force it to take the root: url: "/new_keyword_city_common.php", If this doesn't work try an absolute path. Add the whole domain name before the PHP file. For example: url: "http://yourdomainhere.com/new_keyword_city_common.php",
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/26362917
type: Answer

http://stackoverflow.com/comment/41424388
score: 1
comment on: http://stackoverflow.com/q/26385145
type: Comment
type: QuestionComment
has text: I'm not clear about what you are asking, can you elaborate a little bit more?

http://stackoverflow.com/a/26367419
answers question: http://stackoverflow.com/q/26367168
downvote count: 0
has body: Edit: After rereading your question: When a radio button is clicked, an ajax call is made to check if any of the rows need to be disabled, and the grid is refreshed. It sounds like that could be the culprit. Is there any chance that the ajax request is a synchronous request (async: false) and triggered before your click handler? There could be a click handler attached to these radio buttons before you've bound yours. That first handler would get executed first, and a synchronous request would block all other code from executing until it completes... the AJAX request may be taking ~500ms. That could also explain this odd behavior: but even this simple code has a lag of ~500ms on the page before it takes affect. Other times it happens almost immediately. If this is what's going on, you want to disable the radio buttons from inside of that handler before the AJAX request is made. Your code doesn't look like it should take ~500ms to run -- even if there are an insane number of radio buttons on the page. 2 ways that you could write the same code more efficiently are: Cache radio buttons: Your code searches the DOM for all of the radio buttons when one is clicked. You could speed up the execution of the click handler by searching for the radio buttons ahead of time. Use 1 event handler: Use 1 delegated event handler on the body, rather than setting up a click handler on every single input. It could be that there are a ton of radio buttons and binding the click handler on every one of them may be taking longer than expected... but it would have to take a lot of inputs for this to be the culprit. $(document).ready(function() { // cache radiobuttons var all_radiobuttons = $('input[type="radio"]'); // This one handler on the body will handle clicks events for all input[type="radio"]. $(document.body).on('click', 'input[type="radio"]', function() { all_radiobuttons.prop('disabled', true); }); }); Test Test
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/q/26444903
favorite count: 0
has title: pass lat/lon from google geocode to google places
type: UnansweredQuestion
tagged with: google-places-api
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: google-geocoding-api
tagged with: javascript
has body: I am working on a project to show a list of coffee shops nearby based on user input address. In separate scripts I can get the text address to give me a lat/lon and google places to show on a map but when I try to combine them, the lat/lon from the text address isn't getting passed to the google places. I am still learning javascript so I don't know if it's an asynchronous thing or what. I have read tons of SO questions and the API docs but I just can't figure it out. Thanks! Here is my submit form: Here is my JavaScript: var map; var infowindow; var centralLocation = null; var side_bar_html = " "; var gmarkers = []; var address = null; var lat = null; var lng = null; var service = null; var bounds = null; function initialize() { centralLocation = new google.maps.LatLng(38.907, -77.036); var request = { location: centralLocation, keyword: ['coffee'], types: ["cafe", "restaurant", "bakery"], rankBy: google.maps.places.RankBy.DISTANCE }; infowindow = new google.maps.InfoWindow(); bounds = new google.maps.LatLngBounds(); map = new google.maps.Map(document.getElementById('map'), { mapTypeId: google.maps.MapTypeId.ROADMAP, zoom: 15 }); service = new google.maps.places.PlacesService(map); var query = location.search.substring(1); var pairs = query.split("&"); for (var i=0; i<pairs.length; i++) { var pos = pairs[i].indexOf("="); var argname = pairs[i].substring(0,pos).toLowerCase(); var value = pairs[i].substring(pos+1).toLowerCase(); if (argname == "lat") {lat = parseFloat(value);} if (argname == "lng") {lng = parseFloat(value);} if (argname == "address") { address = unescape(value) geocoder = new google.maps.Geocoder(); var searchaddress = document.getElementById('searchaddress').value; console.log(searchaddress); geocoder.geocode({"searchaddress": address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { centralLocation = results[0].geometry.location; map.setCenter(centralLocation); map.fitBounds(results[0].geometry.viewport); if (!service) se…
downvote count: 0

http://stackoverflow.com/comment/41609702
score: 1
has text: I think you are missing an include for the jQuery UI datepicker - you only include the localized content for it.
comment on: http://stackoverflow.com/q/26487765
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41579428
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26470439
has text: @Dano007 Your screenshot only shows "Work" inside the selected div. Can you add some code to your question showing where the other items would be?

http://stackoverflow.com/q/26396181
upvote count: 1
possible better answer: http://stackoverflow.com/a/26396217
has body: I am generating a lot of content on a page via javascript and I am noticing that the page won't display anything at all until the javascript has finished running. If you run this simple page, you can see the numbers counting down in the console and then when the loop is done, finally the content loads on the page. Hello Isn't there a way to a) display the static page content immediately and b) display each bit of generated text as soon as it is created? Am I right to guess that if there is a way it will slow down the loop a lot? Maybe I could have a compromise where it displays a screen-worth of content immediately and then loops quickly through the rest in the usual manner. I just don't want to have to sit for a few seconds to wait to see the content on the page when I know it has already been generated.
accepted answer: http://stackoverflow.com/a/26396317
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26396217
tagged with: performance
type: Question
has title: Update a page in the middle of a javascript loop
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26396317
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41443970
linked to: http://stackoverflow.com/q/19058858

http://stackoverflow.com/comment/41434642
type: Comment
has text: You can't...you'd have to loop... how else would you run a method that takes 1 ID on multiple ID's but only calling once?
comment on: http://stackoverflow.com/q/26390735
score: 3
type: QuestionComment

http://stackoverflow.com/q/26412059
has body: I have an html5 theme that supports IE8 by js however my pages can't pass Google pagespeed test. I need to defer javascript and CSS. My page has following header: <!--[if lte IE 8]> <![endif]--> <!--[if lte IE 8]> <![endif]--> I tried following code for deferring however my page didn't display correctly. I don't know javascript well but I think browser renders only scripts, not css. Here are my files: How can I defer javascript and css?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/43674460
type: Question
has title: Can't defer javascript and CSS together
tagged with: performance
tagged with: javascript
has answer: http://stackoverflow.com/a/26412154
score: 0
answer count: 2
tagged with: jquery

http://stackoverflow.com/comment/41508932
type: Comment
score: 1
has text: You might be able to use Chrome dev tools' Event Listener Breakpoints, which set global breakpoints on any of a large list of supported event types. See [my answer here](http://stackoverflow.com/a/20890470/1883647) for how to set them up. You can probably set the Mouse > click one, then click on the textarea and start stepping through the code to see where it goes, which should lead you to what's listening for the click. From there you can hopefully figure out how the listener is attached in the first place, if you need to know that.
type: QuestionComment
comment on: http://stackoverflow.com/q/26431845

http://stackoverflow.com/a/26398720
answers question: http://stackoverflow.com/q/26397260
score: 0
has body: You can use extenders on observables to implement this kind of validation. Here's a sample implementation using the extender code from the Knockout documentation, just click "Run code snippet" to see a working demo: JS & HTML: ko.extenders.required = function(target, overrideMessage) { //add some sub-observables to our observable target.hasError = ko.observable(); target.validationMessage = ko.observable(); //define a function to do validation function validate(newValue) { target.hasError(newValue ? false : true); target.validationMessage(newValue ? "" : overrideMessage || "This field is required"); } //initial validation validate(target()); //validate whenever the value changes target.subscribe(validate); //return the original observable return target; }; function TestViewModel() { var self = this; self.name = ko.observable('').extend({ required: "Required" }); } ko.applyBindings(new TestViewModel()); Name:
type: Answer

http://stackoverflow.com/q/26381247
has title: AngularJS: is $$hashkey a reliable key
has answer: http://stackoverflow.com/a/26382609
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26382444
type: Question
possible better answer: http://stackoverflow.com/a/26382444
accepted answer: http://stackoverflow.com/a/26382609
answer count: 2
has body: Question I'm interested in the properties of $$hashkey on angular arrays/objects. Would each generated hashkey be the same each time you reload a page; a quick test tells me yes but I somewhat assumed it wouldn't? If you updated/added to the existing array, would the old hashkey's stay consistent? If the above is true, is there a way to fetch from an array using the hashkey? - of cause I could roll my own but before I recreate the wheel I thought I'd ask. Example: Views would include: form data (example has 1 form) element data (example has 2 elements) element options data (example has 2 options per element) Fetch method: angular.get($$hashkey); You would then pass the hashkey of the element and it would return a reference to that array inside the full array. Lastly the data would be: { form_id: 1 form_desc: 'xxx', form_name: 'name 1', Elements: [ { element_id: 1, element_name: 'element1', default_value: null, disabled: "0", element_type: "image", ElementOptions: [ { show: false, sort_order: 0, value: "ar", }, { show: true, sort_order: 1, value: "rw", } ], }, { element_id: 2, element_name: 'element2', default_value: null, disabled: "0", element_type: "image", ElementOptions: [ { show: false, sort_order: 0, value: "ar", }, { show: true, sort_order: 1, value: "rw", } ], } ] }
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/26478062
downvote count: 0
has title: HTML Video mute button
score: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26478173
accepted answer: http://stackoverflow.com/a/26478173
tagged with: html5-video
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/26478263
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41593065
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26478263
type: AnsweredQuestion
has body: I have tried to create a function in javascript to mute a html video, and change the icon below to a mute icon that i have downloaded. Need Help. The javascript has to be able to work along side jquery as well

http://stackoverflow.com/a/26477656
answers question: http://stackoverflow.com/q/26477612
score: 0
type: Answer
has body: Try this $("a#currencyBtn").click(function(){ var value = $('#currencyVal').val(); var input = $('.currencyCopy'); input.val(value); });

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/26446608
tags question: http://stackoverflow.com/q/26436100
tags question: http://stackoverflow.com/q/26414675
tags question: http://stackoverflow.com/q/26418777
tags question: http://stackoverflow.com/q/26386905
tags question: http://stackoverflow.com/q/26371221
tags question: http://stackoverflow.com/q/26364007
tags question: http://stackoverflow.com/q/26483793
tags question: http://stackoverflow.com/q/26466644
tags question: http://stackoverflow.com/q/26497609
tags question: http://stackoverflow.com/q/26362136
tags question: http://stackoverflow.com/q/26448429
tags question: http://stackoverflow.com/q/26508299
tags question: http://stackoverflow.com/q/26392165
tags question: http://stackoverflow.com/q/26387455
tags question: http://stackoverflow.com/q/26503271
tags question: http://stackoverflow.com/q/26492227
tags question: http://stackoverflow.com/q/26506445
tags question: http://stackoverflow.com/q/26371410
tags question: http://stackoverflow.com/q/26417181
tags question: http://stackoverflow.com/q/26470944
tag name: svg
tags question: http://stackoverflow.com/q/26453769
tags question: http://stackoverflow.com/q/26410653
tags question: http://stackoverflow.com/q/26495966
tags question: http://stackoverflow.com/q/26471497
tags question: http://stackoverflow.com/q/26372401
tags question: http://stackoverflow.com/q/26371794
tags question: http://stackoverflow.com/q/26499849
tags question: http://stackoverflow.com/q/26466532
tags question: http://stackoverflow.com/q/26468268
tags question: http://stackoverflow.com/q/26392581
tags question: http://stackoverflow.com/q/26395104
tags question: http://stackoverflow.com/q/26490861
tags question: http://stackoverflow.com/q/26509872
tags question: http://stackoverflow.com/q/26365420
tags question: http://stackoverflow.com/q/26408148
tags question: http://stackoverflow.com/q/26417273
tags question: http://stackoverflow.com/q/26382262
tags question: http://stackoverflow.com/q/26382950
tags question: http://stackoverflow.com/q/26509625
tags question: http://stackoverflow.com/q/26419622
tags question: http://stackoverflow.com/q/26420511
tags question: http://stackoverflow.com/q/26409687
tags question: http://stackoverflow.com/q/26454460
tags question: http://stackoverflow.com/q/26377498
tags question: http://stackoverflow.com/q/26434304
tags question: http://stackoverflow.com/q/26462745
tags question: http://stackoverflow.com/q/26407761
tags question: http://stackoverflow.com/q/26475779
tags question: http://stackoverflow.com/q/26449472
tags question: http://stackoverflow.com/q/26469415
tags question: http://stackoverflow.com/q/26429925
tags question: http://stackoverflow.com/q/26461840
tags question: http://stackoverflow.com/q/26433551
tags question: http://stackoverflow.com/q/26409078
tags question: http://stackoverflow.com/q/26395227
tags question: http://stackoverflow.com/q/26426521
tags question: http://stackoverflow.com/q/26363258
type: Tag
tags question: http://stackoverflow.com/q/26424765

http://stackoverflow.com/q/26400605
accepted answer: http://stackoverflow.com/a/26400722
type: AnsweredQuestion
score: 1
has body: I have these two methods that pretty much does the same thing. I would like to improve this by just re-using the other method, something like method overriding in an Object Oriented Programming. Method 1 Summary: Based on the level, make a post request to a Servlet that returns all the courses for that particular level in JSON format (response). Then load these courses to the combo box ($loadTo). After that pre-select a course provided and show some modal. function loadCoursesByLevelThenSet(level, course, $loadTo) { $.post( ... , ... , function(response) { var options = ' Please select course... '; for (var i = 0; i < response.length; i++) { ... } $loadTo.html(options); $loadTo.val(course); $('#modal').modal('show'); }).fail(function() { alert('Something went wrong while loading options for courses. Please try again.'); }); } Method 2 Summary: Based on the level, make a post request to a Servlet that returns all the courses for that particular level in JSON format (response), then load these courses to the combo box ($loadTo). function loadCoursesByLevel(level, $loadTo) { $.post( ... , ... , function(response) { var options = ' Please select course... '; for (var i = 0; i < response.length; i++) { ... } $loadTo.html(options); }).fail(function() { alert('Something went wrong while loading options for courses. Please try again.'); }); } This is what I came up, but it doesn't work correctly: function loadCoursesByLevelThenSet(level, course, $loadTo) { if (loadCoursesByLevel(level, $loadTo) === true) { //after the courses are fully loaded //select a course //and show the modal $loadTo.val(course); $('#modal').modal('show'); } } function loadCoursesByLevel(level, $loadTo) { $.post( ... , ... , function(response) { var options = ' Please select course... '; for (var i = 0; i < response.length; i++) { ... } $loadTo.html(options); }).fail(function() { alert('Something went wrong while loading options for courses. Please try again.'); }).done(function() { return true; }); } …
has title: Re-using JavaScript Method
favorite count: 0
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26400722
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26439805
has comment: http://stackoverflow.com/comment/41523691
has comment: http://stackoverflow.com/comment/41523240
has body: How about: find: /(^|[^a-zA-Z])e(?=[^a-zA-Z]|$)/g replace: $12.718281828459045 . str.replace(/(^|[^a-zA-Z])e(?=[^a-zA-Z]|$)/g, "$12.718281828459045")
score: 0
has comment: http://stackoverflow.com/comment/41523426
has comment: http://stackoverflow.com/comment/41523595
answers question: http://stackoverflow.com/q/26439658
has comment: http://stackoverflow.com/comment/41523553
has comment: http://stackoverflow.com/comment/41523491
type: Answer
has comment: http://stackoverflow.com/comment/41523364
has comment: http://stackoverflow.com/comment/41523652
has comment: http://stackoverflow.com/comment/41523307
has comment: http://stackoverflow.com/comment/41523407
has comment: http://stackoverflow.com/comment/41523507
has comment: http://stackoverflow.com/comment/41523574
has comment: http://stackoverflow.com/comment/41523425

http://stackoverflow.com/q/26463858
has answer: http://stackoverflow.com/a/77413589
answer count: 3
has answer: http://stackoverflow.com/a/26466459
tagged with: asp.net
has title: How to Assign Session variables using Javascript in asp.net
has body: I want to Assign session variable using java script. I find this code that works fine function SetUserName() { var userName = "Shekhar Shete"; &lt;%Session["UserName"] = "' + userName + '"; %&gt;; alert('&lt;%=Session["UserName"] %&gt;'); } The problem that i use vb.net as language and not c#. I want have the same code with vb.net. Does anybody have any suggestion to resolve this problem? Thanks a lot in advance.
type: UnansweredQuestion
tagged with: vb.net
has comment: http://stackoverflow.com/comment/41580314
has answer: http://stackoverflow.com/a/26463968
linked to: http://stackoverflow.com/q/14573223
type: Question
tagged with: session
tagged with: javascript
has comment: http://stackoverflow.com/comment/41566203
score: 0

http://stackoverflow.com/comment/41440213
score: 0
type: Comment
type: QuestionComment
has text: I just paid attention to the console and it shows only this error: Uncaught Error: Bootstrap's JavaScript requires jQuery. I went to look and saw that I'm not using the Jquery version that is declared on my code. Now it works. I apologize the lack of attention to this.
comment on: http://stackoverflow.com/q/26393629

http://stackoverflow.com/comment/41545535
score: 0
type: AnswerComment
type: Comment
has text: Ok I think some light bulbs are coming on now - In `AngularJS` the 'glue' for connecting `IIFE`s is the framework itself and the module associated with. In raw JS, the 'glue' is through global script tags providing access if needed. Then there is also alternate methods like `AMD` which clean up dependencies and provide multiple means to provide the 'glue' to each of the files or globally exposed values.by defining how they are related.
comment on: http://stackoverflow.com/a/26451730

http://stackoverflow.com/a/26412616
score: 0
has body: I think, in addition to the other answers about animating scrollTop for html,body, it should be mentioned that you should have a cutoff range for incrementing and decrementing the scrolled value. You don't want it to go beyond the height of your html element (document.documentElement.clientHeight). You also don't want it to go below 0.
type: Answer
answers question: http://stackoverflow.com/q/26412244

http://stackoverflow.com/q/26497074
score: 3
tagged with: javascript
upvote count: 3
tagged with: sql
answer count: 1
has title: Update information in database using php
has answer: http://stackoverflow.com/a/26497192
accepted answer: http://stackoverflow.com/a/26497192
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41627124
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has body: I'm quite new to programming, and im trying to update a certain column in a database using php and javascript. The data base only has 2 columns, seatnums and status. Basically, i want the status to reset back to 1 if the status is currently 0. Could anybody point me in the right direction? I have a class inside a div in my HTML: Reset My javascript function (Part im struggling with): function databaseReset(); $.ajax({ url: "dbreset.php", type: "POST", data: { 'seatnum': seatnum, 'status': '1' }, success: function () { alert("ok"); } function over(id) { selectedseat=$(id).attr('title'); $(id).attr('src','images/mine.gif'); $(id).attr('title', 'Available'); } function out(id) { $(id).attr('src','images/available.gif'); } my php file: <?php include("dbconnect.php"); $query="UPDATE seats SET status=1 WHERE status=0"; $link = mysql_query($query); if (!$link) { die('error 2'); } ?>
downvote count: 0
type: Question

list
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/26490380
tags question: http://stackoverflow.com/q/26454105
tags question: http://stackoverflow.com/q/26364365

http://stackoverflow.com/q/26499538
has title: How to get user's twitter stream using node.js twit?
upvote count: 7
type: Question
has body: I'm using the node.js Twit module; after the user has authenticated, how do I get that user's tweets? The documentation does not explain how to do it. The following returns null: var Twit=require('twit'); var T = new Twit({ consumer_key: nconf.get('twitterAuth:consumerKey') , consumer_secret: nconf.get('twitterAuth:consumerSecret') , access_token: user.token , access_token_secret: user.tokenSecret }); var username=user.profile.username; T.get('search/tweets', {screen_name: username, count:100 }, function(err, data, response) { //q: 'banana since:2011-11-11', count: 100 res.send(data); }) Thanks for any help - must be something obvious. (I have confirmed the code works).
tagged with: twitter
answer count: 2
has answer: http://stackoverflow.com/a/26500594
downvote count: 0
has answer: http://stackoverflow.com/a/28252456
tagged with: javascript
score: 7
favorite count: 0
possible better answer: http://stackoverflow.com/a/28252456
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26500594
type: AnsweredQuestion

http://stackoverflow.com/q/26449472
has comment: http://stackoverflow.com/comment/41541794
has comment: http://stackoverflow.com/comment/41540944
answer count: 1
tagged with: javascript
has body: I am working with the svg-edit for my project, and am altering the svgedit.compiled.js as per my need, here am getting some issues, want to get the selected elements transform which is in the transform matrix ,I can get the transform of the the selected element in svg. My code to get the current transform if the element is follow var my_selected= selectedElements[0].id; //alert(my_selected); var child_sel=$('#'+my_selected).children("g").attr('id'); var child_each=$('#'+my_selected); //console.log(child_each); child_each.each(function () { var child_trans = $(this).attr('transform'); /* dx_x = x - start_x; dy_x = y - start_y; */ $(this).children('g').each(function() { if(this.id!='drag_drop') { var test_x = $(this).attr('transform'); console.log(test_x); var ss=this.getCTM(); console.log(ss); } }); }); But on the console.log(test_x); am getting the value as matrix(0, 0.722035, -0.51, 0, 1561, 776.524) on the next line am getting the same elements transform by using this.getCTM() but it not getting the previous value instead of it am getting below values rotation : 90 scaleX : 0.7220349907875061 scaleY : 0.5099999904632568 skewX : 90 skewY : 90 translateX : 4060 translateY : 2376.5234375 What am doing wrong here? any clue on this ?
favorite count: 0
has comment: http://stackoverflow.com/comment/41549222
tagged with: svg-edit
has title: svg getCTM() not getting the exact value
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26939076
upvote count: 1
type: Question
score: -1
has comment: http://stackoverflow.com/comment/41541838

http://stackoverflow.com/comment/41386430
score: 0
type: Comment
type: QuestionComment
has text: I updated the code and still experienced the same redirect problem. $window.open($window.location.pathname+'#/', '_self').close();
comment on: http://stackoverflow.com/q/26363026

http://stackoverflow.com/comment/41409833
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26377108
has text: What I mean is, something running on the server is not going to be in a position to inspect client-side activity. That's a pretty major con...

http://stackoverflow.com/a/26445316
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: Since you are looking for all the paths, this is a school example for simple recursion: var a = []; a[0] = [4]; a[1] = [2,4]; a[2] = [6,4,2]; a[3] = [7,4,2,1]; a[4] = [9,4,2,1,4]; function r(s, v, h) { // string, vertical, horizontal s = s + a[v][h]; if (v&gt;3) { console.log(s); } else { r(s, v+1, h); r(s, v+1, h+1); } } console.log('-----------------') r('', 0, 0);
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26444792
answers question: http://stackoverflow.com/q/26444792

http://stackoverflow.com/q/26449881
upvote count: 1
type: Question
has body: I want to add my form input field dynamically by clicking the add more button. Following is the HTML of the form: Volvo Saab Mercedes Audi I tried the following, But it doesn't append all fields when add more button is clicked. I want to add all 3 field with add more action. $('#add_more').click(function () { $(this).before($(" ", { id: 'filediv', id: 'filediv2', id: 'filediv3' }).fadeIn('slow').append($(" ", { name: 'file[]', type: 'file', id: 'file' }), $(" ")), $(" ", { name: 'des', type: 'textarea', id: 'des' }), $(" ")) ); });
has comment: http://stackoverflow.com/comment/41541332
score: -3
downvote count: 4
has title: add multiple input fields dynamically
has answer: http://stackoverflow.com/a/26450442
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41542529
type: UnansweredQuestion

http://stackoverflow.com/comment/64342612
has text: @Kendo Sorry for the late reply. That would be the `ConnectionTimeout`. https://github.com/SignalR/SignalR/wiki/Configuring-SignalR
comment on: http://stackoverflow.com/a/26392362
type: AnswerComment
score: 0
type: Comment

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/26426158

http://stackoverflow.com/q/26496230
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/41626052
answer count: 0
has comment: http://stackoverflow.com/comment/41625910
has comment: http://stackoverflow.com/comment/41625993
has body: I am trying to parse an XML file with AngularJS. The tutorial which I am following is given below. Tutorial The file which I am trying to parse is given below. API File However after many attempts , I am not able to get the Price or any other dimension from the XML. The code which I have minutely altered is given below. Code Parsing XML in ajgularJS Parsing XML data with AngularJS {{todo.Pricing}}
type: Question
has comment: http://stackoverflow.com/comment/41628386
tagged with: javascript
score: 0
tagged with: parsing
tagged with: angularjs
type: UnansweredQuestion
has title: Parsing XML with AngularJS
has comment: http://stackoverflow.com/comment/41649405

http://stackoverflow.com/comment/41427953
type: Comment
comment on: http://stackoverflow.com/q/26385618
has text: There maybe better solutions, but one possible approach is to use something like the Rhino scripting engine to envoke methods in a .js file from within a java class. Your executor could just be a wrapper for calling into JS via Rhino or some other scripting engine.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41476261
has text: Because you need to create new Array. What if `days` would be 1000000?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26414099
score: 0

http://stackoverflow.com/comment/41511601
comment on: http://stackoverflow.com/q/26433445
score: 3
type: Comment
type: QuestionComment
has text: Show us some code. It's unclear what you're asking.

datetime
tags question: http://stackoverflow.com/q/26453226
tags question: http://stackoverflow.com/q/26468829
tags question: http://stackoverflow.com/q/26478183
tags question: http://stackoverflow.com/q/26446094
tag name: datetime
type: Tag
tags question: http://stackoverflow.com/q/26477875
tags question: http://stackoverflow.com/q/26439492
tags question: http://stackoverflow.com/q/26451389

http://stackoverflow.com/comment/41635298
has text: JavaScript does not support multiline strings; you'd need to put it all in one line with `\n`, end each line with `\n\ ` (without that last space :( ), or use concatenation.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26501758
type: AnswerComment

http://stackoverflow.com/comment/41644567
type: Comment
type: QuestionComment
has text: @Zehelvion `$scope.$parent.catTitle = null;` Doesn't work.
score: 0
comment on: http://stackoverflow.com/q/26506854

http://stackoverflow.com/q/26387108
type: Question
has comment: http://stackoverflow.com/comment/41430240
has body: I have a directive for a filter object. The directive represents the filter as group of comboboxes. And I have a couple of another directives that should be affected by changes in the filter state (a list, for example). So when I change the value of a combobox in the filter it should update the property of the filter. Then somehow other directives should be informed that filter has been changed and update accordingly after that. For now I have a simple service for storing the filter state: angular.module("services", []).factory("svcFilter", function(){ var filter = {}; return filter; }); This service is injected in the filter directive. When value of a combobox in the filter directive changed filter state changed: angular.module("filter-module", ["services"]) .directive("filter", function(){ return { restrict: "E", templateUrl: "path/to/filter/template.html", controller: function($scope, svcFilter){ ... $scope.$watch("filterProp1", function(newValue){ svcFilter["filterProp1"] = newValue; }); } } }); where filterProp1 is bound to the combobox value. So far so good. I can inject this service into other directives and they will be having the access to the filter state but will be never notified about its changes. How to solve it? How to notify others about the changes?
has title: AngularJS: make service state observable
has answer: http://stackoverflow.com/a/26388505
has comment: http://stackoverflow.com/comment/41429544
tagged with: javascript
tagged with: observable
has comment: http://stackoverflow.com/comment/41429570
has comment: http://stackoverflow.com/comment/41429504
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26388505
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41429213
upvote count: 1

http://stackoverflow.com/comment/41443961
has text: I think you may have pasted the wrong server code... where is the Meteor.method?
comment on: http://stackoverflow.com/q/26396189
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26375638
tagged with: http://stackoverflow.com/tag/html
has body: I want to do JavaScript validation for listbox If Value from Lisbox is not selected, it should get alert "Please Select Your Skill" But if user select 3 Skill from 6 Skill. I need that 3 skiils should get alert using JavaScript. Here is my Code... call script on submit button.. HTML CSS JAVASCRIPT PHP MY-SQL JQUERY Submit Thank you Rahul
possible better answer: http://stackoverflow.com/a/26379758
favorite count: 0
has answer: http://stackoverflow.com/a/26379758
upvote count: 2
tagged with: php
tagged with: checkbox
has answer: http://stackoverflow.com/a/26375940
has title: JavaScript Validation for Listbox when mulitple values are selected
score: 2
type: AnsweredQuestion
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26375940
tagged with: listbox
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26484992
has comment: http://stackoverflow.com/comment/41604560
accepted answer: http://stackoverflow.com/a/26485184
has body: I am trying to draw a line between two coordinates on Google Maps. The two coordinates I wish to use are: 4738.3319,N, 01903.2312,E, 4738.3219,N, 01903.7575,E, I have converted these as follows: 47.383319, 19.032312 47.383219, 19.037575 I am using the code below: Simple Polylines My problem is, that Google Maps draws the line somewhere on the southern border of Budapest, when they should point roughly to the norther border. Also, the longitude is almost good, it has a smaller inaccuracy (about 2 km), but latitude is absolutely wrong. I need at least a 15-20 meters accuracy. Am I using a wrong format?
has comment: http://stackoverflow.com/comment/41604722
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26485184
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/41604813
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Coordinates in Google Maps appear inaccurate
has comment: http://stackoverflow.com/comment/41604733
has comment: http://stackoverflow.com/comment/41604767

http://stackoverflow.com/q/26392919
score: 0
answer count: 1
tagged with: angularfire
has body: I try to create a "single client" view. Each client has a prenom (first name) and a nom (last name). Actually, my application seems to know that there are two values for a client but these values do not appear.. My question: Why the data does not appear. This is what I got for the URL LOCALHOST/#/clients/-JYvLztvmRIcT8ITKWl1 Updated: see live code here: http://plnkr.co/edit/0waQY6ny8TvgNZhz4DRW?p=preview HTML Client: {{client}} Clients: {{clients}} Client.prenom: {{client.prenom}} Generated HTML (when I load the page) Client: [{},{}] Clients: Client.prenom: Controller (app.js code snippet) app.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', { templateUrl: 'accueil.html' }). when('/clients', { templateUrl: 'clients.html', controller: 'ClientsCtrl' }). when('/clients/:clientId', { templateUrl: 'client.html', controller: 'ClientSoloCtrl' }). otherwise({ redirectTo: '/' }); }]); app.controller('ClientSoloCtrl', ClientSoloCtrl); function ClientSoloCtrl ($scope, $firebase, $routeParams) { var clientId = $routeParams.clientId; var ref = new Firebase("https://crmfirebase.firebaseio.com/clients/"+clientId); $scope.client = $firebase(ref).$asArray(); $scope.removeClient = function(client) { $scope.client.$remove(client); }; $scope.addClient = function (client) { $scope.client.$add(client); }; $scope.updateClient = function (client) { $scope.client.$save(client); }; }
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26405272
tagged with: firebase
has comment: http://stackoverflow.com/comment/41441317
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41441893
type: Question
has comment: http://stackoverflow.com/comment/41442189
tagged with: javascript
has title: Fill data from Firebase in my empty arrays
has answer: http://stackoverflow.com/a/26405272

http://stackoverflow.com/q/26500597
has comment: http://stackoverflow.com/comment/41633483
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/3938500
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41633337
has comment: http://stackoverflow.com/comment/41633377
has answer: http://stackoverflow.com/a/26500826
has body: I have code like this Select one two three And my script like this function getval(sel){ //alert(sel.value); <?php $sql = "SELECT * FROM tbl_table WHERE id="?>+(sel.value) } I want select data from table where id values from javascript but I don't know how to write php in javascript tag and how to add javascript's variable (sel.value) after PHP How can I correct this syntax?
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41633373
has title: How to write php code in javascript tag
has answer: http://stackoverflow.com/a/26500613
has comment: http://stackoverflow.com/comment/41633387
upvote count: 2
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41633342
type: Question
has comment: http://stackoverflow.com/comment/41633363
has comment: http://stackoverflow.com/comment/41633320
tagged with: javascript
has comment: http://stackoverflow.com/comment/41633365
has answer: http://stackoverflow.com/a/26500644

http://stackoverflow.com/q/26443825
has answer: http://stackoverflow.com/a/26443863
has answer: http://stackoverflow.com/a/26443888
tagged with: php
has comment: http://stackoverflow.com/comment/41530479
type: AnsweredQuestion
score: 1
has title: Javascript advanced console.log
type: Question
has answer: http://stackoverflow.com/a/26443990
has comment: http://stackoverflow.com/comment/41530454
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/41530468
accepted answer: http://stackoverflow.com/a/26443863
tagged with: arrays
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26443888
favorite count: 0
has body: Let's assume i have JS code like this: var foo = new Array('foo', 'bar'); var bar = new Array(); bar.push(foo); console.log(bar); The console log only gives me: Array [ Array[2] ] I am looking for way to get true log in console. In this case array with subarrays and so on. Something similar to PHP: echo '&lt;pre&gt;' . print_r($bar, TRUE);

http://stackoverflow.com/q/26459632
score: 0
tagged with: api
has answer: http://stackoverflow.com/a/26474373
has body: I have a bunch of Parse objects (Can be as high as 200) that need to be updated with a common field set to a common (short) string value. I tried using a loop with save on each one, but then it spiked my API usage beyond the limit as you can imagine when there were hundreds of them. So, I looked into how to use the saveAll to do a batch from the Javascript client. I got the code itself working fine and it is trying to update all of the files as expected. Now, the problem with this appears to be that it is doing a batch of PUT's inside a single batch POST to https://api.parse.com/1/batch and while it is treating this as a single HTTP operation from the client, the parse.com servers treat this as a single operation in terms of the timeout limit. If I have more than about 5 files in the batch it will time out (Giving an error 124) since for some reason each individual save in the batch appears to take ~3 seconds according to chrome's network browser. How can a single save take so long? Also, this begs the question of why it is timing out at all since each save should be a separate API call (As shown in the requests internal to the batch operation). Since I am running this batch save from the client, shouldn't there be no timeout limits anyhow as is the case in cloud code (15 seconds there)? Can someone help me understand this? It is a huge bottleneck and I cannot figure out any other workaround. Seems like saving a batch of 5+ objects (With only a single string field that is dirty) shouldn't be so arduous!
answer count: 1
tagged with: parse-platform
has title: Parse.com batch save from client (saveAll) timing out
type: UnansweredQuestion
tagged with: save
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41499764
score: 0
type: AnswerComment
type: Comment
has text: sorry for not being clear. I want a form to where parts of the form is split. group 2 and 3 will remain hidden until the previous fields in group 1 are entered. I had it set before to where you will need to click a button in order to access the rest of the form. I have more to say. i want to show you something
comment on: http://stackoverflow.com/a/26426998

http://stackoverflow.com/comment/41631181
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26499244
has text: In each scope in your chain, you have to ask yourself the question - if an exception is thrown here, is there something I need to clean up. If the answer is yes, then you have to catch the exception there. You can rethrow the exception after cleaning up.

http://stackoverflow.com/comment/41370277
comment on: http://stackoverflow.com/q/26355618
score: 0
has text: Looks like content type headers issue, [possibly related](http://stackoverflow.com/questions/24311023/unexpected-token-colon-json-after-jquery-ajaxget)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26497275
accepted answer: http://stackoverflow.com/a/26497650
has title: Print Entire Content of Modal window
score: 0
tagged with: kendo-window
answer count: 1
has body: The Content of my Kendo UI kendoWindow object contains content that exceeds 1 printed page. Whenever I print the content of the modal window I can only print 1 page. I have tried setting the height of a container object to a large number and still there is only 1 page in the print review. Any advice on how to print the entire contents (when it exceeds 1 print page) of a modal window would be great. Thank you for your time.
tagged with: javascript
type: AnsweredQuestion
tagged with: modal-dialog
tagged with: kendo-ui
type: Question
has answer: http://stackoverflow.com/a/26497650

http://stackoverflow.com/q/26461426
has title: Using draggables to trigger an if statement that .shows() a perviously hidden class
has body: so I'm creating a game with jQuery where the user has to place four pictures (draggables) in the correct order to move on to the next level. The part is checking if the pictures are in the right order and if the check is true showing (.show()) a none displayed button (display: none;) with a link to the next game. I think the code will be a little easier to understand. HTML Way to Go! You beat the game! To play the next game click below Next Game CSS .completion { display: none; position: absolute; } javascript/jquery if ($("#game1drop1").hasClass("correct") && $("#game1drop2").hasClass("correct") && $("#game1drop3").hasClass("correct") && $("#game1drop4").hasClass("correct") ) { $(".completion").show; }; note all the droppables (#game1drop1) have the correct class I've checked using the console.The code will run a console.log statement as well. So I'm pretty sure the mistake is with my use of the .show() statement
has answer: http://stackoverflow.com/a/26461533
accepted answer: http://stackoverflow.com/a/26461533
type: AnsweredQuestion
tagged with: java
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/52044517
has body: You can use a canvas to get the RGBA color from a name. Please look at this fiddle: https://jsfiddle.net/AaronWatters/p1y298zk/19/ // We want to know the rgba values for this color name: var testColor = "salmon" // make a canvas var canvas = $(' '); // optional: display the canvas var body = $(document.body); canvas.appendTo(body); // draw a rectangle on the canvas var context = canvas[0].getContext("2d"); context.beginPath(); context.rect(0,0,100,100); context.fillStyle = testColor; context.fill(); // get the canvas image as an array var imgData = context.getImageData(0, 0, 10, 10); // rbga values for the element in the middle var array = imgData.data.slice(50*4, 50*4+4); // convert the opacity to 0..1 array[3] = array[3] / 255.0; $(" The rgba for " + testColor + " is " + array + " ").appendTo(body); This is how jp_doodle does color interpolation in transitions: https://aaronwatters.github.io/jp_doodle/080_transitions.html
has comment: http://stackoverflow.com/comment/120479725
type: Answer
has comment: http://stackoverflow.com/comment/122650923
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26414770
upvote count: 1

http://stackoverflow.com/comment/41385116
type: AnswerComment
comment on: http://stackoverflow.com/a/26359617
score: 0
type: Comment
has text: Worked the same for me with a quick test. But are you sure java is enabled inside ie? Because in my case it wasn't.

http://stackoverflow.com/comment/41486825
score: 2
type: Comment
type: QuestionComment
has text: You need to apply the jquery after the creation of img element. Not in dom ready
comment on: http://stackoverflow.com/q/26420349

http://stackoverflow.com/a/26421902
has comment: http://stackoverflow.com/comment/57468954
has comment: http://stackoverflow.com/comment/41489494
has comment: http://stackoverflow.com/comment/82374237
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41490164
has comment: http://stackoverflow.com/comment/41494608
has comment: http://stackoverflow.com/comment/82179692
score: 31
type: Answer
has body: Looking at the source code of dropzone.js, it seems that there is a lot of events you can listen to. events: [ "drop" "dragstart" "dragend" "dragenter" "dragover" "dragleave" "addedfile" "removedfile" "thumbnail" "error" "errormultiple" "processing" "processingmultiple" "uploadprogress" "totaluploadprogress" "sending" "sendingmultiple" "success" "successmultiple" "canceled" "canceledmultiple" "complete" "completemultiple" "reset" "maxfilesexceeded" "maxfilesreached" ] Here the "success" event seems to be appropriate. A good starting point would be to bind an event listener to your dropzone and see what data you get on such event. $('#my-awesome-dropzone').on('success', function() { var args = Array.prototype.slice.call(arguments); // Look at the output in you browser console, if there is something interesting console.log(args); });
upvote count: 31
accepted answer of: http://stackoverflow.com/q/26421731
answers question: http://stackoverflow.com/q/26421731
has comment: http://stackoverflow.com/comment/49520933

http://stackoverflow.com/comment/41511206
type: AnswerComment
score: 0
has text: No, and this sucks, because it's for a WordPress Contact Form 7... I can't locate the controlling stylesheet for it! :(
type: Comment
comment on: http://stackoverflow.com/a/26433151

http://stackoverflow.com/a/26490104
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26489688
has body: Well, Javascript can't access filesystem for obvious security reasons. What i do in this cases, is creating a hidden iframe and then i submit my form targeting this frame. With Javascript i'm able to read the iframe html, and then i know the result of the upload. Another solution, is a hidden swf ( flash ) that is accessed by javascript and you do all the upload task using this swf.

http://stackoverflow.com/comment/41551782
comment on: http://stackoverflow.com/q/26454331
score: 0
type: Comment
type: QuestionComment
has text: Is there a reason your MVC controller could not simply connect to your hub when it needs to and then simply tell the hub to send this message and give it the connectionId you want informed?

http://stackoverflow.com/comment/41456746
type: AnswerComment
comment on: http://stackoverflow.com/a/26399163
type: Comment
score: 1
has text: Thanks. Not as much of an improvement as I hoped. I guess standard arrays are pretty optimized.

http://stackoverflow.com/q/26512352
has comment: http://stackoverflow.com/comment/41655049
has answer: http://stackoverflow.com/a/26512514
has body: I'm extremely new to JavaScript and programming in general. Can someone explain to me why this doesn't work? Loan Amount: $ Interest Rate: % Months: </p
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41655088
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41654896
has title: Can't figure out why this doesn't give me any output value
has comment: http://stackoverflow.com/comment/41654858
accepted answer: http://stackoverflow.com/a/26512514
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/41583443
comment on: http://stackoverflow.com/q/26472961
score: 0
type: Comment
has text: Do you have an example of what you are trying to do? Maybe what you have so far?
type: QuestionComment

http://stackoverflow.com/comment/41449559
comment on: http://stackoverflow.com/q/26389311
has text: Well, I will explore both methods . Later I will write.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41590173
type: Comment
score: 0
has text: If you are using JSFiddle to test this, make sure that you select `No wrap - in ` ([Explanation](http://stackoverflow.com/questions/22406633/angularjs-uncaught-error-injectormodulerr-failed-to-instantiate-module))
type: QuestionComment
comment on: http://stackoverflow.com/q/26476450

http://stackoverflow.com/q/26439799
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/23807805
has answer: http://stackoverflow.com/a/26440224
answer count: 2
tagged with: arrays
downvote count: 0
favorite count: 0
has body: Ok I am killing my brain here I have an array var myArray = ['Bob', 'Sue', 'Jim']; myArray.__proto__ = new Entity(); //Entity looks something like this Entity = function(){ this.isChanged = false; this.add = function(newPerson){ alert(this.length); //alerts with 3 alert(JSON.stringify(this)); //alerts a {} this.push(newPerson); this.isChanged = true; } } push does not exist on an object but its obviously an array as per the alert returning a 3. very curious how to access my array that seems to be wrapped by an object thanks to my proto
has answer: http://stackoverflow.com/a/26441354
accepted answer: http://stackoverflow.com/a/26441354
has title: Pushing to a Javascript array that has a __proto__
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26440224
score: 1
linked to: http://stackoverflow.com/q/13839115
upvote count: 1

http://stackoverflow.com/a/26459912
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26459577
answers question: http://stackoverflow.com/q/26459577
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41559606
has body: Well, I haven't used asp.net mvc in forever. But you be able to do something like: public class StudentController : ApiController { [Route("students")] public IEnumerable Get() { //returns all students. } //I would like to add this method======================= [HttpGet] [Route("students/class/{classId}")] public IEnumerable GetClassSpecificStudents(string classId) { //want to return all students from an specific class. } //I also would like to add this method======================= [HttpGet] [Route("students/section/{sectionId}")] public IEnumerable GetSectionSpecificStudents(string sectionId) { //want to return all students from an specific section. } [Route("students/{id}")] public Student Get(string id) { //returns specific student. } } You could also specify routes in the routeconfig like this: routes.MapRoute( name: "students", url: "students/class/{classId}", defaults: new { controller = "Student", action = "GetClassSpecificStudents", id = UrlParameter.Optional } ); You have to try for your self. And you can read more about it here and here. Not that you have your specified routes you can add angular $http.gets for each route. var url = "whateverdoma.in/students/" $http.get(url) .success() .error() var url = "whateverdoma.in/students/class/" + classId; $http.get(url) .success() .error() var url = "whateverdoma.in/students/filter/" + filterId; $http.get(url) .success() .error()
upvote count: 2

http://stackoverflow.com/comment/41484663
score: 0
has text: It's tampermonkey not greasemonkey, which is, eh. I dunno, I've never tried using it before. It says it should work the same as firefox's greasemonkey extension but chrome is picky. I'll try the tests and see what happens.
type: Comment
comment on: http://stackoverflow.com/a/26405922
type: AnswerComment

http://stackoverflow.com/comment/41427299
comment on: http://stackoverflow.com/a/26385990
score: 0
type: Comment
type: AnswerComment
has text: This code isn't dynamic at all. What if there's different HTML attributes ?!

http://stackoverflow.com/q/26367036
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26369031
has body: I am using ExtJS 4.2 and when I print the store in loadComboBox(), the items are present, but they do not appear in the drop-down. The drop-down is empty. Here is the JSFiddle DEMO. Ext.define('ReportFieldModel', { extend: 'Ext.data.Model', fields: [{ 'name': 'name', 'type': 'string' }] }); Ext.define('ReportFieldComboStore', { extend: 'Ext.data.JsonStore', model: 'ReportFieldModel' }); var config = { 'type': "Summary", 'columns': [ "red", "yellow", "orange", "green", "blue", "indigo", "violet"] }; function processItem(item) { return Ext.create('ReportFieldModel', { name: item }); } function processItems(data) { var arr = []; if (data &amp;&amp; data.length &gt; 0) { for (var i = 0; i &lt; data.length; i++) { arr.push(processItem(data[i])); } } return arr; } function loadComboBox(combo, data) { var store = combo.store; var columns = data.columns; var processed = processItems(columns); console.log(JSON.stringify(processed, undefined, 2)); store.loadData(processed, false); } Ext.onReady(function () { var resultsPanel = Ext.create('Ext.panel.Panel', { title: 'Results', width: 200, height: 400, renderTo: Ext.getBody(), layout: { type: 'vbox', align: 'stretch', padding: 5 }, items: [{ xtype: 'combo', itemId: 'myCombo', displayField: 'name', valueField: 'name', mode: 'local', store: Ext.getStore('ReportFieldComboStore') }] }); loadComboBox(resultsPanel.down('#myCombo'), config); });
type: Question
tagged with: javascript
tagged with: extjs
score: 0
accepted answer: http://stackoverflow.com/a/26369031
answer count: 1
has title: Combobox will not display loaded store data
tagged with: extjs4.2
tagged with: store

http://stackoverflow.com/q/26417707
has title: High Chart X Axis to display month and year
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41482442
score: 0
has comment: http://stackoverflow.com/comment/41482462
type: Question
accepted answer: http://stackoverflow.com/a/26418963
tagged with: highcharts
tagged with: javascript
has body: In this high chart coding, I want to change X Axis to display month and year.(ex- Feb-20014) Here my code work. How can do it? I want to go for at least 5 years. My chart is column chart. Please note that &lt;script type="text/javascript"&gt; $(function () { // Set up the chart var chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'column', margin: 75, options3d: { enabled: false, alpha: 15, beta: 15, depth: 50, viewDistance: 25 } }, title: { text: 'Payment Details' }, plotOptions: { column: { depth: 25 } }, series: [{ data: [ &lt;?php for ($i = 0; $i &lt;= 12; $i++) { echo $i. ','; } ?&gt; ] }] }); function showValues() { $('#R0-value').html(chart.options.chart.options3d.alpha); $('#R1-value').html(chart.options.chart.options3d.beta); } // Activate the sliders $('#R0').on('change', function () { chart.options.chart.options3d.alpha = this.value; showValues(); chart.redraw(false); }); $('#R1').on('change', function () { chart.options.chart.options3d.beta = this.value; showValues(); chart.redraw(false); }); showValues(); }); &lt;/script&gt;
answer count: 1
has answer: http://stackoverflow.com/a/26418963

http://stackoverflow.com/a/26372614
score: 2
has comment: http://stackoverflow.com/comment/41433108
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26372534
type: AcceptedAnswer
has body: You can utilize the select as part of the ng-option expression to set what you need to set the value of the ng-model when an option is selected. So fonts.normal.fontFamily as fonts.normal.fontName for fonts in designFonts and use a track by to have the option value set with respective value (track by is always applied to value). Try:- &lt;select ng-model="selectedFont" ng-options="font as font.normal.fontName for font in designFonts track by font.normal.fontFamily" required&gt;&lt;/select&gt; Demo If you use font.normal.fontFamily as font.normal.fontName will set ng-model with the respective fontFamily if you need the entire object as ng-model then use the way you have now. Well there is a possibly ng-select bug, you cannot use select as with track by together on the same field which causes issue in selection, though ng-model gets applied. So you could use:- ng-options="font as font.normal.fontName for font in designFonts track by font.normal.fontFamily" But you can't ng-options="font.normal.fontFamily as font.normal.fontName for font in designFonts track by font.normal.fontFamily"
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26372534

c#
tags question: http://stackoverflow.com/q/26414584
tags question: http://stackoverflow.com/q/26505061
tags question: http://stackoverflow.com/q/26356096
tags question: http://stackoverflow.com/q/26410150
tags question: http://stackoverflow.com/q/26441701
tags question: http://stackoverflow.com/q/26412773
tags question: http://stackoverflow.com/q/26353928
tags question: http://stackoverflow.com/q/26367141
tags question: http://stackoverflow.com/q/26406501
tags question: http://stackoverflow.com/q/26384211
tags question: http://stackoverflow.com/q/26465915
tag name: c#
tags question: http://stackoverflow.com/q/26393713
tags question: http://stackoverflow.com/q/26465489
tags question: http://stackoverflow.com/q/26357109
tags question: http://stackoverflow.com/q/26449789
tags question: http://stackoverflow.com/q/26414666
tags question: http://stackoverflow.com/q/26427381
tags question: http://stackoverflow.com/q/26460168
tags question: http://stackoverflow.com/q/26372301
tags question: http://stackoverflow.com/q/26499209
tags question: http://stackoverflow.com/q/26358431
tags question: http://stackoverflow.com/q/26501347
tags question: http://stackoverflow.com/q/26502515
tags question: http://stackoverflow.com/q/26488616
tags question: http://stackoverflow.com/q/26467378
tags question: http://stackoverflow.com/q/26378523
tags question: http://stackoverflow.com/q/26361774
tags question: http://stackoverflow.com/q/26498808
tags question: http://stackoverflow.com/q/26512309
tags question: http://stackoverflow.com/q/26508298
tags question: http://stackoverflow.com/q/26403096
tags question: http://stackoverflow.com/q/26356730
tags question: http://stackoverflow.com/q/26423567
tags question: http://stackoverflow.com/q/26362440
tags question: http://stackoverflow.com/q/26389237
tags question: http://stackoverflow.com/q/26431392
tags question: http://stackoverflow.com/q/26484936
tags question: http://stackoverflow.com/q/26378121
tags question: http://stackoverflow.com/q/26443511
tags question: http://stackoverflow.com/q/26451369
tags question: http://stackoverflow.com/q/26377648
tags question: http://stackoverflow.com/q/26384840
tags question: http://stackoverflow.com/q/26417885
tags question: http://stackoverflow.com/q/26364854
tags question: http://stackoverflow.com/q/26436573
tags question: http://stackoverflow.com/q/26451540
tags question: http://stackoverflow.com/q/26486186
tags question: http://stackoverflow.com/q/26483633
tags question: http://stackoverflow.com/q/26373347
tags question: http://stackoverflow.com/q/26419766
tags question: http://stackoverflow.com/q/26419412
tags question: http://stackoverflow.com/q/26356645
tags question: http://stackoverflow.com/q/26401105
tags question: http://stackoverflow.com/q/26419601
tags question: http://stackoverflow.com/q/26397065
tags question: http://stackoverflow.com/q/26378276
tags question: http://stackoverflow.com/q/26412578
tags question: http://stackoverflow.com/q/26417705
tags question: http://stackoverflow.com/q/26455659
tags question: http://stackoverflow.com/q/26366058
tags question: http://stackoverflow.com/q/26510786
tags question: http://stackoverflow.com/q/26363708
tags question: http://stackoverflow.com/q/26420926
tags question: http://stackoverflow.com/q/26441250
tags question: http://stackoverflow.com/q/26436977
tags question: http://stackoverflow.com/q/26439305
type: Tag
tags question: http://stackoverflow.com/q/26479596
tags question: http://stackoverflow.com/q/26372838
tags question: http://stackoverflow.com/q/26385822
tags question: http://stackoverflow.com/q/26424909
tags question: http://stackoverflow.com/q/26503266
tags question: http://stackoverflow.com/q/26449431
tags question: http://stackoverflow.com/q/26448812
tags question: http://stackoverflow.com/q/26406510
tags question: http://stackoverflow.com/q/26430019
tags question: http://stackoverflow.com/q/26509462
tags question: http://stackoverflow.com/q/26413598
tags question: http://stackoverflow.com/q/26484984

http://stackoverflow.com/q/26371929
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/26372058
has title: Form Not Validating Correctly
tagged with: javascript
has body: I am working on a web form which is supposed to pass some validation rules once it's been submitted. The rule I'm having trouble with right now is that age is only supposed to be a number, for example (24 is ok, but 24 years-old should give an error). Right now I'm trying to get it to accept only numeric content and have no spaces. I also have a first name field that was not supposed to allow spaces and used the statement if(!(/^\S{3,}$/.test(fName))) { errMsgHolder.innerHTML = "Name cannot contain spaces"; return false; } to check for whitespace and this worked properly (I'll be posting the full code at the end). So I thought I could do something similar with my checkAge() function, but I cannot get it to work. The form always submits regardless of if I've entered anything in the age field at all. However, if I leave the name field blank or enter an invalid input, I'm given the correct error. Here is my code: Project 5 First Name: Age: Street Address: State: LA TX OK MI AZ Login Password: Also, as this is written I am getting no errors when I view the web console on my browser. Can anyone spot why this isn't working properly and/or have another way to accomplish the same task on the checkAge() function? Updated with Working Code Thanks for the help guys. I wanted to post the code now that it's working correctly because I ran into something that I've never come across before and hope that this could help anybody else that is having the same problem. Even after implementing the accepted answer, I was getting the correct error messages, but only if I was only calling one function from my validateForm() function. I ended up assigning these function calls to variables and returning the variables from this function and that worked perfectly. So here's the final working code: Project 5 First Name: Age: Street Address: State: LA TX OK MI AZ Login Password: Thanks again for the help!
answer count: 2
tagged with: validation
downvote count: 0
accepted answer: http://stackoverflow.com/a/26372058
favorite count: 0
has answer: http://stackoverflow.com/a/26372056
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/26372056
upvote count: 1

http://stackoverflow.com/a/26489784
has comment: http://stackoverflow.com/comment/41650093
has body: You would use the Marionette Composite View for this: https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.compositeview.md You want to set the collection for each view and specify a childViewContainer (a jquery selector). If you set a collection for a composite view it will use the same view to render the children in that collection. You can specify a childView, but I normally don't set that attribute as it should be recursively calling the same view.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26484708

http://stackoverflow.com/q/26354199
has answer: http://stackoverflow.com/a/26354413
tagged with: css
has body: So validation is part of HTML 5, but can and how does one implement with just html to trigger the error message once an input leaves focus and the content entered is not validated correctly? This goes for URL, email, number and ranges, etc... Does it require some pattern to make this work correctly? Thanks much.
type: Question
has comment: http://stackoverflow.com/comment/41367844
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/41367921
duplicate of: http://stackoverflow.com/q/7548612
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/7548612
linked to: http://stackoverflow.com/q/16493797
has title: HTML 5 Form Input Validation
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26439227
has title: JavaScript - Notification API in webbrowser
tagged with: api
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26439304
tagged with: firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/41522309
tagged with: notifications
has body: I made a notifications for my web service. The code looks like this (two first lines are mental shortcut): check_how_many_alerts(); loop count(check_how_many_alerts){ var n = new Notification("Alert!",{ icon: "alert.png", body: variable }); alert_name = variable; n.onshow = function () { setTimeout(n.close.bind(n), 10000);} n.onclick = function() { $.ajax({ url: 'notif_accept.php', type: 'GET', data: 'id=' + alert_name, success: function(output) { alert('success, server says '+output); }, error: function() { alert('something went wrong'); } }); } } The problem is when I have two or more alerts, all of them have the same URL in .onclick function. What should I do to have URLs with different "alert_names"?
type: Question
accepted answer: http://stackoverflow.com/a/26439304
score: 0
tagged with: google-chrome
answer count: 1

http://stackoverflow.com/q/26500424
type: Question
has answer: http://stackoverflow.com/a/26500486
answer count: 2
accepted answer: http://stackoverflow.com/a/26500486
has title: Nothings working in my nested conditionals using jQuery
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41633095
has comment: http://stackoverflow.com/comment/41633075
has comment: http://stackoverflow.com/comment/41633047
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26500741
has body: So Im learning jQuery at the moment, and have to make a Loan calculator based on choices, as well as validate enteries, then output a result. l wanted to make sure you guys knew what I was trying to do, so I have here a flow chart of what is supposed to happen: http://i59.tinypic.com/8z02sh.jpg Problem is I dont know how to do this is Jquery. I asked a question earlier, got some feedback. None of the code people provided to outright fix my code, actually worked. I took a guy named "Parody"s work, and rewrote my code. I am no longer getting errors, and what im doing now makes sense to me. Problem is, when i input a number, and click the button, nothing happens. So here's my code so far. Thanks ahead of time. http://jsfiddle.net/mL74efjd/1/ HTML - Loan Calc Enter your annual salary Please select your Credit Score Over 600 Under 600 How long have you worked at your current job? I have worked at my current job over 1 year. I have worked at my current job less than 1 year. JS- $('#check').click(function() { var salary; var isValid = $('#salaryForm').validate().form(); // if validation passes, display a message if (isValid) { if (salary < 40000) { if ($('#over1').is(':checked')) { if ($('#job1').is(':checked')) { $('#message').html("Loan Approved.") } else { $('#message').html("Loan Denied.") } } else { $('#message').html("Loan Denied.") } } else if (salary >= 40000) { if ($('#under1').is(':checked')) { if ($('#job2').is(':checked')) { $('#message').html("Loan denied.") } else { if ($('#job1').is(':checked')) $('#message').html("Loan Approved.") } }else { $('#message').html("Loan Approved.") } } } }); // form validation $.validator.setDefaults({ errorElement: "span", errorClass: "form_error", errorPlacement: function(error, element){ error.insertAfter(element) } }); $.extend($.validator.messages,{ required: "* Required field" }); $('#salaryForm').validate( { rules: { salary: { required: true, digits: true, range: [1, 1000000] } } });
has answer: http://stackoverflow.com/a/26500741

http://stackoverflow.com/comment/41459307
has text: No browsers are not meant to allow cors.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26402667
type: Comment

http://stackoverflow.com/a/26390677
has comment: http://stackoverflow.com/comment/41437153
has body: Ok, I think I understand you better now. Try this code out. Run it as is and observe the count, then go to full-screen mode and run it again. $(document).ready(function(){ function countFirstRowItems(parentSelector, childSelector){ var count = 0, theTop = undefined; $(parentSelector + " > " + childSelector).each(function(){ var thisTop = $(this).offset().top; if(theTop === undefined){ theTop = thisTop; } if(thisTop != theTop){ return false; } count++; }); return count; } $('#btnCount').click(function(){ $('#spnCount').html( countFirstRowItems('.outer', '.item') ); }); $('#spnCount').html( countFirstRowItems('.outer', '.item') ); }); .outer{ padding:.5em; margin:.5em; box-shadow:inset 0px 0px 3px #aaa; } .item{ margin:.5em; height:150px; width:100px; border:solid 1px #ddd; float:left; background-color:#fdfafa; } .clearfix{ clear:both; } Count items on first row ?
downvote count: 0
answers question: http://stackoverflow.com/q/26390580
has comment: http://stackoverflow.com/comment/41437713
type: Answer
has comment: http://stackoverflow.com/comment/41437764
upvote count: 2
has comment: http://stackoverflow.com/comment/41436724
has comment: http://stackoverflow.com/comment/41436757
score: 2
has comment: http://stackoverflow.com/comment/41434975
has comment: http://stackoverflow.com/comment/41436574
has comment: http://stackoverflow.com/comment/41438188

http://stackoverflow.com/a/26414530
type: Answer
answers question: http://stackoverflow.com/q/26414229
has comment: http://stackoverflow.com/comment/41477309
has body: Try using event.stopPropagation() on a element wrapping the time picker. e.g. $(document).on("scoll", ".picker_holder", function(event){ event.stopPropagation(); }); It will prevent the scroll event from reaching your "$window", and stop it from scrolling when you scroll the time picker.
score: 0

http://stackoverflow.com/comment/41553344
comment on: http://stackoverflow.com/q/26411332
score: 0
type: QuestionComment
has text: Your `actions.php` code seems to be fine assuming `$row` in the loop contains an object collection returned from `mysql_fetch_object` from your `fetchAll()` function. About my point to Javascript, well, the way you want to have it is when you start typing into the auto complete box, it should go to the server and then populate the drop down from the database, isn't it?. If Yes, then you will need to have an ajax call run each time user types something, which here are two scenarios. So, you need to have that `select:` section in both of those. Otherwise you can leave it if you don't want it.
type: Comment

http://stackoverflow.com/comment/41608461
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26485172
has text: Already tried and just did it again. Now my textbox1 onchange event only has the alert and the textbox2 onchange event has no code. Same result: when the user writes something on textbox1 and clicks the button, the postback is not fired.

http://stackoverflow.com/a/54323600
answers question: http://stackoverflow.com/q/26416334
has body: Just to give an alternative solution, because it isn't mentioned. It's perfectly fine to use the HTML attribute defer here. So when loading the DOM, a regular &lt;script&gt; will load when the DOM hits the script. But if we use defer, then the DOM and the script will load in parallel. The cool thing is the script gets evaluated in the end - when the DOM has loaded (source). &lt;script src="{% static "build/react.js" %}" defer&gt;&lt;/script&gt;
upvote count: 13
type: Answer
downvote count: 0
score: 13

http://stackoverflow.com/comment/41571949
has text: When i try with numerical value i got the following error TypeError: Cannot read property '1' of undefined.
comment on: http://stackoverflow.com/a/26467013
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/114304280
has text: @run_the_race Could you explain why what he did preserve the spaces?
comment on: http://stackoverflow.com/a/26425713
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41550698
has text: Correction: **this** seems to do exactly what you're talking about. http://www.jacklmoore.com/autosize/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26454879
score: 1

http://stackoverflow.com/comment/41476447
type: QuestionComment
comment on: http://stackoverflow.com/q/26366899
score: 0
type: Comment
has text: This is really too broad to discuss here, as they are likely a number of sub-components needed to achieve the overall functionality - generation of grid display, web page polling to get content updates, user interaction, etc.

http://stackoverflow.com/a/26497887
has body: You need to change your HTML so that the table rows and cells are inside a table (rather than just a div); Your jQuery should work fine then.
score: 0
answers question: http://stackoverflow.com/q/26497832
type: Answer

http://stackoverflow.com/comment/41474623
type: Comment
type: QuestionComment
has text: BTW, you can have `style="…"` or presentation attributes, but you do not need both with conflicting values. e.g. either `stroke-width="1"` **or** `style="stroke-width:2px"`.
score: 0
comment on: http://stackoverflow.com/q/26410653

http://stackoverflow.com/q/26508215
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41651056
has body: I apologize in the advance as I am a total beginner. I have a pre-existing html form with text fields. I need to have a button that will allow me to upload a txt file (since when trying to look for answer about this, I learned javascript can't just access a file from my PC without me actively uploading it). Then I need the values from this txt file inserted into the text fields (for example, the form has: name, last name, phone etc - and the file will fill out this info). I am going crazy trying to collect bits and pieces from other people's questions. any help would be greatly appreciated!
has title: javascript read from a txt file and inject text into form
accepted answer: http://stackoverflow.com/a/26508451
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41673789
has answer: http://stackoverflow.com/a/26508451
has comment: http://stackoverflow.com/comment/41650719
type: Question
has comment: http://stackoverflow.com/comment/41646942

http://stackoverflow.com/q/26385104
favorite count: 0
accepted answer: http://stackoverflow.com/a/26405505
tagged with: css
tagged with: angularjs-ng-repeat
tagged with: ng-animate
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/41462342
has comment: http://stackoverflow.com/comment/41445775
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41424420
has answer: http://stackoverflow.com/a/26405505
has comment: http://stackoverflow.com/comment/41424652
has body: I am using the ngAnimate module in my project to animate items in my list on a certain condition. The problem is if I use ngAnimate then deletion from list takes a little bit more time than without animation. Please check the plunker I've created. This is my HTML: Non Laggin List {{i}} Delete Lagging List {{i}} Delete JS: var JU = angular.module('JU', [ 'ngAnimate' ]); JU.controller('MyCtrl', ['$scope', function ($scope) { $scope.items = [ 'Hello', 'Click', 'To Delete', 'ME from', 'This list' ]; $scope.items2 = [ 'Hello', 'Click', 'To Delete', 'ME from', 'This list' ]; $scope.remove = function (index) { $scope.items.splice(index, 1); }; $scope.remove2 = function (index) { $scope.items2.splice(index, 1); }; }]); Deleting from the first list is fast and responsive. Deletion from the second list feels laggy and unresponsive. I am using an implementation similar to the second list in my code. Is there a way I can fix it?
type: Question
has comment: http://stackoverflow.com/comment/41424402
downvote count: 0
answer count: 1
tagged with: javascript
has title: AngularJS - Deletion from list lags when using ngAnimate
has comment: http://stackoverflow.com/comment/41425108

http://stackoverflow.com/comment/41504709
type: QuestionComment
comment on: http://stackoverflow.com/q/26414303
score: 0
has text: I am actually trying to set newContent into a div like below $(' ').html(newContent).replaceAll('#div_replacement');
type: Comment

http://stackoverflow.com/q/26410454
tagged with: javascript
score: -1
tagged with: jquery-validate
has answer: http://stackoverflow.com/a/26479400
accepted answer: http://stackoverflow.com/a/26479400
linked to: http://stackoverflow.com/q/21953694
has body: I'm using jquery validation plugin to validate my form. The function below, displays errors under each field where the error is detected. errorPlacement : function(error, element) { error.insertAfter(element.parent()); } }); How can I evaluate if this function has been used "error has been displayed on screen" or not? What I'm trying to is to evaluate if form has been validated or not, so I can perform other logic such as disabling submit button or changing button text to "please wait for example". I'm not sure how I can go about doing that. Any help would be appreciated. Thank you
downvote count: 2
has answer: http://stackoverflow.com/a/26479239
upvote count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41834328
answer count: 5
has comment: http://stackoverflow.com/comment/41811571
has title: jquery function if statement
has comment: http://stackoverflow.com/comment/41594428
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26479232
has answer: http://stackoverflow.com/a/26479081
has answer: http://stackoverflow.com/a/26478996
possible better answer: http://stackoverflow.com/a/26479232
type: Question
has comment: http://stackoverflow.com/comment/41776550

http://stackoverflow.com/comment/41547649
type: Comment
has text: There is a possibility that your answer might get closed for being typo.. So probably you can remove it or post an answer yourself and accept it when time permits.. Cheers!! One more thing since your have the `require: '^?mainContent',` as an optional requirement, it is better to have a null check.
score: 1
comment on: http://stackoverflow.com/q/26453273
type: QuestionComment

http://stackoverflow.com/a/26422508
score: 0
has body: You could write your own that uses a switch to process the price/fee depending on locale and returns a float. var price = '23,234.34'; var locale = 'us-US'; function parsePrice(price, locale) { switch (locale) { case 'us-US': price = price.replace(',', ''); break; } return parseFloat(price); } parsePrice(price, locale); // 23234.34 DEMO
answers question: http://stackoverflow.com/q/26422386
type: Answer

http://stackoverflow.com/q/26410446
accepted answer: http://stackoverflow.com/a/26411098
favorite count: 0
has title: How to clear previous values from browser console
tagged with: web
has answer: http://stackoverflow.com/a/26411098
tagged with: console.log
has body: For example if I type var x = 5; x; console output is 5 (as expected) But when I want to start afresh and clear the console(using ctrl+L or clear(); ),the console clears up but x still contains value 5 (as can be checked by typing x in console) I don't want console to remember any previous data after using clear.How can I do it?
linked to: http://stackoverflow.com/q/1596782
downvote count: 0
type: AnsweredQuestion
score: 1
type: Question
upvote count: 1
duplicate of: http://stackoverflow.com/q/1596782
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41463556
has text: The code is broken. Checking `if (info)` there will **always** be true, because the `.closest()` function will always return an object. It should be `if (info.length)`.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26407429

http://stackoverflow.com/comment/41461969
comment on: http://stackoverflow.com/q/26403137
has text: What float precision did you set in your fragment shader? You would need `highp`.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/50651478
type: Answer
has body: Requiring jquery_ujs before rails-ujs did the trick to me. //= require jquery //= require jquery_ujs //= require rails-ujs
score: 0
answers question: http://stackoverflow.com/q/26512017

http://stackoverflow.com/comment/41580211
has text: This is what I was looking for. The one problem is that I have threee diferent sets of the CheckBoxLists and when I click "Select All" on first CheckBoxList, all other are checked. How can I use this only to this first CheckBoxList?
comment on: http://stackoverflow.com/a/26471272
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44270905
type: Comment
type: QuestionComment
has text: Hi Jermaine, i wonder if you have found how to workaround this problem. Right now I check my server to download fresh data during startup and this creates a second notification for the same event. I have looked at the source of the plugin and it seems to send some extra parameters for our cordova apps to start (), though I'm not really sure if these parameters finally arrive to the app : ... originalExtras.putBoolean("foreground", false); originalExtras.putBoolean("coldstart", !isPushPluginActive); ... I haven't found how to receive these parameters at my source, either
comment on: http://stackoverflow.com/q/26482480
score: 0

http://stackoverflow.com/comment/41634523
comment on: http://stackoverflow.com/a/26501141
has text: and all of my data has the color property. for example,I wanna mark the highest point with red color and other points use defualt color. It works for me in column type [link]http://jsfiddle.net/cupom1nv/2/ but it does`n work for pie chart: [link]http://jsfiddle.net/cupom1nv/3/
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41480796
has text: What if I wanted to add a class to all the 1s and a different one to the 2s??
comment on: http://stackoverflow.com/a/26416778
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41517141
type: QuestionComment
comment on: http://stackoverflow.com/q/26435400
has text: Can you show us a code example? I'm not seeing this happen on a generic setup with similar html/js (demo: http://codepen.io/anon/pen/CLwio), and without seeing it in front of me to debug, it's hard to guess what the issue is.
score: 0
type: Comment

http://stackoverflow.com/a/26368729
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26368684
answers question: http://stackoverflow.com/q/26368684
score: 4
type: AcceptedAnswer
has body: for (var i = 0; i < 4; i++) { $('.test-class-' + i).on('click', { i: i }, function(e) { alert(e.data.i); }); } TEST 1 TEST 2 TEST 3 TEST 4
type: Answer

http://stackoverflow.com/a/26470238
has comment: http://stackoverflow.com/comment/41579485
type: Answer
has comment: http://stackoverflow.com/comment/41578840
has comment: http://stackoverflow.com/comment/41580650
accepted answer of: http://stackoverflow.com/q/26469495
answers question: http://stackoverflow.com/q/26469495
has comment: http://stackoverflow.com/comment/41580662
score: 0
type: AcceptedAnswer
has body: I think this is what you're looking for. When the answers are submitted it checks to see if the value is in your array and that it matches the book description. Then returns a yes or a no var authorName =["a","b","c"]; $("#retrieve").click(function(){ var selectedAuthor = $(".author-name").val(); var selectedBook = $("#bookName").children(":selected").attr("id");; if( ($.inArray(selectedAuthor, authorName) &gt; -1) &amp;&amp; (selectedBook == "book-"+selectedAuthor) ) { $("#results").val("YEP ITS A MATCH"); }else{ $("#results").val("SORRY, NO MATCH"); } }); FIDDLE UPDATE displays selected book: NEW FIDDLE NEW UPDATE Added a seperate array for book info: NEW FIDDLE 2

http://stackoverflow.com/comment/41504744
type: Comment
type: QuestionComment
score: 0
has text: If you're unwilling to even try what I asked then unfortunately I cannot help.
comment on: http://stackoverflow.com/q/26414303

http://stackoverflow.com/a/26452879
accepted answer of: http://stackoverflow.com/q/26451858
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26451858
type: Answer
has comment: http://stackoverflow.com/comment/55176527
score: 57
has comment: http://stackoverflow.com/comment/64649753
upvote count: 57
downvote count: 0
has body: When you call Products.get() in the controller, you are not using the correct parameter name (you need to use "productId" instead of "id" based on your definition of the $resource). Try calling it like this instead: Products.get({ productId: id }) Here is a snippet from the documentation for $resource which explains how it works: Each key value in the parameter object is first bound to url template if present and then any excess keys are appended to the url search query after the ?. In your case, it's not finding "id" as a parameter in the URL, so it adds that to the query string.

http://stackoverflow.com/a/26419633
score: 1
has body: You can only block cookies but not javascript.
answers question: http://stackoverflow.com/q/26419019
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/q/26427650
has title: Custom dojo widgets not loading on default.htm
tagged with: dojo
has answer: http://stackoverflow.com/a/26428973
has body: I've got a web page (default.htm) that loads some custom dojo widgets. The widgets load fine when the entire url is typed: http:/www.eg/default.htm but when the site is hit as: http:/www.eg the widgets dont load. when they load properly (when default.htm is specified) the console message is: XHR finished loading: GET "http://www.eg/Templates/WatershedMap.htm" when they dont load the console message is: OPTIONS http://templates/WatershedMap.htm net::ERR_NAME_NOT_RESOLVED I'm running iis 7. Does anyone have an idea of how I might fix this? Thanks
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26428973
score: 0
answer count: 1
tagged with: iis

http://stackoverflow.com/a/26495072
has body: I think you have to put $(document).ready() on the first line.
score: 0
has comment: http://stackoverflow.com/comment/41626031
type: Answer
has comment: http://stackoverflow.com/comment/41625023
answers question: http://stackoverflow.com/q/26494819

http://stackoverflow.com/comment/41530177
type: AnswerComment
comment on: http://stackoverflow.com/a/26438905
has text: What got me was that I have done this before, and never had to use $scope. Is anything assigned into the $scope object globally shared?
type: Comment
score: 0

http://stackoverflow.com/comment/41662648
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26497081
has text: I like this implementation. I ended up going a different route and creating a placeholder object named starProgress. I then pass in my data set and use lodash countby. works great but my main categories are static which is why I'm chose your solution which is a bit more dynamic. starProgress.forEach(function(star) { _.countBy(d, product); })

http://stackoverflow.com/a/26364602
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41393842
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26364354
type: Answer
answers question: http://stackoverflow.com/q/26364354
has body: You would need to use both the jQuery .removeData and jQuery .removeAttr() APIs. .removeData( [list] ); .removeAttr( [name] ); [list] - An array or space-separated string naming the pieces of data to delete. When called with no arguments, .removeData() removes all values. UPDATE Since .removeAttr( [name] ) 'forces' you to remove one piece at a time you may as well use: .removeData( [name] ); Please bear in mind that [name] is of the form data-&lt;name&gt; and &lt;name&gt; respectively. For instance to remove data-myid use: .removeAttr( 'data-myid' ); //and .removeData( 'myid' );
has comment: http://stackoverflow.com/comment/41386806
score: 1
has comment: http://stackoverflow.com/comment/41394441

http://stackoverflow.com/q/26446981
linked to: http://stackoverflow.com/q/7480496
score: 0
has comment: http://stackoverflow.com/comment/41547715
has body: Right now I have a page with divs organized in a grid using masonry.js. I have that part working fine. What I'm trying to do now is use a CSS effect to make the divs fade into view when scrolling down, simulating extended scrolling. I'm following this tutorial http://tympanus.net/codrops/2013/07/02/loading-effects-for-grid-items-with-css-animations/ and even downloaded their zip to try to learn exactly how it works but I'm still having problems. While I doubt this in itself will resolve the problem, one thing I did notice is in the script, it says document.getElementByID. But my divs that I'm trying to apply this effect to are div classes and not div ID's. What do I need to change in the script to get this working? http://codepen.io/donnaloia/pen/aderB (note, in codepen, my grid is not aligned correctly for some reason but on my machine masonry is working fine) $(document).ready(function() { $('.container').masonry({ itemSelector: '.grid_4', isFitWidth: true, gutter: 8 }).imagesLoaded(function() { $('.container').masonry('reloadItems'); }); new AnimOnScroll( document.getElementById( '#grid_4' ), { minDuration : 0.4, maxDuration : 0.7, viewportFactor : 0.2 } ); });
tagged with: css
has comment: http://stackoverflow.com/comment/41537121
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41537355
type: Question
has comment: http://stackoverflow.com/comment/41536945
has title: How to animate a div once it comes into view using masonry and css?
tagged with: javascript

http://stackoverflow.com/q/26465760
tagged with: http://stackoverflow.com/tag/html
tagged with: web-applications
type: Question
has body: I am trying to upload files to Google Drive using Google Apps script that also deployed as web app. In the .html file I got - &lt;form id="myForm" action='#' method='post' enctype="multipart/form-data" &gt; &lt;input type="file" name="filesToUpload[]" id="filesToUpload" multiple="" /&gt; &lt;input type="submit" value="Upload File" onclick="this.value='Uploading..'; google.script.run.uploadFiles(this.parentNode)" id="upload-button"&gt; In the .gs file I got - function uploadFiles(form) { var file = form['filesToUpload[]']; I have deployed web app with this code(not only this code of-course). Each time i upload more then one file in the web app, the variable - 'file' contain only the first file i had uploaded. and not all the files. In other words the fileUpload objects contain each time I have tried the fileUpload-dictionary contain only one file. fileUpload class - https://developers.google.com/apps-script/reference/ui/file-upload I read a lot of documentation and I begun to think that it's impossible to upload multiple files using Google apps script(while choosing multiple files in one input of course). Anyone knows something about it? Thanks in advance!
tagged with: javascript
has title: can I upload multiple files with Google apps script?
tagged with: google-apps-script
has answer: http://stackoverflow.com/a/30146920
score: 2
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/28147486
tagged with: file-upload
favorite count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/a/26429761
has comment: http://stackoverflow.com/comment/41504462
has comment: http://stackoverflow.com/comment/41504514
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/26429673
upvote count: 1
has body: Have you tried $("input").prop("id"); That'll search for your input field and find the id property.

http://stackoverflow.com/a/27012491
accepted answer of: http://stackoverflow.com/q/26465832
type: Answer
has body: I met the same problem with Android cordova 3.6.4 got via CLI 4.1.2. I tried to merge two fixing of the issue:CB-7868. The first fixing can be saw with the link CB-7868,https://github.com/apache/cordova-js/pull/88. The second fixing is on the comment on CB-7868. See ************* function clobber(obj, key, value) { exports.replaceHookForTesting(obj, key); obj[key] = value; var needsProperty = false; try { obj[key] = value; } catch (e) { needsProperty = true; } // Getters can only be overridden by getters. if (obj[key] !== value) { if (needsProperty || obj[key] !== value) { utils.defineGetter(obj, key, function() { return value; } ); With those two fixing. There is no error reported on Android API14(4.0) and API15(4.0.3). But, I didn't try if the related plugins can work not. It means I don't know if the fixing is right or not. Also, I got cordova 3.7.0 via CLI 4.1.2 for IOS platform. I can see the fixing, https://github.com/apache/cordova-js/pull/88, has been applied on 3.7.0 JS. But, the function ,clobber, still haven't above fixing. Also, there is no available 3.7.0 for Android cordova. It is still 3.6.4 for Android platform.
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/44649023
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26465832

http://stackoverflow.com/comment/41570975
type: QuestionComment
has text: I know you want to make your website "all browser friendly", but ie8? 2% in the world has used that browser last month. Don't spent to much time to making your website ie8 friendly. `width: 48%\0/ !important; /* IE 8-9 */` is not perfect if you want exactly 28 pixels, but it gets you close
comment on: http://stackoverflow.com/q/26466315
score: 0
type: Comment

http://stackoverflow.com/comment/41516046
type: Comment
has text: Updated with the html included. I don't think my HTML is the problem though. I suppose it could be.
score: 0
comment on: http://stackoverflow.com/q/26435656
type: QuestionComment

http://stackoverflow.com/a/26369346
has comment: http://stackoverflow.com/comment/88491514
score: 1
downvote count: 1
has body: Do it as the way the samurais do it... Example The current date and time is:
upvote count: 2
answers question: http://stackoverflow.com/q/26368682
type: Answer

http://stackoverflow.com/q/26359893
tagged with: jquery
has title: Load html into Datatable child row using ajax
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27773115
has answer: http://stackoverflow.com/a/27890399
tagged with: asp.net
has body: I am trying to load the html returned from a controller into a div when the user clicks on the row of a table. Here is my code: // Add event listener for opening and closing details jQuery('#exRowTable tbody').on('click', 'td.details-control', function () { var tr = $(this).closest('tr'); var row = exRowTable.row(tr); if (row.child.isShown()) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); } else { // Open this row row.child(format()).show(); tr.addClass('shown'); loadChildRow(row); } }); function format() { return '&lt;div id="detailsDiv"&gt;&lt;/div&gt;'; }; function loadChildRow(row) { $.ajax({ type: 'GET', url: '@Url.Action("ChildRow","Users",new{ id= 1})', data: null, success: function (data) { $('.detailsDiv').innerHTML = data; } }); }; However this is not actually inserting the html properly. I think it could have something to do with the div being added dynamically to the dom. What am I doing wrong? Also, I would some how like to pass the row var into the `loadChildRow()1 function and then be able to select only from divs within that row. any idea how i can do this?
type: UnansweredQuestion
tagged with: razor
answer count: 4
has answer: http://stackoverflow.com/a/26359977
has answer: http://stackoverflow.com/a/27361465
type: Question
tagged with: javascript

http://stackoverflow.com/a/26417821
score: 1
has body: Don't switch stylesheets. Create 1 stylesheet and give the body a class. This would be done better via less or sass. body.blue { background-color: #006; } body.dark { background-color: #000; } body.blue a { color: #fff; } body.dark a { color: #600; } Then make all your specific changes as sub styles. Store the class in a cookie, or storage and when you load the page check if it exists and add the class to the body.
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26417764

http://stackoverflow.com/q/26494521
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/41624408
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26495664
has comment: http://stackoverflow.com/comment/41624346
type: Question
possible better answer: http://stackoverflow.com/a/26498095
has title: How can I show that an image link is disabled by using both pointer-events and cursor properties?
tagged with: javascript
has answer: http://stackoverflow.com/a/26498095
answer count: 2
has answer: http://stackoverflow.com/a/26495664
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: dom-events
favorite count: 0
upvote count: 2
tagged with: pointer-events
has body: Fiddle I have an image wrapped in an anchor that has a click action on it (a simple case is in the above fiddle). At certain times, this action is not valid, so I would like to do 3 things: grey the image out (-webkit-filter: invert(40%);) disable the click event (pointer-events: none;) change the cursor (cursor: not-allowed;) Greying the image out always works, but it seems like the pointer-events and cursor properties don't play nicely together. When applying both the pointer-events and cursor properties, I'd expect the action to be disabled AND the cursor to change - but it seems like the pointer-events property overrides my ability to set the cursor. What's the correct way to do this? Code: No styles pointer-events: none (good - I cannot click) cursor: not-allowed (good - I can click, but the cursor has changed) pointer-events: none AND cursor: not-allowed (bad - I can't click but the cursor has NOT changed) img { height: 80px; } .grey { -webkit-filter: invert(40%); } .no-click-1 { pointer-events: none; } .no-click-2 { cursor: not-allowed; } .no-click-3 { pointer-events: none; cursor: not-allowed; }

http://stackoverflow.com/q/26392602
has body: Java calling code: import jdk.nashorn.api.scripting.*; .... myCustomHashMap dataStore = new myCustomHashMap(); ScriptEngineManager sem = new ScriptEngineManager(); ScriptEngine engine = sem.getEngineByName("nashorn"); engine.put("dataStore",dataStore); engine.eval(new java.io.FileReader("test.js")); ((Invocable)engine).invokeFunction("jsTestFunc", "testStr" ); Javascript: function jsTestFunc (testParam) { dataStore.a = [1,2,3]; dataStore.b = {First:"John",Last:"Doe",age:37}; } Goal: I need to JSONify the dataStore after the script execution with no dependence on the script for assistance dataStore.a -&gt; jdk.nashorn.internal.objects.NativeArray dataStore.b -&gt; jdk.nashorn.internal.scripts.JO4 For each Map value, I've tried and failed with: Casting to ScriptObject or ScriptObjectMirror Casting to Map or List Accessing JO4/NativeArray methods directly ScriptUtils.wrap() / ScriptUtils.unwrap() I've tried overriding the HashMap.put() method, but it appears not to be converted to a ScriptObjectMirror on assignments, only on explicit function calls: dataStore.x = [1,2,3] ; -&gt; jdk.nashorn.internal.objects.NativeArray javaHost.javaFunc( [1,2,3] ); -&gt; ScriptObjectMirror I really need to use myCustomHashMap (it timestamps changes and maintains a change list, etc), so I can't radically alter this arrangement. What can I do to get this data back out?
downvote count: 0
answer count: 1
favorite count: 0
type: AnsweredQuestion
has title: Reading Nashorn JO4 and NativeArray
has answer: http://stackoverflow.com/a/28447943
tagged with: java
type: Question
tagged with: nashorn
upvote count: 5
tagged with: javascript
accepted answer: http://stackoverflow.com/a/28447943
score: 5

http://stackoverflow.com/comment/41422112
type: AnswerComment
comment on: http://stackoverflow.com/a/26381633
score: 0
has text: After some testing your code runs very well even under heavy load!
type: Comment

http://stackoverflow.com/a/26415915
answers question: http://stackoverflow.com/q/26415869
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: If you want to avoid global variables you could attach data to the element itself. this.$el.on('click', 'a[data-toggle="tab"]', function(e) { $(this).data('clicked', true); }); And then if ($(this).data('clicked') === true) { ... } .data() is a jQuery method by the way but you can attach the status anyway you see fit
accepted answer of: http://stackoverflow.com/q/26415869

http://stackoverflow.com/q/26402809
type: Question
answer count: 2
upvote count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26402888
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I have this: Цвет лака Выбрать вариант… белый калужница орегон Тип дерева Выбрать вариант… Дуб Клён Ясень Using Jquery i need to transform data from select to ul like this: белый калужница орегон Дуб Клён Ясень also i can't use select id because i don't know count of select it can be 1 2 3 or more, and also i don't know the name of id because it generated in wordpress panel. So what i tried by jquery: $(".variations_form .variations select").each(function () { $j(".summary").append(' ' + $j(this).val() + ' '); $(this).children("option").each(function () { $j(".variation-select").append(' ' + $j(this).val() + ' '); }); }); And finally i got off course false data for me: white caluzhnica oregon oak maple ash oak maple ash Someone please help me to understand how can i get data of each select in each list.
has title: transform each select options value to list of values
accepted answer: http://stackoverflow.com/a/26402980
possible better answer: http://stackoverflow.com/a/26402888
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26402980
tagged with: woocommerce
score: 1

http://stackoverflow.com/a/28323325
score: 0
answers question: http://stackoverflow.com/q/26448560
type: Answer
has body: I encountered this issue now. Your post pointed me to the right problem. I created a plnkr to try to repro and noticed I was able to do $cookieStore.put() just fine inside the $scope method. So the issue seems to be with verisoning for source files. I was using 1.3.11 for angular.js and angular-cookies.js but 1.3.5 for angular-route.js. The fix was to use 1.3.11 for angular-route.js or corresponding version that you are using.

http://stackoverflow.com/a/26405166
has comment: http://stackoverflow.com/comment/47099474
has comment: http://stackoverflow.com/comment/47056355
type: Answer
answers question: http://stackoverflow.com/q/26401251
has body: &lt;g:select name="selectName" from="${yourValue}" optionKey="field" optionValue="field" class="form-control" noSelection="['': '']" value="${defaultValue}"/&gt; optionKey="field" -- if you have an list of objects(view) optionValue="field" -- if you have an list of objects(send to server) in from u can add something like this: from="${["1","2","3"]}"
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/47035165
upvote count: 0

http://stackoverflow.com/comment/41630715
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26498842
type: Comment
has text: There are numerous of these, here are some others.. http://stackoverflow.com/questions/12505760/processing-http-response-in-service, http://stackoverflow.com/questions/19121918/returning-response-data-from-http-in-angular-factory. Official documentation is pretty good as well.

http://stackoverflow.com/comment/42169729
type: Comment
has text: I'm getting the same NotFoundError on my Samsung Galaxy 3 running Chrome 38.0.2125.114. How did you fix?
comment on: http://stackoverflow.com/q/26452517
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41440082
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26393690
has text: I think nothing so relevant, just div elements for my css.. it should be something like ' $("html").toggleClass("lightbox-is-open"); '
score: 0

http://stackoverflow.com/a/26498879
type: Answer
has body: What you need to do is use the success callback of load $(".l").load("show.php?id="+id, {"tab_id": tab_id}, function(serverResponse){ if( !serverResponse ){ /* do something when no response */ } }); See: load() API Docs
answers question: http://stackoverflow.com/q/26498825
score: 0

http://stackoverflow.com/a/26494994
downvote count: 0
type: Answer
has body: I'd suggest, in place of an if, simply using, at the appropriate time: // find the element with a datetime attribute within an a element of // class 'cal-evt', filter that collection: $('a.cal-evt [datetime]').filter(function(){ // keeping only those whose datetime attribute is equal to the datetime attribute // of the (first) 'time.overdue' element: return this.getAttribute('datetime') == $('time.overdue').attr('datetime'); // find the closest ancestor a element, and add the class 'red' to it: }).closest('a').addClass('red'); JS Fiddle demo. References: CSS: Attribute-presence and value selectors. JavaScript Element.getAttribute(). jQuery: addClass(). attr(). closest(). filter().
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26494725
has comment: http://stackoverflow.com/comment/41645772

http://stackoverflow.com/comment/41481403
has text: check only $_SESSION in print_r function like this print_r($_SESSION)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26417155

http://stackoverflow.com/comment/41511908
has text: @JasonP I need help with this similar question please: http://stackoverflow.com/questions/26431890
comment on: http://stackoverflow.com/q/26413598
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26457131
has comment: http://stackoverflow.com/comment/41554701
accepted answer: http://stackoverflow.com/a/26457376
has body: My Node.js application reads a string, containing JSON data, from a Python backend using GET method. Sometimes when I use JSON.parse() and refresh the page after it succeeds, it gives an Unexpected token , error. [ { "postid":"c4jgud85mhs658sg4hn94jmd75s67w8r", "email":"someone@gmail.com", "post":"hello world", "comment":[] }, { "postid":"c4jgud85mhs658sg4hn94jmd75s67w8r", "email":"someone@gmail.com", "post":"hello world", "comment":[] } ] By console.logging the JSON object, I was able to verify that it only prints the object partially (meaning that only a part of the object was passed) when it gives the error - for example: 4hn94jmd75s67w8r", "email":"someone@gmail.com", "post":"hello world", "comment":[] } ] or [ { "postid":"c4jgud85mhs658sg In node.js, Im only using var data = JSON.parse(resJSON); //resJSON is the variable containing the JSON
has comment: http://stackoverflow.com/comment/41554818
score: 0
has comment: http://stackoverflow.com/comment/41554901
upvote count: 1
downvote count: 1
answer count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/41554680
has comment: http://stackoverflow.com/comment/41554951
has comment: http://stackoverflow.com/comment/41554616
tagged with: http://stackoverflow.com/tag/json
has title: Parsing JSON in node.js gives an Error
has comment: http://stackoverflow.com/comment/41554600
has answer: http://stackoverflow.com/a/26457376
has comment: http://stackoverflow.com/comment/41554573
type: AnsweredQuestion
tagged with: javascript
favorite count: 0
type: Question

http://stackoverflow.com/q/26360929
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41381759
has answer: http://stackoverflow.com/a/26361066
downvote count: 2
has answer: http://stackoverflow.com/a/26361130
has comment: http://stackoverflow.com/comment/41381049
has comment: http://stackoverflow.com/comment/41381034
type: Question
has comment: http://stackoverflow.com/comment/41380557
score: -1
has comment: http://stackoverflow.com/comment/41379794
has answer: http://stackoverflow.com/a/26361014
answer count: 3
has comment: http://stackoverflow.com/comment/41380735
upvote count: 1
has comment: http://stackoverflow.com/comment/41381101
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41380527
has comment: http://stackoverflow.com/comment/41379879
has comment: http://stackoverflow.com/comment/41381284
linked to: http://stackoverflow.com/q/12859942
favorite count: 0
has body: I have code which return loop from php to ajax via json_encode() Let me know what I want to do. there is one table call SMTP. Assume that it has 3 value and I want to fetch that 3 value from table, store in array () and Display it to HTML via AJAX in table format. So I'm confused where I place my loop, in AJAX or PHP ? Here is my code. PHP $result=mysql_query("select * from ".$db.".smtp WHERE id = '$user' "); if($result === FALSE) { die(mysql_error()); } while($data = mysql_fetch_row($result)) { $array = array($data[2],$data[3]); } echo json_encode($array); JS $(document).ready(function() { GolbalURL = $.session.get('URL'); $.ajax({ type: "GET", url: GolbalURL+"smtp.php", dataType: "html", success: function(response){ $("#divsmtp").html(response); } }); }); HTML This code return only last value. inarray like ["data2","data3"] My Longest way to do success: function(response){ resultObj = eval (response); var i = Object.keys(resultObj).length; i /=2; //$("#divsmtp").html(i); var content = " " for(j=0; j<i; j++){ k = j+1; if (j % 2 === 0) { alert("j="+j+" k="+k ); content += ' ' + resultObj[j] + resultObj[k] + ' '; } else { k = k+1; var m = j+1; alert("m="+m+" k="+k ); content += ' ' + resultObj[m] + resultObj[k] + ' '; } } content += " " $('#divsmtp').append(content); }
tagged with: ajax
has title: For loop in Ajax or PHP?
has comment: http://stackoverflow.com/comment/41379930
type: UnansweredQuestion

http://stackoverflow.com/q/26505309
has title: Minimum and Maximum of an array in JavaScript
has answer: http://stackoverflow.com/a/26505348
type: Question
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26505358
has answer: http://stackoverflow.com/a/26505358
has answer: http://stackoverflow.com/a/26505346
answer count: 4
has answer: http://stackoverflow.com/a/26505373
has body: I need to sort an array of numbers, so that it returns its minumum and its maximum. The code I've written so far doesn't seem to do anything at all. function sort(array) { arrayNew = []; maximum = array[0]; minimum = array[0]; for (i = 0; i &lt; array.length; i++) { if (maximum &lt; array[i]) { maximum = array[i]; } } arrayNew.push(maximum); for (i = 0; i &lt; array.length; i++) { if (minimum &gt; array[i]) { minimum = array[i]; } } arrayNew.unshift(minumum); return arrayNew; } var arr1 = [3, 8, 7, 6, 5, -4, 3, 2, 1]; alert(sort(arr1));
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41641541
score: 1
accepted answer: http://stackoverflow.com/a/26505346

http://stackoverflow.com/q/26481270
type: Question
tagged with: javascript
tagged with: parse-cloud-code
upvote count: 1
answer count: 1
favorite count: 0
tagged with: parse-platform
has title: Parse.com discern update or insert in BeforeSave
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26484057
accepted answer: http://stackoverflow.com/a/26484057
score: 1
tagged with: before-save
has body: I'm overriding the BeforeSave in CloudCode for Parse.com. This is what I see in the logs: Input: {"original":null,"update":{"password":"5428","phone_number":"56858","ACL":{"T1pXElsPPT":{"read":true,"write":true}},"config":"{}","creator":"T1pXElsPPT","name":"quarta prova"}} Result: Update changed to {"config":"{}","creator":"T1pXElsPPT","name":"quarta prova","password":"5428","phone_number":"56858","ACL":{"T1pXElsPPT":{"read":true,"write":true}}} I need to check the BeforeSave only if the user is creating a new object, not when he's updating an old one. This is what I've done so far: Parse.Cloud.beforeSave("tracker", function(request, response) { var spaces = availableSpace(request.user.id); if (request.original != undefined &amp;&amp; request.original === null) { if (spaces == 0) { response.error("No available spaces"); } else if (spaces &gt;= 1) { response.success(); } else if (spaces &lt; 0) { response.error("Lookup error"); } } else { response.success(); } }); But it seems that original is not in the request object (so it's undefined, always leading to a response.success();) Is there a way to check for original or another way to check if this is an insert or an update?

http://stackoverflow.com/a/26471612
answers question: http://stackoverflow.com/q/26471441
downvote count: 0
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26471441
has body: Think in smaller code chunks, i.e. how could you count the number of common elements in a pair of arrays: function countCommon(a, b) { return a.reduce(function(p, c, e) { return p + (b.indexOf(c) &gt;= 0 ? 1 : 0); }, 0); } Your problem is then reduced (no pun intended) to creating all possible pairs of the keys of hash and evaluating the above function for each key's data: function makePairs(hash) { var result = []; var keys = Object.keys(hash); for (var i = 0, n = keys.length; i &lt; n; ++i) { for (var j = i + 1; j &lt; n; ++j) { result.push([keys[i], keys[j]]); } } return result; } and then you just need the pairs that satisfy the criteria: var result = makePairs(hash).filter(function(pair) { return countCommon(hash[pair[0]], hash[pair[1]]) &gt;= 3; }); Hey presto, only one nested loop! Demo at http://jsfiddle.net/alnitak/kxdngy7n/
type: AcceptedAnswer

http://stackoverflow.com/a/26478086
accepted answer of: http://stackoverflow.com/q/26473346
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26473346
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41597010
has body: The problem with your method is that you are actually displaying in fancybox a clone of your #editSummary selector, passed as parameter within the openPoPup() function so the click event is bound to the original selector in your document flow but not to the clone inside fancybox. As a workaround, you could use the fancybox onComplete callback (I am assuming you are using v1.3.4 because the API options in your code) to bind the click event to the element #btnEdit inside fancybox like : function openPoPup(clickHandle, contentHandle, width, height) { width = typeof a !== 'undefined' ? a : 600; height = typeof b !== 'undefined' ? b : 300; $.fancybox($(contentHandle).html(), { width: width, height: height, // minWidth: width, // not valid in v1.3.x but 2.x // minHeight: height, // not valid in v1.3.x but 2.x autoScale: true, transitionIn: 'none', transitionOut: 'none', hideOnContentClick: false, onStart: function () { //On Start callback if needed }, onComplete: function () { // bind click event to element inside fancybox $("#fancybox-content").on("click", "#btnEdit", function () { alert("click event bound"); }); } }); } jQuery(document).ready(function ($) { $("#btnEditSummary").click(function () { openPoPup('#btnEditSummary', '#editSummary', 300, 300); }); }); // ready Notice I am using .on() in its delegated form : $("#fancybox-content").on("click", "#btnEdit", function (){ ... }); See JSFIDDLE
type: Answer

http://stackoverflow.com/q/26487865
has comment: http://stackoverflow.com/comment/41610929
linked to: http://stackoverflow.com/q/4471582
has comment: http://stackoverflow.com/comment/41611391
linked to: http://stackoverflow.com/q/13538168
has answer: http://stackoverflow.com/a/26488761
type: Question
has comment: http://stackoverflow.com/comment/41610145
has comment: http://stackoverflow.com/comment/41610108
has body: Where am I going wrong with getting my player to move without the delay, I read some articles online "Is it possible to make JQuery keydown respond faster?" and from what I could pick up a game loop was needed so I created one but I keep getting an error in my console Uncaught ReferenceError: game is not defined I don't know why can anyone help me in finding where I'm going wrong. Also I'm using mainly jQuery so a solution using jQuery would be much appreciated. Here is a link to the game Here is my JS: var increments = 10; function game(){ // Put player on map var player = '&lt;div id="player" class="img-responsive"&gt;&lt;/div&gt;'; $("#map").append(player); // Set layout for player controlls $(document).keyup(function (e){ e.preventDefault(); $("#player.img-responsive").removeClass("run"); $("#player.img-responsive").removeClass("hit"); delete e.which; }); $(document).keydown(function (e) { // Use this to identify what button the user is pressing on the keyboard // alert(e.keyCode); // get the position of the character var position = $("#player").position(); switch (e.which) { case 37: // Arrow Left if(position.left &gt;= increments) { $("#player").css('left', position.left - increments + 'px'); $("#player.img-responsive").addClass("run").addClass("flip"); } break; case 38: // Arrow Up if(position.top &lt;= increments) { $("#player").css('top', position.top - increments + 'px'); } break; case 39: // Arrow Right if(position.left &lt; 550) { // Right constraint $("#player").css('left', position.left + increments + 'px'); $("#player.img-responsive").addClass("run").removeClass("flip"); } break; case 40: // Arrow Down if(position.top &lt; 1000) { // Bottom constraint $("#player").css('top', position.top + increments + 'px'); } break; case 90: //right ctrl $("#player.img-responsive").addClass("hit"); break; default: return; } // End Switch }); // End KeyDown function }// end game function var game = game(); // set frame loop setInterval(game, 1000 / 60); Thanks in adv…
has comment: http://stackoverflow.com/comment/41610743
answer count: 1
has comment: http://stackoverflow.com/comment/41611260
has comment: http://stackoverflow.com/comment/41610274
tagged with: javascript
has comment: http://stackoverflow.com/comment/41610452
tagged with: jquery
has comment: http://stackoverflow.com/comment/41611338
has comment: http://stackoverflow.com/comment/41611222
has comment: http://stackoverflow.com/comment/41611143
has title: game loop not working
has comment: http://stackoverflow.com/comment/41611160
has comment: http://stackoverflow.com/comment/41609849
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41609978
score: 0

http://stackoverflow.com/comment/99607590
has text: @MattTheNinja That's true! Google API is now a paid service and this option must be activated from your options... that's after you input your Credit Card info :*/
comment on: http://stackoverflow.com/a/26354847
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26419766
tagged with: javascript
type: AnsweredQuestion
answer count: 1
has body: I am stuck in an issue with javascript. I am using C# to write a hyperlink which can call a javascript to show an alert message. See the code below to know how it's done: First of all this is the code written by C# from server side: //Server side code string myHyperlink = "Click Me!"; When generated by client browser, I see the code as below: //Client side code Click Me! The client code can not call javascript alert when I click the hyperlink. Be cause the javascript code doesn't work. The issue here is: The single quote inside the word "I'm" tear a part the parameter inside alert message. Thus the javascript cannot run, and the message cannot be shown when I click on the hyperlink. The problem here is: The javascript cannot recognize the different between single quote inside the message and the surrounded quote of message. Requirement: How can I define a single quote inside another single quote in javascript parameter? Regards, Dung Tri
type: Question
has answer: http://stackoverflow.com/a/26419856
score: 0
has title: How to call javascript alert on hyperlink's click with a message cotained single quote inside?
accepted answer: http://stackoverflow.com/a/26419856
tagged with: c#

http://stackoverflow.com/q/26387789
tagged with: angularjs
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41431706
accepted answer: http://stackoverflow.com/a/26388322
type: Question
has title: Angular callback after API call
score: 0
has answer: http://stackoverflow.com/a/26388322
answer count: 1
tagged with: javascript
has body: I have an angular app but sometimes my callbacks seem to execute before they should. I have defined an service for my api calls, its methods look like this. function addOffer(id) { var request = $http({ method: "get", url: "/api/campaign/offers", params: { action: "add", id: id } }); return ( request.then(handleSuccess, handleError) ); } function handleError(response) { // The API response from the server should be returned in a // nomralized format. However, if the request was not handled by the // server (or what not handles properly - ex. server error), then we // may have to normalize it on our end, as best we can. if ( !angular.isObject(response.data) || !response.data.message ) { return ( $q.reject("An unknown error occurred.") ); } // Otherwise, use expected error message. return ( $q.reject(response.data.message) ); } function handleSuccess(response) { return ( response.data ); } And then in my controller I have scope functions defined like this $scope.addOffer = function(){ campaignService.addOffer($scope.id).then( loadRemoteData() ); }; The load remote data function syncs the client with what is stored in the application backend. My problem is that in the controller method addOffer, the loadRemoteData() function fires before the offer is added, so that it loads the data without the new offer. But then upon a forced refresh that offer is there. Is there something that needs to be done differently so that this will work as expected?

http://stackoverflow.com/q/26467692
type: AnsweredQuestion
tagged with: famo.us
score: 0
has comment: http://stackoverflow.com/comment/41719145
type: Question
has title: How to create a hexagonal custom surface in famo.us
has comment: http://stackoverflow.com/comment/41626354
has answer: http://stackoverflow.com/a/26548391
has comment: http://stackoverflow.com/comment/41635525
has body: I'm testing "famo.us" Javascript Framework, and don't know how to do "custom surfaces". My goal is to create hexagonal surfaces (if possible with rounded corners) and put those surfaces next to each other as this example : But, i also need to click on each surface and activate different actions depending on the surface. AND also to put images on each surface ! Right now, i know how to use rectangular famo.us surfaces, i know how to modify it, turn it, translate it, etc... But is it possible to create custom surfaces? My project is Angular / famo.us project. For the moment my idea is to create surfaceContainer with 3 rectangular modified surfaces but i can't have rounded corners with this solutions, and it's not easy to set images on it. Does any one have an idea? Please share.
tagged with: famous-angular
has comment: http://stackoverflow.com/comment/41639957
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26548391

http://stackoverflow.com/q/26502786
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41638597
has comment: http://stackoverflow.com/comment/41638231
has comment: http://stackoverflow.com/comment/41638645
has answer: http://stackoverflow.com/a/26504436
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/41638381
has comment: http://stackoverflow.com/comment/41638678
has title: Return to current state in AngularJS
has comment: http://stackoverflow.com/comment/41638442
score: 0
has comment: http://stackoverflow.com/comment/41638550
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/41638293
has body: I have a facebook-like application written using codeigniter and angularjs. When I click the like button of a post, which the post resides in the bottom part of the page, I always get return back to the upper most part of the page. How can I make this when I click on that particular point, I will still stay in that area? here's the code var newsfeed = angular.module('newsfeed', ['ngRoute']); newsfeed.controller('newsfeedController',function($scope,$http){ var getPosts = function(){ $http.get('/status_list/newsfeed_gen').success(function(data){ $scope.posts = data; console.log(data); }); } getPosts(); $scope.like = function(id) { $http({ method: "POST", url: '/status_list/like/'+ id, headers: { 'Content-Type' : 'application/x-www-form-urlencoded' }, data: $.param(id) }) .success(function(data){ console.log(data); getPosts(); }) .error(function(data){ console.log(data); }); } }); ==== HTML ==== View all <a href="<?= base_url('{{post.username}}')?>"> <img src="<?= base_url('{{post.profile_pic}}') ?>"/> {{post.fullname}} {{post.date_posted}} {{post.body}} {{post.like}} {{post.comment}}
answer count: 1

http://stackoverflow.com/q/26492863
has body: Hey guys am new to javasript app development..I have learned about objects and arrays and i got that values in the arrays can be called by index but in objects it cant be possible. So i have tried the code name = ['dfsdf','sfdsf'] var b = name,'DFDSF'; console.log(b[0].name); It gives me undefined Instead of returning the array name. I just want to know how can i access like b[index].nestedarrayname. It would be really helpful if you provide some example codes ..Thanks
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26492905
score: 0
accepted answer: http://stackoverflow.com/a/26493089
answer count: 3
has answer: http://stackoverflow.com/a/26493089
has answer: http://stackoverflow.com/a/26492935
has title: Nesting arrays in javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41619453
has answer: http://stackoverflow.com/a/26492905
type: Question

http://stackoverflow.com/comment/41426664
has text: Not directly related to your problem but you may want to read http://php.net/manual/en/security.database.sql-injection.php
score: 1
comment on: http://stackoverflow.com/q/26386271
type: Comment
type: QuestionComment

frontend
tags question: http://stackoverflow.com/q/26436533
tags question: http://stackoverflow.com/q/26420440
tag name: frontend
tags question: http://stackoverflow.com/q/26503593
type: Tag
tags question: http://stackoverflow.com/q/26476226

http://stackoverflow.com/a/26386112
has body: 'this' inside your event listeners is probably the plus/minus button that was clicked. You can fix this by using a 'self' variable: controlZoom:function(){ var self = this; var plusZoom = document.getElementsByClassName('icon-plus-sign')[0], minusZoom = document.getElementsByClassName('icon-minus-sign')[0], count = this.gMap.getZoom(); plusZoom.addEventListener('click', function() { self.gMap.zoom(count++); }); minusZoom.addEventListener('click', function() { self.gMap.zoom(count--); }); } or using .bind: controlZoom:function(){ var plusZoom = document.getElementsByClassName('icon-plus-sign')[0], minusZoom = document.getElementsByClassName('icon-minus-sign')[0], count = this.gMap.getZoom(); plusZoom.addEventListener('click', function() { this.gMap.zoom(count++); }.bind(this)); minusZoom.addEventListener('click', function() { this.gMap.zoom(count--); }.bind(this)); } These fixes assume that 'this' inside controlZoom is the object that has gMap! I think it is, because you say the this.gMap.getZoom() line is returning the correct count. So my two suggestions should both work, but if not, try debugging by adding console.debug(this) to check that 'this' is what you expect. A note about using ++ ++ is an operator, and count++ will increment count and return. But the value passed into the function will be that of count before it was incremented. You can convince yourself of this via the following console session: var n = 0 function report(p) { console.log(p) } report(n++) 0 You call the 'report' function with n++, which you would think might lead it to print out '1'. In fact it actually prints out '0'. This is because n is passed into report before it is incremented by ++. In your case, the first time you call your zoom(count++) function, you are in fact calling it with the existing value of count, and then only afterwards is count incremented. So it appears as if you need two clicks to zoom in. The safe way to do this is: plusZoom.addEventListener('click', function() { co…
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26386029
has comment: http://stackoverflow.com/comment/41426284
answers question: http://stackoverflow.com/q/26386029
has comment: http://stackoverflow.com/comment/41427563
score: 4
has comment: http://stackoverflow.com/comment/41427662
type: AcceptedAnswer
type: Answer
upvote count: 4

http://stackoverflow.com/q/26473739
tagged with: javascript
linked to: http://stackoverflow.com/q/4244896
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41585020
has comment: http://stackoverflow.com/comment/41584954
duplicate of: http://stackoverflow.com/q/4244896
favorite count: 0
type: UnansweredQuestion
has body: Im new to stack overflow so pls be patient with me. JSON: {"mcokzoo":{"id":48182210,"name":"mcokzoo","profileIconId":682,"summonerLevel":30,"revisionDate":1413774230000}} Lets say I have the json above. I changed the data and removed stuff that didn't matter. I want the user to input their username into the search bar and then use that to find their id. function getSummonerId(username) { url = summonerURL+"/by-name/" + username + key; xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", url, false ); xmlHttp.send( null ); var jsonText = xmlHttp.responseText; var summonerData = JSON.parse(jsonText); //alert(jsonText) return summonerData.(This is the part i have not clue) } Idk what to put in the above spot. I can't put the string name and I can seem to figure out how to put a variable name their correctly w/o hard coding. Any suggestions? EDIT I can't get it to work when i do window[variableName] also I read I wasn't suppose to use eval - also not working. Also I'm not using jquery which would also make the problem different
has comment: http://stackoverflow.com/comment/41585159
tagged with: object
answer count: 0
has title: How to convert string read in by search bar to an object -- JSON / usernames
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41585133
downvote count: 0

http://stackoverflow.com/a/26491105
answers question: http://stackoverflow.com/q/26491072
accepted answer of: http://stackoverflow.com/q/26491072
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41616178
upvote count: 2
has comment: http://stackoverflow.com/comment/41616133
type: Answer
score: 2
has body: Simple, press F12 to open up the developer console. Then, to show the device choice options: Ctrl + Shift + M in Windows/Linux Cmd + Shift + M in Mac To show the ruler, go to: Under Settings > General > Show rulers a ruler can be enabled which will be displayed when you hover over or select an element in the Elements panel. All keyboard shortcuts for Chrome can be found here: https://developer.chrome.com/devtools/docs/shortcuts

http://stackoverflow.com/a/26430286
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26429416
has comment: http://stackoverflow.com/comment/41506128
has body: Try this method: img = new Image(); // this is important img.src = src; // new src for the image. img.onload = function () { //Your logic. Replace the original image with the new one. }; Instead of modifying the src of the image, try replacing the img tag with the new one when the new image is loaded. This should work for you. The issue is mainly because of the caching in chrome.

http://stackoverflow.com/q/26415925
has comment: http://stackoverflow.com/comment/41492205
linked to: http://stackoverflow.com/q/15034859
upvote count: 12
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/18436245
has title: chrome.tabs.getCurrent() or tabs.query()
has comment: http://stackoverflow.com/comment/41485557
has body: Both methods are producing the same error Uncaught TypeError: Cannot read property 'query' of undefined for my content script... I've already looked at How to fetch URL of current Tab in my chrome extension using javascript and How do you use chrome.tabs.getCurrent to get the page object in a Chrome extension? though I'm still not sure what I'm doing incorrectly. manifest.json { "name": "Extension Tester", "version": "0.0.1", "manifest_version": 2, "description": "Tester", "permissions": [ "tabs" ], "content_scripts": [ { "matches": ["https://www.google.com/"], "js": [ "inject.js" ] } ] } inject.js chrome.tabs.query({ currentWindow: true, active: true }, function (tabs) { console.log(tabs[0].id); }); or chrome.tabs.getCurrent(function (tab) { console.log(tab.id); });
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/6202953
score: 12
linked to: http://stackoverflow.com/q/6718256
has answer: http://stackoverflow.com/a/35523438
accepted answer: http://stackoverflow.com/a/35523438
answer count: 1
favorite count: 0
tagged with: google-chrome-extension

http://stackoverflow.com/comment/41618326
has text: Also, it's working fine here (when running code snippet in stackoverflow). But it doesn't work @ [jsfiddle.net](http://jsfiddle.net)
comment on: http://stackoverflow.com/a/26490755
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26415528
has comment: http://stackoverflow.com/comment/41478608
has body: Just use new Date() instead. It will instantiate it to the current time.
downvote count: 1
has comment: http://stackoverflow.com/comment/41478653
upvote count: 1
answers question: http://stackoverflow.com/q/26415523
score: 0
type: Answer

http://stackoverflow.com/a/26496697
has comment: http://stackoverflow.com/comment/41627676
type: Answer
answers question: http://stackoverflow.com/q/26496609
has body: You can do this either way. In JavaScript, everything is an object including arrays and a typical way to instantiate is to use the keyword new. But, for a few cases including array, this can be avoided by declaring an array like this: var arr = [3,45,43,4]; however, the second way (using []) of creating an array is preferred because: it is simpler it is faster See discussion here - Why is arr = [] faster than arr = new Array?
score: 0

http://stackoverflow.com/a/26495266
has body: As explained in the Chrome extension documentation, there are 2 types of background pages: persistent background page : always "opened" event background page : "open and closed" as needed You are using the second one, as specified with the "persistent": false in your manifest.json file, so the background code will not execute itself when you normally load your page. And I am pretty sure that when you are using the developer tool ("observing the console") on your background page, the page is "opened" and does not close while the console remains open. By removing the "persistent": false your code will be executed. But as suggested in the documentation, you should use event pages as much as possible so have a look at the lifetime documentation to see the different ways you can communicate with your background page and thus execute your desired code.
type: AcceptedAnswer
downvote count: 0
score: 3
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/41625943
accepted answer of: http://stackoverflow.com/q/26494403
answers question: http://stackoverflow.com/q/26494403

http://stackoverflow.com/q/26421709
has body: I have an if statement that should pop up an alert window if the condition is true, nut nothing happens. Its like its not getting the value of the variable and yet the variable is being displayed in a div called result. JS : $x = 0; $(window).load(function () { $(".DragItem").draggable({ revert: 'invalid', helper: "clone" }); $(".drop1").droppable({ accept: '#1', activeClass: 'DropTargetValid', drop: function (ev, ui) { var id = $(ui.draggable).attr("id"); $(ev.target).append(ui.draggable.clone()); $("#" + id).draggable('disable'); $x++; document.getElementById("result").innerHTML = $x; } }); $(".drop2").droppable({ accept: '#2', activeClass: 'DropTargetValid', drop: function (ev, ui) { var id = $(ui.draggable).attr("id"); $(ev.target).append(ui.draggable.clone()); $("#" + id).draggable('disable'); $x++; document.getElementById("result").innerHTML = $x; } }); $(".drop3").droppable({ accept: '#3', activeClass: 'DropTargetValid', drop: function (ev, ui) { var id = $(ui.draggable).attr("id"); $(ev.target).append(ui.draggable.clone()); $("#" + id).draggable('disable'); $x++; document.getElementById("result").innerHTML = $x; } }); $(".drop4").droppable({ accept: '.DragItem', activeClass: 'DropTargetValid', drop: function (ev, ui) { var id = $(ui.draggable).attr("id"); $(ev.target).append(ui.draggable.clone()); $("#" + id).draggable('disable'); } }); }); if ($x == 3) { // code to be executed if condition is true alert('Well Done'); } else { // code to be executed if condition is false }
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26421759
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41489261
possible better answer: http://stackoverflow.com/a/26421874
has title: Simple JS if Statement Not Working
type: Question
has answer: http://stackoverflow.com/a/26421874
has comment: http://stackoverflow.com/comment/41489181
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26421759
has comment: http://stackoverflow.com/comment/41489328
score: 0
answer count: 2

twitter-bootstrap
tags question: http://stackoverflow.com/q/26513548
tags question: http://stackoverflow.com/q/26471681
tags question: http://stackoverflow.com/q/26353842
tags question: http://stackoverflow.com/q/26427676
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/26461390
tags question: http://stackoverflow.com/q/26458370
tags question: http://stackoverflow.com/q/26416078
tags question: http://stackoverflow.com/q/26451069
tags question: http://stackoverflow.com/q/26458083
tags question: http://stackoverflow.com/q/26460779
tags question: http://stackoverflow.com/q/26379767
tags question: http://stackoverflow.com/q/26484326
tags question: http://stackoverflow.com/q/26477319
tags question: http://stackoverflow.com/q/26394692
tags question: http://stackoverflow.com/q/26391218
tags question: http://stackoverflow.com/q/26473891
tags question: http://stackoverflow.com/q/26483755
tags question: http://stackoverflow.com/q/26370160
tags question: http://stackoverflow.com/q/26407722
tags question: http://stackoverflow.com/q/26509989
tags question: http://stackoverflow.com/q/26509802
tags question: http://stackoverflow.com/q/26432381
tags question: http://stackoverflow.com/q/26493234
tags question: http://stackoverflow.com/q/26468662
tags question: http://stackoverflow.com/q/26376990
tags question: http://stackoverflow.com/q/26450444
tags question: http://stackoverflow.com/q/26473084
tags question: http://stackoverflow.com/q/26498131
tags question: http://stackoverflow.com/q/26476922
tags question: http://stackoverflow.com/q/26494918
tags question: http://stackoverflow.com/q/26459958
tags question: http://stackoverflow.com/q/26472952
tags question: http://stackoverflow.com/q/26382551
tags question: http://stackoverflow.com/q/26413672
tags question: http://stackoverflow.com/q/26395960
tags question: http://stackoverflow.com/q/26459240
tags question: http://stackoverflow.com/q/26354611
tags question: http://stackoverflow.com/q/26410294
tags question: http://stackoverflow.com/q/26404407
tags question: http://stackoverflow.com/q/26475562
tags question: http://stackoverflow.com/q/26497707
tags question: http://stackoverflow.com/q/26502824
tags question: http://stackoverflow.com/q/26359990
tags question: http://stackoverflow.com/q/26406757
tags question: http://stackoverflow.com/q/26506001
tags question: http://stackoverflow.com/q/26438466
tags question: http://stackoverflow.com/q/26394376
tags question: http://stackoverflow.com/q/26378308
tags question: http://stackoverflow.com/q/26426360
tags question: http://stackoverflow.com/q/26478428
tags question: http://stackoverflow.com/q/26510561
tags question: http://stackoverflow.com/q/26487399
tags question: http://stackoverflow.com/q/26392693
tags question: http://stackoverflow.com/q/26478448
tags question: http://stackoverflow.com/q/26370197
tags question: http://stackoverflow.com/q/26359861
tags question: http://stackoverflow.com/q/26430908
tags question: http://stackoverflow.com/q/26361480
tags question: http://stackoverflow.com/q/26436355
tags question: http://stackoverflow.com/q/26487177
type: Tag
tags question: http://stackoverflow.com/q/26502229
tags question: http://stackoverflow.com/q/26510593
tags question: http://stackoverflow.com/q/26395023
tags question: http://stackoverflow.com/q/26415869
tags question: http://stackoverflow.com/q/26387653
tags question: http://stackoverflow.com/q/26389771
tags question: http://stackoverflow.com/q/26396205
tags question: http://stackoverflow.com/q/26373585
tags question: http://stackoverflow.com/q/26509400
tags question: http://stackoverflow.com/q/26380240
tags question: http://stackoverflow.com/q/26498340
tags question: http://stackoverflow.com/q/26411340
tags question: http://stackoverflow.com/q/26501929
tags question: http://stackoverflow.com/q/26510486
tags question: http://stackoverflow.com/q/26477828
tags question: http://stackoverflow.com/q/26394016
tags question: http://stackoverflow.com/q/26423406
tags question: http://stackoverflow.com/q/26440835

boot2docker
type: Tag
tag name: boot2docker
tags question: http://stackoverflow.com/q/26361008

http://stackoverflow.com/q/26488251
tagged with: javascript
favorite count: 0
has title: Check if p:fileUpload component contains any file to upload, to change background
tagged with: css
accepted answer: http://stackoverflow.com/a/26508858
linked to: http://stackoverflow.com/q/1449666
upvote count: 1
type: Question
type: AnsweredQuestion
has body: I am using PrimeFaces p:fileUpload (primefaces 3.5) to upload various files. I want to check if the field, where are chose files shown and ready to be uploaded, contains any files. Depends on it change background. Maybe with javascript? &lt;p:fileUpload id="fileUploadComponent" mode="advanced" dragDropSupport="true" uploadLabel="Process" label="Choose files" widgetVar="fileUploadWidget" multiple="true" styleClass="" onstart="setUploadFilesCount()" allowTypes="/(\.|\/)(gif|jpg|jpeg|png|pdf|odt|ods|doc|docx|csv|xlsx|xls|txt)$/" fileUploadListener="#{documentsBean.uploadAll}" &gt; &lt;/p:fileUpload&gt; Also fileUpload has dragDropSupport true, so whenever files are drag &amp; droped i want to change background aswell as when i chose file with button. Then how can i set the styleClass of the upload field. Now i have it like this: div.fileupload-content.ui-widget-content.ui-corner-bottom { min-height: 450px; background: url("../resources/images/uploadBackground2.png") 0 0 no-repeat !important; background-position: center center !important;} How can i achieve it pls? Thank you very much.
tagged with: primefaces
score: 1
tagged with: jsf-2
has answer: http://stackoverflow.com/a/26508858
answer count: 1
downvote count: 0

http://stackoverflow.com/a/26384253
answers question: http://stackoverflow.com/q/26384096
type: Answer
has body: You can use jQuery slideshow plugin like jcarousel or jssor. Just do a google search on "jQuery slideshow" or "jQuery carousel". I recommend you to use jcarousel. Anas
has comment: http://stackoverflow.com/comment/41422854
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41422959
downvote count: 0

http://stackoverflow.com/a/26464256
type: Answer
has comment: http://stackoverflow.com/comment/41568533
score: 2
has comment: http://stackoverflow.com/comment/41571045
answers question: http://stackoverflow.com/q/26463972
downvote count: 0
has comment: http://stackoverflow.com/comment/41569270
has body: It is more angular-esque to create two directives and a service that links them for this purpose. As a rough outline: app.service('toggleService', function() { var toggleables = {}; this.registerToggleable = function(key, f) { toggleables[key] = f; } this.toggle = function(key) { var f = toggleables[key]; f(); } }); app.directive('toggler', function(toggleService) { return { link: function(scope, elem, attrs) { elem.bind("click", function() { toggleService.toggle(attrs.toggler); // because the event handler operates outside of angular digest cycle scope.$apply(); }); } } }) app.directive('toggleable', function(toggleService) { return { link: function(scope, elem, attrs) { function toggle() { scope.visible = !scope.visible; } toggleService.registerToggleable(attrs.toggleable, toggle); } } }); The above will need tweaking to actually do anything apart from set a variable on the scope, but you can then use the two like so: Click me to toggle Hey This way you are declaring the toggle functionality on the elements themselves, with no ID-based lookup magic.
upvote count: 2

http://stackoverflow.com/comment/41382360
type: Comment
has text: @Johan Fixed, sorry I noticed it didn't have a `$` at the start.
comment on: http://stackoverflow.com/a/26362172
score: 0
type: AnswerComment

http://stackoverflow.com/q/26423926
has comment: http://stackoverflow.com/comment/41492948
has title: javascript/jQuery find all Strings and replace - but
has answer: http://stackoverflow.com/a/26424138
type: Question
has comment: http://stackoverflow.com/comment/41492984
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has body: Find all the words and replace - but only the words that are not contained in links. TEST TEST TEST TEST Find ALL "TEST" Only, which do not exist in a link.
has comment: http://stackoverflow.com/comment/41493709
type: UnansweredQuestion

http://stackoverflow.com/comment/41620919
has text: Thanks for this, however it doesnt seem to be responding. Im getting ReferenceError: buyBulk is not defined when i click the button. Any ideas?
type: Comment
comment on: http://stackoverflow.com/a/26492451
score: 0
type: AnswerComment

http://stackoverflow.com/a/26443253
answers question: http://stackoverflow.com/q/26443239
downvote count: 0
has body: 3. is a number, so the . is the decimal point and doesn't start a property. 3..something is a number followed by a property.
score: 8
upvote count: 8
type: Answer

http://stackoverflow.com/comment/44351840
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26554118
type: Comment
has text: This was helpful! For the sake of ultra clarity I would like to mention that 'myDropzone' must be the camel-case version of your form's id.

http://stackoverflow.com/comment/41397032
has text: or even you should also see "First div" since it also contains "a" and "c"
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26368597

http://stackoverflow.com/q/26409846
has answer: http://stackoverflow.com/a/26410208
type: Question
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26410208
tagged with: http://stackoverflow.com/tag/json
has title: How to use $.when when the number of getJSON URLs is variable?
has body: I'm chaining getJSON requests with .when. Code is similar to this: $.when( $.getJSON(url0),$.getJSON(url1), $.getJSON(url2)).done( function() { $.each(arguments, function(index, result) { … How can I write this so if the URL set contains url3 or url4 or more or only url0 it can proceed? I store the url vars in a file or in local storage.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41468476
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41468113

object
tags question: http://stackoverflow.com/q/26467384
tag name: object
tags question: http://stackoverflow.com/q/26480797
tags question: http://stackoverflow.com/q/26441001
tags question: http://stackoverflow.com/q/26436025
tags question: http://stackoverflow.com/q/26472649
tags question: http://stackoverflow.com/q/26439098
tags question: http://stackoverflow.com/q/26446284
tags question: http://stackoverflow.com/q/26411012
tags question: http://stackoverflow.com/q/26453842
tags question: http://stackoverflow.com/q/26464272
tags question: http://stackoverflow.com/q/26447308
tags question: http://stackoverflow.com/q/26444168
tags question: http://stackoverflow.com/q/26473739
tags question: http://stackoverflow.com/q/26455709
tags question: http://stackoverflow.com/q/26377920
tags question: http://stackoverflow.com/q/26496779
tags question: http://stackoverflow.com/q/26474400
tags question: http://stackoverflow.com/q/26509976
tags question: http://stackoverflow.com/q/26395937
tags question: http://stackoverflow.com/q/26485459
tags question: http://stackoverflow.com/q/26482250
tags question: http://stackoverflow.com/q/26457729
tags question: http://stackoverflow.com/q/26394840
tags question: http://stackoverflow.com/q/26364354
tags question: http://stackoverflow.com/q/26494401
tags question: http://stackoverflow.com/q/26408829
tags question: http://stackoverflow.com/q/26443251
tags question: http://stackoverflow.com/q/26369811
tags question: http://stackoverflow.com/q/26451579
tags question: http://stackoverflow.com/q/26498725
tags question: http://stackoverflow.com/q/26387124
tags question: http://stackoverflow.com/q/26434018
tags question: http://stackoverflow.com/q/26398954
tags question: http://stackoverflow.com/q/26457929
tags question: http://stackoverflow.com/q/26474614
tags question: http://stackoverflow.com/q/26428072
tags question: http://stackoverflow.com/q/26436590
tags question: http://stackoverflow.com/q/26453055
tags question: http://stackoverflow.com/q/26410900
tags question: http://stackoverflow.com/q/26461965
tags question: http://stackoverflow.com/q/26489509
tags question: http://stackoverflow.com/q/26421417
tags question: http://stackoverflow.com/q/26366211
tags question: http://stackoverflow.com/q/26455517
tags question: http://stackoverflow.com/q/26487650
tags question: http://stackoverflow.com/q/26421476
tags question: http://stackoverflow.com/q/26454574
tags question: http://stackoverflow.com/q/26454655
tags question: http://stackoverflow.com/q/26442704
tags question: http://stackoverflow.com/q/26372068
type: Tag
tags question: http://stackoverflow.com/q/26372842
tags question: http://stackoverflow.com/q/26461542
tags question: http://stackoverflow.com/q/26459022
tags question: http://stackoverflow.com/q/26440870
tags question: http://stackoverflow.com/q/26412567

http://stackoverflow.com/comment/41385881
comment on: http://stackoverflow.com/q/26364141
has text: If your goal is to use JS as a template engine, don't.
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41486319
has text: No one knows the solution? :S
comment on: http://stackoverflow.com/q/26401037
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26477066
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26476344
has body: I implemented myself with something like this: &lt;input name="myaccount1" type="text" style="text-align:right" onchange="mask_account(this)"&gt; This is the function: function mask_account(field_account){ var qty_chars = field_account.value.length; var zeros = '' for (i=0; i &lt; 4 - qty_chars; i++ ){ zeros= zeros + '0'; } var new_value = zeros + field_account.value; field_account.value = new_value; }

http://stackoverflow.com/q/26391581
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26391646
accepted answer: http://stackoverflow.com/a/26391646
possible better answer: http://stackoverflow.com/a/26391645
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26391645
has body: I am trying to use OOP in Javascript. I have two questions respect to this: I have found a strange behavior in this code: function Apple(pParam){ this.var1 = "default value"; this.init = function(){var1 = pParam;}; this.getValue = function(){return var1;}; } obj = new Apple("new value"); obj.init(); alert(obj.getValue()); //returns 'new value' alert(obj.var1); //returns 'default value' I expected same result in both alerts but these are different... it likes 'var1' has different interpretation if this is called as variable or from getter function. Other question: how I can implement "init" function as builder, implicitly?? (as C++ or Java) Thanks!!
type: Question
answer count: 2
tagged with: function
tagged with: javascript
tagged with: class
score: 0
has title: OOP in Javascript: questions about classes, attribs, and builder functions
upvote count: 1
has comment: http://stackoverflow.com/comment/41436209

http://stackoverflow.com/q/26374657
downvote count: 2
has comment: http://stackoverflow.com/comment/41406531
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26374894
has title: Use JavaScript to execute a URL, but do not open a new window or tab
has comment: http://stackoverflow.com/comment/41405612
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41405895
answer count: 2
has answer: http://stackoverflow.com/a/26375163
favorite count: 0
type: UnansweredQuestion
has body: How can I use JS to execute a URL, but not open a new window or tab?

http://stackoverflow.com/comment/41549491
type: Comment
type: QuestionComment
has text: Is addClassesToButtons() executed on document.ready() or not at all?
comment on: http://stackoverflow.com/q/26454253
score: 0

http://stackoverflow.com/comment/41705721
comment on: http://stackoverflow.com/q/26418722
score: 0
type: Comment
has text: Thanks folks for all who replied, (and RSquared for his answer) and apologies for the vagueness of the original query. I thought it would be fairly basic and actually sorted it myself after posting but thought I would see what other variations were possible. Of course it's "populateList();" which I used which does the trick.
type: QuestionComment

http://stackoverflow.com/q/26373982
has comment: http://stackoverflow.com/comment/41404369
tagged with: php
has body: I have a form that I use JavaScript to set the value of a hidden INPUT field which is the text of the OPTION selected. The $_POST captures the value of the OPTION but not the value of the hidden INPUT. The hidden INPUT is being used to pass the OPTION text so it is available in the $_POST array. This is the section of JavaScript used to get the value and text of the selected OPTION var sele = document.getElementById('building_type'); var seleVal = sele.options[sele.selectedIndex].value; var seleTxt = sele.options[sele.selectedIndex].text; This is where I set the value of the INPUT field with an ID of "other_hidden_text" in the same JavaScript. document.getElementById("other_hidden_text").value = seleTxt; My problem is $_POST['other_hidden_text'] is empty. Any ideas why?
has comment: http://stackoverflow.com/comment/41404483
linked to: http://stackoverflow.com/q/871858
upvote count: 3
has comment: http://stackoverflow.com/comment/41404674
downvote count: 3
has comment: http://stackoverflow.com/comment/41404365
tagged with: post
has answer: http://stackoverflow.com/a/71935543
type: Question
has answer: http://stackoverflow.com/a/69334260
tagged with: javascript
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41405085
tagged with: http://stackoverflow.com/tag/html
has title: hidden INPUT value not available in $_POST
has answer: http://stackoverflow.com/a/26374107
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41535446
comment on: http://stackoverflow.com/q/26446386
score: 0
type: Comment
type: QuestionComment
has text: @Rudie just for u i have linked the full game on github go nuts and maybe u can help me with this question as well still waiting on an answer http://stackoverflow.com/questions/26391577/add-a-countdown-timer-that-increments-in-javascript

http://stackoverflow.com/q/26445555
tagged with: javascript
tagged with: jquery
has title: How do I display image count of specific type of image with jQuery?
favorite count: 0
has answer: http://stackoverflow.com/a/26445682
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41533763
has answer: http://stackoverflow.com/a/26446034
accepted answer: http://stackoverflow.com/a/26446034
type: AnsweredQuestion
upvote count: 0
has body: So I've got a page with 6 images. 4 are of some type of ball (basketball, baseball, etc.). One is of a truck, and another is random. I have a from with two radio buttons which give the user the option to display the number of each type of image (Images of balls, images of trucks, etc). I need to write javascript/jquery to take the radio button they selected and then display the image count below in a span tag ("There are X amount of picture of a ball", "There are X amount of pictures of a truck"). I can figure out how to get values of what is checked but I have no idea how to get the image count of how many of each type of image. (Without just making seperate spans with the number preset and just displaing whichever count the user chooses) Here is what I've got so far: Some Images | | | | Images of Balls Images of Trucks function getImageCount() { if ($("#ballImages").prop("checked")) { var count = $("#images img[src*="ball"]").length; document.write('There are ' + count + ' images of a ball!'); } else if ($("#truckImages").prop("checked")) { var count = $("#images img[src*="truck"]").length; document.write('There are ' + count + ' images of a truck!'); } }
type: Question
has answer: http://stackoverflow.com/a/26446175
tagged with: if-statement
score: -1
has comment: http://stackoverflow.com/comment/41533755
has comment: http://stackoverflow.com/comment/41534133
possible better answer: http://stackoverflow.com/a/26445682
has comment: http://stackoverflow.com/comment/41533752
answer count: 3
tagged with: function
downvote count: 1

http://stackoverflow.com/q/26468023
has body: I updated Chrome browser on 10/17/2014. After this I was not able to see polygon drawn on Google Maps v3 Javascript in Chrome. In IE it is working perfectly and before Chrome latest update it was working fine on Chrome too. Please let me know if I need to put any fix to show up in Chrome. Following code is being used to create Polygon of radius Ring. Json Object is being passed to the method and it is being used to draw the polygon on mapInstance of google Map. EDRV2.EDRMAPV3GOOGLEV3.Map.prototype.createPolylines = function(category, subcategory, polylineJSONObjects, showOnMap) { var polylines = []; var pts = null; var rawPairs = null; var rawLngLat = null; try { for (var i = 0; i &lt; polylineJSONObjects.length; i++) { var polygonType = null; switch (category) { case EDRV2.LIGHTBOX.INTERNAL.SiteCategoryTypes.CONTOUR: polygonType = EDRV2.EDRMAPV3.EnumPolygonTypes.CONTOUR; break; case EDRV2.LIGHTBOX.INTERNAL.SiteCategoryTypes.RADIUSRING: polygonType = EDRV2.EDRMAPV3.EnumPolygonTypes.RADIUSRING; break; case EDRV2.LIGHTBOX.INTERNAL.SiteCategoryTypes.QUICKSCREENQUADRANT: polygonType = EDRV2.EDRMAPV3.EnumPolygonTypes.QUICKSCREENQUADRANT; break; } polylines.push(new EDRV2.EDRMAPV3GOOGLEV3.Polyline(polygonType, this.mapInstance, polylineJSONObjects[i].coordinates, polylineJSONObjects[i].normalPolyAttributes, polylineJSONObjects[i].highlightPolyAttributes, polylineJSONObjects[i].normalPolyAttributes.mapLabelText)); } var mapObjectCollection = this.mapObjectAddRange(category, subcategory, EDRV2.EDRMAPV3.EnumMapObjectTypes.POLYLINE, polylines); mapObjectCollection.isActivated = true; if (showOnMap == true) { for (var j = 0; j &lt; mapObjectCollection.mapObjects.length; j++) { mapObjectCollection.mapObjects[j].setMap(this.mapInstance); } } } catch (ex) { throw new Error("Unable to create Polylines: " + ex.message); } }; EDRV2.EDRMAPV3GOOGLEV3.Polyline = function (polyType, googleMap, dvgCoordinatesString, normalPolyAttributes, highlightPolyAttributes, labelText) { // Construct…
tagged with: google-maps-api-3
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41574843
favorite count: 0
has comment: http://stackoverflow.com/comment/41577909
has comment: http://stackoverflow.com/comment/41574310
accepted answer: http://stackoverflow.com/a/26471574
has comment: http://stackoverflow.com/comment/41576983
has comment: http://stackoverflow.com/comment/41579645
has comment: http://stackoverflow.com/comment/41574967
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41577002
has comment: http://stackoverflow.com/comment/41574275
has comment: http://stackoverflow.com/comment/41575521
upvote count: 1
has comment: http://stackoverflow.com/comment/41578526
tagged with: google-chrome
downvote count: 1
type: Question
has title: Google Map API v3 doesn't show polygon after Chrome update 38.0.2125.104 m
tagged with: google-maps
has answer: http://stackoverflow.com/a/26471574
tagged with: javascript
has comment: http://stackoverflow.com/comment/41577616

http://stackoverflow.com/q/26358515
type: Question
has comment: http://stackoverflow.com/comment/41395063
tagged with: javascript
score: 0
has body: I have a working formatter that inserts basic html elements to text selected on textarea tag. But now I have to have one set of buttons that will a few textareas. And when i tried to do it with objects I get 'Uncaught TypeError: Cannot read property 'selectionStart' of undefined' error to each connected textarea object. function Formatter(velem, vb_h, vb_b, vb_i, vb_a, vb_img) // args: textarea elem to connect, header button, bold button, italic button, link button and image button { if(!velem || !vb_h || !vb_b || !vb_i || !vb_a || !vb_img) alert("NULL argument!"); this.elem = velem; this.b_h = vb_h; this.b_b = vb_b; this.b_i = vb_i; this.b_a = vb_a; this.b_img = vb_img; this.f_h = function() { if (this.elem.selectionStart != undefined) { var startPos = this.elem.selectionStart; var endPos = this.elem.selectionEnd; var selectedText = this.elem.value.substring(startPos, endPos); this.elem.value = this.elem.value.substring(0, startPos) + ' ' + selectedText + ' ' + this.elem.value.substring(endPos); } } this.f_b = function() { if (this.elem.selectionStart != undefined) { var startPos = this.elem.selectionStart; var endPos = this.elem.selectionEnd; var selectedText = this.elem.value.substring(startPos, endPos); this.elem.value = this.elem.value.substring(0, startPos) + '' + selectedText + '' + this.elem.value.substring(endPos); } } this.f_i = function() { if (this.elem.selectionStart != undefined) { var startPos = this.elem.selectionStart; var endPos = this.elem.selectionEnd; var selectedText = this.elem.value.substring(startPos, endPos); this.elem.value = this.elem.value.substring(0, startPos) + '' + selectedText + '' + this.elem.value.substring(endPos); } } this.f_a = function() { if (this.elem.selectionStart != undefined) { var startPos = this.elem.selectionStart; var endPos = this.elem.selectionEnd; var selectedText = this.elem.value.substring(startPos, endPos); var name = prompt("Podaj nazwę dla tego linku: ", "link"); this.elem.value = this.elem.value.substring(0,…
has comment: http://stackoverflow.com/comment/41375676
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41376431
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41375600
has title: 'Uncaught TypeError: Cannot read property 'selectionStart' of undefined' in object
tagged with: dom
linked to: http://stackoverflow.com/q/1338599

http://stackoverflow.com/comment/41408650
has text: @JukkaK.Korpela, although it is very connected to this topic, I don't think it is a duplicate as it doesn't answer the question `What are the disadvantages`, of course, other than the slower times. Correct me if I'm wrong though. The mindset I have for this question is if there is any consequence for not following the "standard" other than slower loading times.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26373877

http://stackoverflow.com/a/26451446
type: Answer
has comment: http://stackoverflow.com/comment/41544191
answers question: http://stackoverflow.com/q/26451401
score: 4
upvote count: 4
has body: You need setInterval function. Also, instead of style, you need .style selector (the class selector). If you are using jquery, you may use $(".style") instead of document.querySelector(...): window.onload = function() { setInterval(function() { document.querySelector('.style').style.backgroundColor = colors[rand(colors.length)]; //$('.style').css("backgroundColor", colors[rand(colors.length)]); }, 2000); } var colors = [ 'red', 'green', 'blue', 'yellow', 'magenta', 'pink' ]; var rand = function(max) { return Math.floor(Math.random() * max); }; .style { background-color: pink; top: 50px; left: 50px; height: 50px; width: 50px; } &lt;body&gt; &lt;div class="style"&gt;&lt;/div&gt; &lt;/body&gt;
has comment: http://stackoverflow.com/comment/41544241
downvote count: 0
has comment: http://stackoverflow.com/comment/41544158

http://stackoverflow.com/comment/41509379
type: Comment
has text: @bhimley85: Can you try handling error both on request and response. Your sample code above only shows you catching error on response. Once you've tried that and it still fails please update your sample code so that people who want to answer this question can see that you've tried it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26428965

http://stackoverflow.com/a/26360277
upvote count: 1
downvote count: 1
has body: Why do you have to use ng-repeat-start? It works with just one ng-repeat: {{item.lab}}{{item.val}}
has comment: http://stackoverflow.com/comment/41378591
answers question: http://stackoverflow.com/q/26359325
has comment: http://stackoverflow.com/comment/41378653
has comment: http://stackoverflow.com/comment/41381899
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41378842

http://stackoverflow.com/a/42065839
score: 0
answers question: http://stackoverflow.com/q/26363554
type: Answer
has body: because header footer and content are rnedering separate you need to include the fonts in each part. please follow the example and get the font result in your header add this at the header : "&lt;style&gt; "+ "@font-face {"+ " format('ttf'); "+ "font-family: 'Open Sans'; "+ "font-style: normal; "+ "font-weight: 400; "+ "src: url(" + url + "/fonts/Open_Sans/OpenSans-Regular.ttf) format('truetype');"+ "} " + "* { font-family: 'Open Sans'; } &lt;/style &gt; " the parameter url is define with the path to phantomjs.exe running, and you declare it with : url = 'file:///' + fs.absolute('./'); should work in header, hope it help anyone

http://stackoverflow.com/a/26407114
accepted answer of: http://stackoverflow.com/q/26407052
has body: Edit try this audio.find('source').prop('src', link); audio.parent().css('display','inline-block'); audio.find('audio').load(); //this line audio.find('audio')[0].play(); Demo http://jsfiddle.net/m25kfy57/1/
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41463241
answers question: http://stackoverflow.com/q/26407052
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26508528
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26508299
has body: createElement cannot be used to create SVG elements. You do it right when you create &lt;svg&gt; elements but wrong when you try to create &lt;rect&gt; or &lt;circle&gt; elements. You want var canvasbgrect = svgdoc.createElementNS(svgns, 'rect'); and var testCircle = svgdoc.createElementNS(svgns, 'circle');
type: Answer
has comment: http://stackoverflow.com/comment/41647580
score: 3
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/26508299

http://stackoverflow.com/a/26384637
type: Answer
score: 1
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26383864
has body: Now that you uploaded your app.yaml it's clear that the issue happens because your: - url: /js static_dir: js route should go before - url: /.* script: guestbook.application The /.* will redirect all requests that were previously not matched to your guestbook.application handler which knows nothing about the static files and the /js handler will never have a chance to serve any requests. Once you fix that make sure you change your include back to &lt;script src="/js/jquery.chained.js"&gt;&lt;/script&gt; since it's generally not nice to include from other websites without their permission.
answers question: http://stackoverflow.com/q/26383864
has comment: http://stackoverflow.com/comment/41424585
type: AcceptedAnswer

http://stackoverflow.com/a/26472967
has comment: http://stackoverflow.com/comment/41587893
has comment: http://stackoverflow.com/comment/41588598
has body: Of course generated JS files would not pass jshint. Remember that the purpose of tools like jshint is to point out mistakes you may have made in your code. In theory, enforcing the use of a strict subset of JavaScript syntax helps prevent you from making errors and makes your code easier for you and other humans to understand in the future. The output of tools like browserify and minification is not meant for human consumption. Minifiers intentionally take advantage of syntax that is technically-legal but human-unfriendly in order to achieve maximum byte savings. Consider: if (iAmThirsty == true) { drinkBeer(); } Through a combination of renaming and syntax transforms, a minifier might turn this into something like: t&amp;&amp;d() Because &amp;&amp; short-circuits, these do the same thing. The latter would certainly not pass jshint (or code review), but that doesn't matter. You wrote something that is easy for humans to digest, and that is what will be modified in the future. You will never work with processed output; you will always modify the original source and compile again. Jshint exists to make sure your source is high-quality. Running it on processed output doesn't make sense.
answers question: http://stackoverflow.com/q/26466083
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41586540
type: Answer
has comment: http://stackoverflow.com/comment/41586910
upvote count: 2

http://stackoverflow.com/comment/41443746
comment on: http://stackoverflow.com/q/26395842
score: 0
type: Comment
type: QuestionComment
has text: @CSStudent In your `validateForm` function, you were referencing an element with id `demo`, which doesn't exist in your html, therefore the output is not displaying (actually in your code, you need to add an element with id `total` to display the result)

http://stackoverflow.com/comment/41475714
type: Comment
comment on: http://stackoverflow.com/a/26410960
has text: Unfortunately using prototypes will not solve problem because I steel need context to use "this" keyword. Second way with callback will work, but such solution seems not like proper way. Anyway thanks for help
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41498434
score: 0
has text: @MatjažJurečič: ok, glad you figured it out.
type: Comment
comment on: http://stackoverflow.com/a/26426076
type: AnswerComment

http://stackoverflow.com/a/26414611
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41497561
has comment: http://stackoverflow.com/comment/41496985
accepted answer of: http://stackoverflow.com/q/26413082
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26413082
downvote count: 0
has body: The problem is that selectListAjax() doesn't return a value. All processing of the resulting response should be within the success() handler of the ajax call, since ajax calls are (by definition) asynchronous. Note that the method also likely returns before your success() handler completes. Start small. Try (html): &lt;div&gt; &lt;div class="target"&gt;&lt;/div&gt; &lt;/div&gt; (script): $.ajax({ url: "http://brand.emich.edu/forms-and-tools/sections/departmental/university-archives/monthly/ajax-selectbox.php", type: "POST", data: { field_id: fieldId }, success: function(response){ $('.target').html(response); }, error: function(){ alert("Error"); } });
type: Answer

http://stackoverflow.com/a/26415658
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26415377
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/26415377
has body: if i am right you can do it trough jquery $(document).ready(function (){ $('#searchbtn').click(function (e){ window.location = 'http://www.organization_website.org/home/search-results.aspx?Search=' + $('#searchbox').val(); //it would recirect to the url above with your search box content appended }); }); or trough your server side code inside the button click event in vb code response.redirect("http://www.organization_website.org/home/search-results.aspx?Search=" &amp; searchbox.text)

http://stackoverflow.com/comment/41576718
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26469000
has text: This was very insightful. Thanks!

http://stackoverflow.com/comment/41606654
score: 0
type: Comment
type: QuestionComment
has text: how can i request access token
comment on: http://stackoverflow.com/q/26485400

http://stackoverflow.com/comment/41543299
comment on: http://stackoverflow.com/q/26450956
has text: Most people may not like reading a huge chunk of code. Why don't you cut it short and show us only the code where the problem is?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/28097209
score: 1
answers question: http://stackoverflow.com/q/26497707
has body: Personally I found that listening for the hidden.bs.modal event, didn't yield anything, instead hide.bs.modal worked for me. Bonus - no need to hit the vimeo API You'll need to add an id to your iframe (in the example below, id="iframe" listen for the hide.bs.modal event capture the iframe src to a variable set the src to an empty string re-add the original src via the variable ... $('#orientation_video').on('hide.bs.modal', function () { // get the source of the iframe and save it var src = $(this).find('iframe').attr('src'); // remove the src from the iframe $("iframe#iframe").attr('src',''); // re-add the $("iframe#iframe").attr('src', src); });
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41521539
score: 0
has text: still not clear why you are using `noConflict`. Are you sure you need to use it? If so why?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26438545

http://stackoverflow.com/q/26432707
type: Question
has comment: http://stackoverflow.com/comment/41510223
accepted answer: http://stackoverflow.com/a/26432974
has title: Showing milliseconds in a timer html
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26432893
has comment: http://stackoverflow.com/comment/41510650
answer count: 3
has answer: http://stackoverflow.com/a/26432973
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41510146
has body: How do i show a countdown timer in html? Current code: var count=6000; var counter=setInterval(timer, 1);; //1000 will run it every 1 second function timer(){ count=count-1; if (count &lt;= 0){ clearInterval(counter); return; } document.getElementById("timer").innerHTML=count + " milliseconds"; // watch for spelling } Converting seconds to ms function msToTime(s) { var ms = s % 1000; s = (s - ms) / 1000; var secs = s % 60; s = (s - secs) / 60; var mins = s % 60; var hrs = (s - mins) / 60; return hrs + ':' + mins + ':' + secs + '.' + ms; } How would i call out the timer? still shows the timer as ms. i want it to show up as 99:00 seconds instead of 9900 milliseconds. Thanks
possible better answer: http://stackoverflow.com/a/26432893
favorite count: 0
has comment: http://stackoverflow.com/comment/41510302
upvote count: 2
linked to: http://stackoverflow.com/q/26432305
downvote count: 2
has comment: http://stackoverflow.com/comment/41510432
has comment: http://stackoverflow.com/comment/41510332
has answer: http://stackoverflow.com/a/26432974
duplicate of: http://stackoverflow.com/q/26432305
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41510522
has comment: http://stackoverflow.com/comment/41510722
has comment: http://stackoverflow.com/comment/41510222

vb.net
tags question: http://stackoverflow.com/q/26448812
tags question: http://stackoverflow.com/q/26489088
type: Tag
tags question: http://stackoverflow.com/q/26372479
tags question: http://stackoverflow.com/q/26478549
tag name: vb.net
tags question: http://stackoverflow.com/q/26463858
tags question: http://stackoverflow.com/q/26358295
tags question: http://stackoverflow.com/q/26477597
tags question: http://stackoverflow.com/q/26431948

http://stackoverflow.com/a/26403606
score: 1
has comment: http://stackoverflow.com/comment/41622854
has comment: http://stackoverflow.com/comment/41456667
has comment: http://stackoverflow.com/comment/41457004
has comment: http://stackoverflow.com/comment/41456608
has comment: http://stackoverflow.com/comment/41457679
has comment: http://stackoverflow.com/comment/41456780
has comment: http://stackoverflow.com/comment/41618014
has comment: http://stackoverflow.com/comment/41457134
type: AcceptedAnswer
downvote count: 0
has body: I think your problem is that you're setting your sync event listener after calling fetch it may not be called at all. In addition, if you're accesing the LoginModel from main, it may be clearer code to create your instances and add your dependencies on that view. Moreover, I don't think mixing two different views into one is a smart move. It seems you're saving some lines but the tradeoff is harder code to maintain/modify in the future. I would create different LoginView and RegisterView with their models. Different functions/responsabilities, different classes. In addition, a view like this that doesn't render anything for itself look more like a controller, or in Backbone world, a router. You're basically deciding which view to present based on a server query. Supposing this page is served at "/home" (or "#home" with hash urls), extract that logic to your router: var AppRouter = Backbone.Router.extend({ routes: { "home": "showHome", "login": "showLogin", "register": "showRegister" }, showHome: function(){ var loginModel = new LoginModel(); loginModel.fetch({ success: function(model){ if(model.get("loginp")){ //show you app view for logged in users! var appView = new AppView(); appView.render(); } else { //not logged in! Backbone.history.navigate("/login", {trigger:true}) } } ); }, showLogin: function(){ //display your login view }, showRegister: function(){ //display your register view } }); Of course your your Login and Entrance views el should be "body" if they're full-page views. This may look like much more code, but keeping the Single Responsibity Principle helps a lot.
type: Answer
has comment: http://stackoverflow.com/comment/41456724
accepted answer of: http://stackoverflow.com/q/26394843
upvote count: 1
answers question: http://stackoverflow.com/q/26394843
has comment: http://stackoverflow.com/comment/41554213

http://stackoverflow.com/comment/137252659
score: 0
type: Comment
has text: the jquery tag was present however i ignored it because the way it was included in the question seems to me to imply that they use jquery, not that the solution is required to use it. plain javascript is sufficient IMaHO.
comment on: http://stackoverflow.com/a/77783715
type: AnswerComment

http://stackoverflow.com/comment/41481388
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26417154
has text: What do you mean? Your script is just a bunch of text, that's not Javascript.
type: Comment

http://stackoverflow.com/q/26400065
tagged with: dynamics-crm-2013
has comment: http://stackoverflow.com/comment/41450441
type: Question
has title: Can't find a solution to eliminate second record type within Lookup
score: -1
has body: Within my CRM instance is the core entity 'Case'. Within this is the default customer lookup (customerid) which points to both the core 'Account' &amp; 'Contact' entities. There is also another lookup pointing to 'Contact' which is filtered based on the Account value in customerid (it is essential that customerid is used to select just account values). There is also another lookup pointing to a custom entity, which uses a auto number function. I am trying to also filter this field (new_projectref) to show just records associated with the account value selected. However a Error is being thrown stating "'Contact' entity doesn't contain attribute with Name = 'customerid'.". /* Filter Lookup */ function preFilterLookup() { try { Xrm.Page.getControl("new_projectref").addPreSearch(function () { addLookupFilter(); }); } catch (error) { //window.console.log("Prefilter lookup error " + error.message); } } function preFilterLookupGeneric(sourceField, destinationField) { try { Xrm.Page.getControl(destinationField).addPreSearch(function () { addLookupFilterGeneric(sourceField, destinationField); }); } catch (error) { // window.console.log("Prefilter lookup error " + error.message); } } function addLookupFilterGeneric(sourceField, destinationField) { try { var companyId = Xrm.Page.getAttribute(sourceField).getValue()[0].id; var entityType = Xrm.Page.getAttribute("customerid").getValue()[0].entityType; alert(entityType); if (entityType == "account") { console.log("Company = " + companyId); if (companyId != null) { fetchXml = "&lt;filter type='and'&gt;&lt;condition attribute='customerid' operator='eq' value='" + companyId + "' /&gt;&lt;/filter&gt;"; Xrm.Page.getControl(destinationField).addCustomFilter(fetchXml); } } else if (entityType == "contact") { return; } } catch (error) { window.console.log("Error lookup filter " + error.message); } } function addLookupFilter() { try { var companyId = Xrm.Page.getAttribute("parentaccountid").getValue()[0].id; // window.console.log("Company…
downvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41450422
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26401577
has comment: http://stackoverflow.com/comment/41450585
upvote count: 0
has comment: http://stackoverflow.com/comment/41451356

http://stackoverflow.com/q/26429673
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: ruby-on-rails
possible better answer: http://stackoverflow.com/a/26429761
has comment: http://stackoverflow.com/comment/41504485
has answer: http://stackoverflow.com/a/26429761
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41505106
has title: How to match id in javascript for dynamically added field on html?
type: Question
has answer: http://stackoverflow.com/a/26430886
has comment: http://stackoverflow.com/comment/41504938
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26429796
has answer: http://stackoverflow.com/a/26430066
score: 0
has comment: http://stackoverflow.com/comment/41506279
has body: In our rails app, dynamic fields can be added to the form. Here is a html source code for the dynamically added field order_order_items_attributes_1413563163040_unit_price: * Unit Price($) As you can see, there is 13 digits string in field's id and it is randomly generated when the field is added. How we can match (locate) this type of random id in javascript? rails app uses jquery (ex, $('#order_order_items_attributes_xxxxxxxxxxxxx_unit_price').change(function (){})). We are new to this css type of id match. More detail would be appreciated.
accepted answer: http://stackoverflow.com/a/26430886
has answer: http://stackoverflow.com/a/26429806

http://stackoverflow.com/a/26432275
answers question: http://stackoverflow.com/q/26430843
has comment: http://stackoverflow.com/comment/41509323
score: 0
type: AcceptedAnswer
type: Answer
has body: In that case you should send your id in URL. So even GET method is enough, because you controller receive $id param from URL. So all what you need to change are post arguments: $.ajax({ type: 'POST', url: '/Posts/edit/' + id })
accepted answer of: http://stackoverflow.com/q/26430843

http://stackoverflow.com/a/26418279
downvote count: 0
has body: To find all existing id, try: var ids = []; $(".demo *").each(function(){ this.id &amp;&amp; ids.push(this.id); }); console.log(ids); Do the same thing for class or anything else. However, to get your expected output, you must first acquire the defined CSS style for each element. Which one should be included? p by default gets margins and paddings. Do you include those too? You will also need to dig into all the CSS declarations just to find the style that are applied, which is almost impossible to do. For example, &lt;div class="yellow"&gt;&lt;/div&gt; &lt;style&gt; div.yellow:not(.blue){ background: yellow; } &lt;/style&gt; How do you get the background of the &lt;div&gt; tag? .style.background? Nah, it returns "". Well now you will have to reach into the CSS declaration with document.styleSheets to see which one applied. How do you even check if the rule div.yellow:not(.blue) matches your element? Good luck doing that. (There might be libraries that does this kind of thing, or maybe you can even utilize jQuery's internal selector engine with .is, though it will not be the same as in CSS) Another thing you can do is try getComputedStyle. It gives you every single computed styles that aren't even in your declaration. So what you are trying to do is not possible to do. (I don't even know what you are doing something like this.)
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26418200
score: 2

http://stackoverflow.com/comment/41370207
has text: Sorry for the last comment..
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26355618

http://stackoverflow.com/a/26427886
has body: No they're not identical. You need to use bracket notation when you're doing a property lookup on the object and the property you're looking up, or in this example 'key', is a placeholder for something else. For example, 'key' in your for in loop is a placeholder for the actual keys in your object. You use dot notation when you're accessing properties on the object and the thing to the right of the dot is the actual name of the property, or in your example, sample.start
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41501284
accepted answer of: http://stackoverflow.com/q/26427844
answers question: http://stackoverflow.com/q/26427844
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26361913
downvote count: 1
score: 3
has title: Add Italian holidays into fullcalendar
tagged with: fullcalendar
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41382105
has body: I use FullCalendar in my application and its working. Now I need to change the color of Italian holidays into red. I did it for weekends but: I don't know how to add holidays in calendar. How can i change their color. This is my code : &lt;script&gt; var calendar = $('#calendar').fullCalendar({ header: { left: 'prev', center: 'title', right: 'next', }, defaultView: 'month', lang: 'it', height: 600, dayClick: function(date, jsEvent, view) { // Changing BG color $(this).css('background-color', 'green'); //Create modal here $('#myModal').modal(); // Show Date in SPAN $('#spnDate').html(date.format('DD/MM/YYYY')); // Put Date value in a variable $('#date').attr('value', date.format('DD/MM/YYYY')); }, editable: true, }); &lt;/script&gt;
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41381802
favorite count: 0
has answer: http://stackoverflow.com/a/26364616
type: UnansweredQuestion

http://stackoverflow.com/comment/41503692
type: AnswerComment
score: 0
type: Comment
has text: This worked! Thank you so much! I've been pulling my hair out for hours trying to get this to work. I appreciate it!
comment on: http://stackoverflow.com/a/26429192

http://stackoverflow.com/comment/41653322
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26511491
type: Comment
has text: That is the source material for what I am trying to do, but the issue is that I am trying to fetch an HREF out of a navigation created by the CMS and then add the above onclick (including the URL) to specific links.

http://stackoverflow.com/q/26484089
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41607202
has answer: http://stackoverflow.com/a/26488038
has comment: http://stackoverflow.com/comment/41609600
has body: I have a problem with my Google Maps v3 api. The marker is on the right position and my height is 700px so this makes my marker to be placed automatically in both hor and vert center. The horizontal center is right, but I want my map to still be 700px height, but the position of my marker to be shown more towards the top than center. Still the position of the marker should be at the right position, but the whole map should be dragged upwards more. Any clue how to do this? Compare it to css and background-image position styling. My code right now: var rkc = new google.maps.LatLng(56.198785, 15.289740); var markerrkc; var map; function initialize() { var mapOptions = { zoom: 17, center: rkc, mapTypeControl: false, navigationControl: false, streetViewControl: false, scrollwheel: false, navigationControl: false, mapTypeControl: false, scaleControl: false, draggable: false, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'usroadatlas'] } }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var markerrkc = new google.maps.Marker({ position: rkc, icon: 'URL TO MY ICON', map: map, }); var styledMapOptions = { }; var usRoadMapType = new google.maps.StyledMapType( roadAtlasStyles, styledMapOptions); map.mapTypes.set('usroadatlas', usRoadMapType); map.setMapTypeId('usroadatlas'); } google.maps.event.addDomListener(window, 'load', initialize);
type: Question
has comment: http://stackoverflow.com/comment/41607319
has comment: http://stackoverflow.com/comment/41609892
tagged with: google-maps-api-3
has title: Google maps API position
score: 0
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/26488038
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41425123
has text: Uhh, I have just noticed that you were asking for the whole row. Ignore my stoopid answer for now. I'll see what I can find out and will give you an update.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26383407
score: 1

http://stackoverflow.com/comment/41516137
comment on: http://stackoverflow.com/q/26435697
has text: I think you're just not accounting for the distance which is to be moved. If 2 different things travel 2 different distances in the same amount of time, one will move faster and the other slower.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41468295
type: Comment
type: QuestionComment
score: 0
has text: @Pointy I know... that's why I'm confused. And I'm sure that's the only change I made. I tried several times, literally copying and pasting. VS's reformat text shows that the scopes are right, so it's not a missing or extra brace.
comment on: http://stackoverflow.com/q/26409592

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/26432341
tags question: http://stackoverflow.com/q/26490286
tags question: http://stackoverflow.com/q/26387209
tags question: http://stackoverflow.com/q/26433413
type: Tag

http://stackoverflow.com/comment/41454692
comment on: http://stackoverflow.com/a/26402364
has text: Well the OP sounds like he doesn't require adding classes and etc, but simply adding a `>` after the link. CSS should do it :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41596480
has text: That is working on the fiddle, but not on live... that's surprising.
comment on: http://stackoverflow.com/a/26479851
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26443766
score: 0
tagged with: drag-and-drop
has answer: http://stackoverflow.com/a/26443999
has title: Why several blocks are not working after cloning?
type: Question
type: AnsweredQuestion
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26443999
has body: I apologize if the question is formulated sloppy. I'm just somewhere in the beginning of understanding jquery. I want to implement a form builder based on drag and drop. I added button to clone dropped element. But after cloning "remove" and "clone" buttons are not working. jsfiddle.net/284mx1vn/ Thanks for your help!

http://stackoverflow.com/a/26490215
has comment: http://stackoverflow.com/comment/41615655
has comment: http://stackoverflow.com/comment/41615145
type: Answer
has comment: http://stackoverflow.com/comment/41614921
upvote count: 1
downvote count: 1
has body: You might also be able to catch it with: $rootScope.$on('$routeChangeStart', function(params) { //catch event }); You can read more about it at angular docs and stackoverflow
has comment: http://stackoverflow.com/comment/41615770
has comment: http://stackoverflow.com/comment/48612249
accepted answer of: http://stackoverflow.com/q/26489984
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26489984
score: 0

http://stackoverflow.com/q/26357307
tagged with: jquery
type: UnansweredQuestion
tagged with: ajax
type: Question
tagged with: php
answer count: 1
has title: Chosen plugin change doesnt work on page reload
score: 0
has body: My problem is : i'm using chosen plugin. 2 select boxes. When selecting the first selectbox option, in second selectbox values are filtered. it works fine. But when i am reloading page with ajax, the first select box value selected right but looks like it is not active, it cannot filter second select box value. I tried to simulate change event, tried to trigger the select box, but i had no luck. I will show some source code: Ajax call: function loadContent(url){ var slidersGetUrl = "&amp;slider1="+slider1Val1+"&amp;slider2="+slider1Val2+"&amp;slider3="+slider1Val3+"&amp;slider4="+slider1Val4+"&amp;slider5="+slider1Val5+"&amp;slider6="+slider1Val6; var planUrl = "&amp;plan="+selectedplan; var paymentPeriodUrl = "&amp;billing="+selectedpaymentperiod; var cpUrl = "&amp;cp="+selectedcp; var osUrl = "&amp;os="+selectedos; $.ajax({ type: "get", url: "aa/aa/aa/aa.php" + url + slidersGetUrl + planUrl + paymentPeriodUrl + cpUrl + osUrl, //url: url, beforeSend: function(){ $('#plans-block').html('loading...'); }, success: function(data){ $('#plans-block').html(""); $('#plans-block').html(data); //$('#ajax-wrap').slideToggle(); //console.log(data); }, error: function(){ $('#plans-block').html("Failed. Please reload the page!"); } }); } Then i have big HTML block in ajax called file where select boxes are made This is my select box 1 : &lt;select id="cp" name="cp"&gt; &lt;option value="-1"&gt;&lt;?php echo $_LANG['none'] ?&gt;&lt;/option&gt; &lt;?php foreach ($controlpanels as $cp): $os_price = (float) $cp['price']; if ($os_price &lt; 0) continue; ?&gt; &lt;option data-price="&lt;?php echo $os_price; ?&gt;" data-bc="&lt;?php echo $cp['bc']; ?&gt;" value="&lt;?php echo $cp['id']; ?&gt;" &lt;?php echo ($cp['id'] == $_GET['cp'] ? 'selected' : '') ?&gt;&gt;&lt;?php echo $cp['name']; ?&gt;&lt;/option&gt; &lt;?php endforeach; ?&gt; &lt;/select&gt; Then i have javascript $(document).ready(function () { ... $('#cp').change(function () { $($(this)).children().each(function (i, j) { if (…
tagged with: jquery-chosen
has answer: http://stackoverflow.com/a/26357463
tagged with: javascript

http://stackoverflow.com/a/26426078
has body: There are lots of errors in this code. For example, in this section alone: (commented where some issues are) function drawFrame() { if (dx != 0 || dy != 0) { context.beginPath(); context.fillStyle = "rgb(254,244,207)"; context.rect(x, y, 15, 15); context.fill // Missing parentheses and semicolon x += dx; y += dy; if (checkForCollision()) { (dx/y = 0) // Equivalent to { dx / (y = 0) } x -= dx; // which both serves no purpose and divides by zero y -= dy; dx = 0; dy = 0; } //Now we can finally draw the sprite! var imgSprite = document.getElementById("sprite"); context.drawImage(imgSprite, x, y); if (y &gt; (canvas.height - 17)) { alert("Congratulations! You made it!"); return; } } timer = setTimeout(drawFrame, 10); // timer is not defined anywhere // also you are calling the function within itself // with no end condition, so it's an infinite loop } And on line 48: setTimeout("drawFrame()", 10); You should be passing the function as just the function identifier, not as a string. As such: setTimeout(drawFrame, 10); These are just a few. There are also some logical errors, variables that are defined but never used, and more. In its current state this will not compile. Also, if only just for clarity's sake, try to define a script type instead of just leaving the tag empty, like: &lt;script type="text/javascript"&gt; // Some JS &lt;/script&gt; It can be hard when you've been staring at code for hours, but it helps to give each section a slow read-through and think about exactly what the code is doing. You can avoid lots of syntactical and logical errors this way. I also recommend using a text editor or online interface (JS Bin, JSfiddle, etc.) that has JShint/lint or some kind of code-checking functionality. You can even use http://www.javascriptlint.com/online_lint.php and paste your whole code in there.
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26423128
has comment: http://stackoverflow.com/comment/41498026
accepted answer of: http://stackoverflow.com/q/26423128
score: 0

http://stackoverflow.com/comment/41529304
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26443167
has text: The get_hash() function will be called from a different php file. I can't pass the arguments $connection and $query to it because it will be called from a different php file.
score: 0

http://stackoverflow.com/comment/41574011
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26445573
type: AnswerComment
has text: I would like that when a parent is checked, then all children have to be marked as checked.> @emanuele I thought that was what you wanted to code to do

http://stackoverflow.com/a/26389811
has body: I would solve this by binding the show/hide directive to the data-property in the controller. It will be the same as false if the data is undefined.
type: Answer
answers question: http://stackoverflow.com/q/26389626
has comment: http://stackoverflow.com/comment/41433106
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41432990

http://stackoverflow.com/comment/41380730
type: QuestionComment
comment on: http://stackoverflow.com/q/26359935
score: 0
has text: @MrCoder still not working...the text still appears
type: Comment

http://stackoverflow.com/comment/41596462
has text: So the display style i'll just put javascript:meh()? so when will i turn the isfirsttime to true? So if cookie which would you recommend?
type: Comment
comment on: http://stackoverflow.com/a/26480176
type: AnswerComment
score: 0

http://stackoverflow.com/q/26490004
type: Question
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26508024
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41642676
has answer: http://stackoverflow.com/a/26508024
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41664491
has title: AngularJS - Converting EPOC dates
has body: I have a JSON file with a list of dates in EPOC format: "Date": "/Date(1405967947000)/", "Date": "/Date(1405967947000)/", "Date": "/Date(1405967947000)/", "Date": "/Date(1405967947000)/", "Date": "/Date(1405967947000)/", "Date": "/Date(1405967947000)/", "Date": "/Date(1405967947000)/", "Date": "/Date(1405967947000)/", I know in Angular i can easily filter these into any format via: convertDate = $filter('date')(myScopeToDate, 'dd MMM yyyy'); However, ideally i want to convert in this format: Tue Oct 21 2014 00:00:00 GMT+0000 (GMT Daylight Time) So i tried: var convertDate = new Date(myScopeToDate); However the output is: "Invalid Date"
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26490637
has comment: http://stackoverflow.com/comment/41615133
has answer: http://stackoverflow.com/a/26490637
tagged with: angularjs-scope

http://stackoverflow.com/a/26421430
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26421288
has body: Return Journey hope it could help you out

http://stackoverflow.com/comment/41500655
type: QuestionComment
score: 1
type: Comment
has text: Why does your code modify the default options? You need to create a new object for each instance!
comment on: http://stackoverflow.com/q/26427639

http://stackoverflow.com/q/26437235
type: Question
has answer: http://stackoverflow.com/a/26437250
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/26437677
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26437244
has title: Add all textbox value inside the tabel using javascript
has body: i want to add all text box value inside the tabel using jquery. &lt;script&gt; str =0; $(document).ready(function(){ $('#btn_res').click(function(){ $('#calculate').find("input[type=text]").each(function(){ str+=$(this).text(); }) $('#result').text(str); }); }); &lt;/script&gt;
downvote count: 1

http://stackoverflow.com/a/26465231
type: Answer
has body: self.errors contains the errors for all fields. You should check only current template field validity: self.NextIsEnabled = ko.computed(function() { var selectedTemplate = self.SelectedTemplate(); return selectedTemplate != "Age" &amp;&amp; self.viewModel[selectedTemplate].isValid(); } Of course, if you have more than one field in a template, you should check for the validity of all of them.
answers question: http://stackoverflow.com/q/26464350
has comment: http://stackoverflow.com/comment/41596776
has comment: http://stackoverflow.com/comment/41861120
score: 0
has comment: http://stackoverflow.com/comment/41597936
has comment: http://stackoverflow.com/comment/41633137

http://stackoverflow.com/comment/41469146
has text: There's more information on wikipedia: http://en.wikipedia.org/wiki/Square_degree
comment on: http://stackoverflow.com/q/26406151
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41514310
type: Comment
type: QuestionComment
has text: then do following: 1. read rules of this site 2. delete this question 3. try to do it 4. ask questions if any
comment on: http://stackoverflow.com/q/26434730
score: 0

http://stackoverflow.com/q/26390938
score: 14
has answer: http://stackoverflow.com/a/26391560
type: AnsweredQuestion
upvote count: 14
has answer: http://stackoverflow.com/a/26391920
has answer: http://stackoverflow.com/a/74817694
possible better answer: http://stackoverflow.com/a/26391560
type: Question
has comment: http://stackoverflow.com/comment/41435806
has comment: http://stackoverflow.com/comment/54634095
accepted answer: http://stackoverflow.com/a/26391774
tagged with: javascript
answer count: 6
has body: Im using Node.js. (...and underscore.js) Consider this data structure var numbers = [ [10, 20] [30, 40] [40, 50] [45, 70] ... //Possibly more arrays (always contains two numbers) ] numbers contain arrays that always contain number pairs. Think of these number pairs as "start" and "end". I want a function that takes numbers as argument, and loop trough its content, and if the "start" number of a pair overlap the "end" number of previous pair, these arrays is merged into one. For example this: var numbers = [ [10, 20] [19, 40] [40, 60] [70, 80] ] Becomes this: var numbers = [ [10, 60] // First, second and third array is merged because of overlapping . [70, 80] ] Actually, I already have written a function for this that works fine, but feels a bit clunky. I'm curious if some javascript wizard can dazzle me with a super elegant solution =).
has answer: http://stackoverflow.com/a/66843577
downvote count: 0
has comment: http://stackoverflow.com/comment/41437224
has title: Merge arrays with overlapping values
favorite count: 0
has comment: http://stackoverflow.com/comment/41450181
has answer: http://stackoverflow.com/a/26391774
has answer: http://stackoverflow.com/a/69987147

http://stackoverflow.com/q/26420599
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41487241
has answer: http://stackoverflow.com/a/26420798
tagged with: http://stackoverflow.com/tag/html
score: -4
has comment: http://stackoverflow.com/comment/41487265
linked to: http://stackoverflow.com/q/426258
type: Question
has comment: http://stackoverflow.com/comment/41487310
tagged with: javascript
has body: i used JQuery while i am trying to check all function then there because of this js not showing all checked field but while i removed that js then slider affected. So please try to sort out my problem i used no conflict function also but its not work. Admin Module Form Name select Edit Delete View Authentication
downvote count: 4
answer count: 2
upvote count: 0
has title: "check all" not checking checkboxes
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26420658

http://stackoverflow.com/q/26456104
downvote count: 4
linked to: http://stackoverflow.com/q/10487908
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26456446
tagged with: google-chrome
type: Question
answer count: 2
tagged with: firefox
has title: How can I get rid of Dots from in
tagged with: javascript
has answer: http://stackoverflow.com/a/26456159
accepted answer: http://stackoverflow.com/a/26456159
has comment: http://stackoverflow.com/comment/41552767
has answer: http://stackoverflow.com/a/26456446
duplicate of: http://stackoverflow.com/q/10487908
tagged with: http://stackoverflow.com/tag/html
has body: This is what my website looks like in Firefox (notice the dots). This is how it looks in Chrome (No Dots). Is there a way that I can get the dots to go away? Here is my code: function changeText(button) { button.innerHTML = 'Get Started'; } .bcafrees { text-align: center; font-family:'Roboto', sans-serif; color: #FFFFFF; text-align: center; font-size: 60px; margin-bottom: 1%; text-shadow: 1px 1px #000000; } nav.header { margin: 0; background-color: #66C2FF; } nav ul { width: 100%; margin: 0; padding: 0; height: 4% } nav ul li { width: 4%; float: left; margin: 0% 1% 2% 2%; vertical-align: middle; text-align: center; align-items: center; height: 10px; margin-top: 0%; padding-top: 0%; } nav ul li a { display: block; width: 100%; text-align: center; color: #FFFFFF; text-decoration: none; font-family: 'Lato', sans-serif; font-size: 22px; vertical-align: middle; } nav ul li a:hover { color: #859999; } body { background-color: #3A75B0; width: 100%; max-width: 1000000px; margin: 0 auto !important; } body p { color: #FFFFFF; text-align: center; font-family: 'Raleway', sans-serif; font-size:50px; padding-top: 10px; padding-bottom: 5px; margin: 0; border: 0; } .getStarted { display: table; margin: 0 auto !important; height: 170px; width: 300px; background: transparent; text-decoration: none; border-style: solid; border-color: #FFFFFF; font-family: Helvetica; text-align: center; color: #FFFFFF; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; font-size: 60px; padding: 20px 10px 50px 10px; margin-bottom: 50px; font-family: 'Raleway', sans-serif; } .getStarted a { text-decoration: none; font-family: 'Raleway', sans-serif; text-align: center; color: #FFFFFF; font-size: 60px; margin-bottom: 50px; } a:link { text-decoration: none; } a:visited { text-decoration: none; } footer { clear: both color: #FFFFFF; font-family: TW Cen MT; padding-top: 5.06%; position: relative; } footer ul { width: 100%; list-style: none; margin-left: auto; margin-right: auto; paddi…
favorite count: 0
upvote count: 0
score: -4
tagged with: css

http://stackoverflow.com/a/26559457
has body: I am using Chrome Versión 38.0.2125.104 m and it works fine for me (the online demo) and I must admit the panel is really nice I really like it. All divs and funtions works for me, all links buttons etc so I believe you will have to update your Chrome version or try the follow: EDIT I downloaded the package and you are right, the downloaded version is not working. To make it easier use WebZip or another tool to download a complete copy of the online demo and it will save a good copy of the panel and it will work for you, there must be something wrong in the downloaded file something is missing seems like Good Look with the project
answers question: http://stackoverflow.com/q/26501785
type: Answer
has comment: http://stackoverflow.com/comment/41739604
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26501785
has comment: http://stackoverflow.com/comment/41739635
has comment: http://stackoverflow.com/comment/41739660
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41479486
has text: Please post the rest of your code. CSS, HTML, any more JS?
comment on: http://stackoverflow.com/q/26416054
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26428704
has title: Node.js application quits if other server is unreachable. How do I prevent my application from stopping?
has comment: http://stackoverflow.com/comment/41505574
has comment: http://stackoverflow.com/comment/41503946
has body: I am writing an application that regularly checks in with a remote server to check in for new versions of software. It's my first attempt in node.js so please bear with me. When the server is up and running, the program runs totally fine. However, when the server is not running, the program quits with the error: events.js:72 throw er; // Unhandled 'error' event ^ Error: connect ECONNREFUSED at errnoException (net.js:904:11) at Object.afterConnect [as oncomplete] (net.js:895:19) From what I've read, I believe I have set up my code to handle errors correctly, by including a response.on('error', ...) part of my callback. However, as you can see from the error, it's not giving me the error console.logs that I tried to set up. Here's the part of my code that is not working, I can include other parts if need be, it's just a pretty big application at this point: var index = require ("./index"); var http = require ('http'); var fs = require ("fs"); var apps = [{ "name":"IDSocket", "localVersion": "", "hostVersion": "", "downloadURL": "" }, { "name": "X-Wing vs. Tie Fighter", "localVersion": "4.2.1", "hostVersion": "", "downloadURL": "" }] //checks host server for host version, stores as json object function checkHost(hostinfo){ callback1 = function(response) { var str = ''; var hostObject; response.on('data', function (chunk) { str += chunk; }); response.on('error', function(err) { console.log('problem with request: ' + err.message); hostObject = "why, error? " + err.message }); response.on('end', function () { hostObject = str; hostObject = JSON.parse(hostObject); apps[0]["hostVersion"] = hostObject[0]["version"]; apps[0]["downloadURL"] = hostObject[0]["downloadURL"]; apps[1]["hostVersion"] = hostObject[1]["version"] apps[1]["downloadURL"] = hostObject[1]["downloadURL"] console.log(apps[0]["hostVersion"] + ": recieved IDSocket host version"); index.everyFourHours(); }); } http.request(hostinfo, callback1).end(); }; Thanks in advance for any helping me understand what's goi…
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41502782
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26428965
tagged with: node.js
has comment: http://stackoverflow.com/comment/41503357
upvote count: 1
type: Question

http://stackoverflow.com/q/26359126
has title: Javascript - Jumping between browser Tabs
type: Question
has body: My program consists of two browser tabs. I open the second tab from the first tab via window.open(..). Can I induce changes in the first tab from the second tab? Like sending new Ajax requests etc.
type: AnsweredQuestion
tagged with: browser
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26359645
accepted answer: http://stackoverflow.com/a/26359645
score: 0

http://stackoverflow.com/q/26379648
downvote count: 0
tagged with: javascript
tagged with: radcombobox
tagged with: telerik
has comment: http://stackoverflow.com/comment/41415640
favorite count: 0
type: UnansweredQuestion
answer count: 0
score: 1
has title: accesing all radcombobox in javascript and changing css style
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41416263
has body: i am writing a Javascript to access all my radcombobox and changing to the default skin .I tried the following script but its not working . for (var i in errorControls) { var element = errorControls[i]; if (Telerik.Web.UI.RadComboBox &amp;&amp; element instanceof Telerik.Web.UI.RadComboBox) { element.className = "RadComboBox_default"; } else { element.className = "ErrorControl"; } }

http://stackoverflow.com/comment/41460625
has text: updated. regarding separation of files . i can do that but as i am new to backbonejs it will be good/time saving for me to focus on the current code. But thanks for the advice.
type: Comment
comment on: http://stackoverflow.com/a/26405519
score: 0
type: AnswerComment

http://stackoverflow.com/a/56975096
accepted answer of: http://stackoverflow.com/q/26379191
score: 0
type: AcceptedAnswer
type: Answer
has body: From official documentation: If a request uses multiple filters, join them together with a semicolon (;), and the returned result table will satisfy both filters. For example, a filters parameter value of video==dMH0bHeiRNg;country==IT restricts the result set to include data for the given video in Italy. Hence the js request should be something like: var request = gapi.client.youtubeAnalytics.reports.query({ 'start-date': datePublished, 'end-date': endDate, ids: 'channel==' + channelId, dimensions: 'video', metrics: metric, filters: 'video=='+videoId+';country==GB', });
answers question: http://stackoverflow.com/q/26379191

http://stackoverflow.com/q/26387743
tagged with: php
score: 0
tagged with: java
answer count: 1
has comment: http://stackoverflow.com/comment/41429338
has comment: http://stackoverflow.com/comment/41430009
tagged with: javascript
type: UnansweredQuestion
tagged with: servlets
has answer: http://stackoverflow.com/a/26388066
has body: I am trying to upload images via a drag and drop interface, I got the JavaScript code here but the server side code is implemented in PHP as shown below (I modified it to insert the image to database): &lt;?php //Connect to database mysql_connect("localhost", "root", "something-strange") or die(mysql_error()); mysql_select_db("business_clax") or die(mysql_error()); // The posted data, for reference $file = $_POST['value']; $name = $_POST['name']; if(!isset($file)) { echo "Please select an image."; } //This is the line of code I really want in Java $image = addslashes(file_get_contents($file)); //SQL Injection defence! $image_name = addslashes($name); $sql = "UPDATE `adverts` SET `photos` = '{$image}' WHERE `id` = '1'"; if (!mysql_query($sql)) { // Error handling echo "Something went wrong! :("; } ?&gt; The code above is working very well but I need to implement this in Java. I tried to implement the code above in a Java Servlet but I have no idea how to do the file_get_contents($file) and the addslashes(file_get_contents($file)); functions in Java, I think there must be an equivalent method. Please I need help. Thanks.
has title: How can I implement this PHP code in Java Servlet
type: Question

http://stackoverflow.com/q/26373760
has answer: http://stackoverflow.com/a/26374645
tagged with: javascript
tagged with: spam-prevention
linked to: http://stackoverflow.com/q/15791962
answer count: 2
downvote count: 0
tagged with: server-side
favorite count: 0
type: UnansweredQuestion
score: 1
has body: Question. To protect a mobile website from being victim to SPAM/Bots and without the need of implementing unfriendly UX CAPTCHA. Hypothetically if we were to disable (from the server side) onClick events but allow onTouch events. Are bots able to replicate the onTouch function? Ensuring that only human hands are able to use the site?
upvote count: 1
type: Question
has title: Can bots simulate onTouch events?
tagged with: mobile
has answer: http://stackoverflow.com/a/26374011

http://stackoverflow.com/q/26458006
has body: By default, menu appears on every page. I want to make the menu not to appear on first page. I did the following: $('#fullpage').fullpage({ verticalCentered: true, scrollingSpeed: 600, css3: true, onLeave: function(index, nextIndex, direction){ if (index == 2 &amp;&amp; direction == 'up'){ $('#menu').css('visibility','hidden'); } }, afterLoad: function(anchorLink, index){ if (index == 2){ $('#menu').css('visibility','visible'); } } Now the menu appears when I scroll to the second page and hides when I scroll to the first page. But in this way the menu is not the part of second page, it just changes visibility depending on position. I want the following: when it scrolls to the first page, the menu should stay on the second. And conversely, when it scrolls from the first page to the second, the menu should be on the second page. P.S. Now in html, menu is placed outside the full page wrapper. P.P.S. The website will have more than two pages and I want to attach menu to the top of the window. P.P.P.S. I've done what I wanted. But it works bad - http://jsfiddle.net/a3dw6p4w/
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/35235510
has title: fullpage.js how to attach fixed menu to second section
tagged with: http://stackoverflow.com/tag/html
tagged with: fullpage.js
tagged with: css
has answer: http://stackoverflow.com/a/26466981
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/41535093
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26445725
has text: possible duplicate of [Sharing data between AngularJS controllers but having the shared data come from an Ajax call](http://stackoverflow.com/questions/15097961/sharing-data-between-angularjs-controllers-but-having-the-shared-data-come-from)
score: 0

http://stackoverflow.com/comment/41638764
has text: Right, you didn't put the parenthesis in the question, which makes `+function($){}` non sensical. The plus `+`, or any other unary operators will do `+function(){}(), ~function(){}(), !function(){}(), ...`
score: 0
comment on: http://stackoverflow.com/q/26502824
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26392440
score: 2
upvote count: 3
answers question: http://stackoverflow.com/q/26392411
downvote count: 1
has body: The exec method must be used in a while loop if you want to treat several results. See the MDN Documentation.
has comment: http://stackoverflow.com/comment/41437739
type: Answer

http://stackoverflow.com/comment/41481874
has text: Well my html code already has form tag, I just replace my javascript and php as yours but it still displays only one row
comment on: http://stackoverflow.com/a/26417349
type: AnswerComment
type: Comment
score: 0

rally
tags question: http://stackoverflow.com/q/26417029
type: Tag
tags question: http://stackoverflow.com/q/26486661
tags question: http://stackoverflow.com/q/26486291
tag name: rally

http://stackoverflow.com/comment/41570980
has text: thank you! The upvote is not required, it's just a if you think that the user deserves one.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26451168
type: AnswerComment

http://stackoverflow.com/q/26367108
type: UnansweredQuestion
has title: Starting Sails with debug-brk doesn't run Grunt?
tagged with: node.js
score: 1
upvote count: 1
type: Question
tagged with: debugging
tagged with: sails.js
tagged with: javascript
tagged with: gruntjs
has body: When I launch sails without debug or with only --debug, and include --verbose as an application parameter, it shows me the details of it's run of grunt (see first log example below). However, when I run the app with debug-brk= it does not run grunt. (See second log example below). I posted this in a different forum and someone suggested that "Most probably grunt is spawned as a child process using same debug port as a parent application... And, as the port is already bound, it's suspended". The evidence seems to support this, but I can't locate where the grunt modules are getting passed the port in the sails module. Has anyone encountered this? I would think it'd have been a common thing and that I'm missing something obvious. Regards I'm using... Sails 0.10.5 Node 0.10.29 grunt 0.4.5 grunt-cli 0.1.13 Here is the example of a good run.. without debug or with only --debug (not --debug-brk) C:\Users\myuser\git\datavis&gt;node app.js --verbose verbose: Setting Node environment... verbose: Please run `npm install coffee-script` to use coffescript (skipping for now) verbose: moduleloader hook loaded successfully. verbose: Loading app config... verbose: userconfig hook loaded successfully. verbose: Exposing global variables... (you can disable this by modifying the properties in `sails.config.globa verbose: logger hook loaded successfully. verbose: request hook loaded successfully. verbose: Loading the app's models and adapters... verbose: Loading app models... verbose: Loading app adapters... verbose: Loading blueprint middleware... verbose: blueprints hook loaded successfully. verbose: Loading runtime custom response definitions... verbose: responses hook loaded successfully. verbose: controllers hook loaded successfully. verbose: Loading policy modules from app... verbose: Finished loading policy middleware logic. verbose: policies hook loaded successfully. verbose: Loading app services... verbose: services hook loaded successfully. verbose: csrf hook loaded successful…
has answer: http://stackoverflow.com/a/28080801
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/41385320
has text: The one that uses value works fine. `:eq()` uses the index to select an element (and you don't have one with index 2014). What you maybe want is using `:contains()`
score: 1
comment on: http://stackoverflow.com/q/26363811
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41408434
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26376085
has text: The aliasing problem you mentioned in the comment I upvoted was the solution. Ubuntu by default installs a `javascript-common` package that creates a default (and, IMHO completely uncalled for) alias that was blocking my own files. Move that comment into the answer and I'll mark this answer correct.

http://stackoverflow.com/comment/41418336
comment on: http://stackoverflow.com/q/26381678
score: 0
has text: BTW: Since you use jquery: Don't use `e.keyCode` to get the pressed key, use [`event.which`](http://api.jquery.com/event.which/) instead
type: Comment
type: QuestionComment

firefox
tags question: http://stackoverflow.com/q/26358273
tags question: http://stackoverflow.com/q/26438178
tags question: http://stackoverflow.com/q/26510098
tags question: http://stackoverflow.com/q/26423193
tags question: http://stackoverflow.com/q/26454769
tags question: http://stackoverflow.com/q/26433634
tags question: http://stackoverflow.com/q/26361837
tag name: firefox
tags question: http://stackoverflow.com/q/26384436
tags question: http://stackoverflow.com/q/26498455
tags question: http://stackoverflow.com/q/26385683
tags question: http://stackoverflow.com/q/26382658
tags question: http://stackoverflow.com/q/26472732
tags question: http://stackoverflow.com/q/26402033
type: Tag
tags question: http://stackoverflow.com/q/26439227
tags question: http://stackoverflow.com/q/26456104
tags question: http://stackoverflow.com/q/26447081
tags question: http://stackoverflow.com/q/26456991
tags question: http://stackoverflow.com/q/26438392
tags question: http://stackoverflow.com/q/26388135
tags question: http://stackoverflow.com/q/26498460
tags question: http://stackoverflow.com/q/26433216
tags question: http://stackoverflow.com/q/26485920
tags question: http://stackoverflow.com/q/26498682
tags question: http://stackoverflow.com/q/26436037
tags question: http://stackoverflow.com/q/26364351
tags question: http://stackoverflow.com/q/26373197
tags question: http://stackoverflow.com/q/26355943
tags question: http://stackoverflow.com/q/26360878
tags question: http://stackoverflow.com/q/26365191
tags question: http://stackoverflow.com/q/26495673
tags question: http://stackoverflow.com/q/26356025
tags question: http://stackoverflow.com/q/26494833
tags question: http://stackoverflow.com/q/26434817
tags question: http://stackoverflow.com/q/26477862
tags question: http://stackoverflow.com/q/26485049
tags question: http://stackoverflow.com/q/26478978
tags question: http://stackoverflow.com/q/26364577
tags question: http://stackoverflow.com/q/26388722
tags question: http://stackoverflow.com/q/26469145
tags question: http://stackoverflow.com/q/26419249
tags question: http://stackoverflow.com/q/26497609
tags question: http://stackoverflow.com/q/26415778
tags question: http://stackoverflow.com/q/26488090
tags question: http://stackoverflow.com/q/26450321
tags question: http://stackoverflow.com/q/26379128

http://stackoverflow.com/q/26406096
tagged with: difference
has comment: http://stackoverflow.com/comment/41460887
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: datepicker
has title: How to subtract a date via Datepicker?
has comment: http://stackoverflow.com/comment/41460913
has body: I have an add date and I need to know how many days ago this record was added, so today - adddate. This is in mm/dd/yyyy format (10/16/2014) and I wanted to know if there is an easy way to get the difference without adding a new plugin. Thanks! var today = $.datepicker.formatDate('mm/dd/yy', new Date()); var adddate = $('#adddate').val(); alert(today - adddate);
linked to: http://stackoverflow.com/q/12661293
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41461382
score: 1
tagged with: date
type: Question
has answer: http://stackoverflow.com/a/26406531

http://stackoverflow.com/comment/42070728
type: Comment
comment on: http://stackoverflow.com/a/26742171
type: AnswerComment
has text: The point is, that the page _is not redirected_. If it was, an event on an unloaded page couldn't submit anything. This has to have something to do with the environment, since redirecting works in the Stack snippet in [the post](http://stackoverflow.com/q/26430575/1169519), which originally inspired me to ask the question.
score: 0

http://stackoverflow.com/q/26401447
has body: New version of Jssor will not have this problem. Demo jQuery(document).ready(function ($) { var options = { $AutoPlay: true, $PauseOnHover: true, //[Optional] Whether to pause when mouse over if a slideshow is auto playing, default value is false $ArrowKeyNavigation: true, //Allows arrow key to navigate or not $SlideWidth: 141, //[Optional] Width of every slide in pixels, the default is width of 'slides' container $SlideHeight: 200, //[Optional] Height of every slide in pixels, the default is width of 'slides' container $SlideSpacing: 25, //Space between each slide in pixels $DisplayPieces: 3, //Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1 $ParkingPosition: 0, //The offset position to park slide (this options applys only when slideshow disabled). $ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not $Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance $ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always $AutoCenter: 2, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0 $Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1 } }; var jssor_slider1 = new $JssorSlider$("slider1_container", options); //responsive code begin //you can remove responsive code if you don't want the slider scales while window resizes function ScaleSlider() { var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth; if (parentWidth) jssor_slider1.$ScaleWidth(Math.min(parentWidth, 800)); else window.setTimeout(ScaleSlider, 30); } ScaleSlider(); if (!navigator.userAgent.match(/(iPhone|iPod|iPad|BlackBerry|IEMobile)/)) { $(window).bind('resize', ScaleSlider); } //if (navigator.userAgent.match(/(iPhone|iPod|iPad)/)) { // $(window).bind("orientationchange", ScaleSlider); //} //responsive code end }); In the Demo, the images lose quality in safari, but…
type: Question
has answer: http://stackoverflow.com/a/27978409
accepted answer: http://stackoverflow.com/a/27978409
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/28672257
possible better answer: http://stackoverflow.com/a/28660087
tagged with: jquery
has title: Jssor silder images lose quality in safari
has answer: http://stackoverflow.com/a/28660087
linked to: http://stackoverflow.com/q/25914361
tagged with: safari
type: AnsweredQuestion

http://stackoverflow.com/comment/41626260
has text: i deleted the comment harping on your typo, and the one about the time of day. i realized that since you are always producing a local midnight date by being unspecific about timezones, it should balance out, which is not the case if you were parsing dates. crude write-up and over-zealous commenting aside, it's not a bad answer... oh, and i promise you can subtract dates, that's one you need to try ;)
type: Comment
comment on: http://stackoverflow.com/a/26496013
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41628667
score: 0
type: AnswerComment
has text: Your main point that you should supply an IV to use the `encrypt` function that uses a key is correct, so I've fixed the mistakes I could find. Please review the changes and take heed.
type: Comment
comment on: http://stackoverflow.com/a/26488127

http://stackoverflow.com/comment/41443826
type: Comment
comment on: http://stackoverflow.com/a/26395617
has text: Do you know how to access your wordpress site with FTP (like Filezilla or maybe Coda)?
type: AnswerComment
score: 0

http://stackoverflow.com/a/26487273
downvote count: 0
has comment: http://stackoverflow.com/comment/41825637
has comment: http://stackoverflow.com/comment/41612030
answers question: http://stackoverflow.com/q/26487051
has comment: http://stackoverflow.com/comment/41782641
accepted answer of: http://stackoverflow.com/q/26487051
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41782962
upvote count: 1
has comment: http://stackoverflow.com/comment/51858669
has comment: http://stackoverflow.com/comment/41675403
has comment: http://stackoverflow.com/comment/41648468
has body: You just inject your own Service and Spy on the function you're calling. describe( 'Controller: myCtrl', function () { var myService, ...; beforeEach( inject( function ( _myService_ ) { ... myService = _myService_; ... } ) ); it( 'should call myService.call', inject(function ($q) { var deferred = $q.defer(); spyOn( myService, 'call' ).andReturn(deferred.promise); // .and.returnValue() for jasmine 2.0 $scope.myControllerFn(); deferred.resolve( {} ); // for success // deferred.reject() --&gt; for error $scope.digest(); // do this if you want success/error to be executed. expect( myService.call ).toHaveBeenCalled(); } ); } );
has comment: http://stackoverflow.com/comment/41634403
has comment: http://stackoverflow.com/comment/41633700
has comment: http://stackoverflow.com/comment/41638740
type: AcceptedAnswer

http://stackoverflow.com/comment/41421888
type: Comment
type: QuestionComment
score: 0
has text: @devqon: I tried without the `DOCTYPE`. No luck. I still get the same error.
comment on: http://stackoverflow.com/q/26383642

http://stackoverflow.com/q/26355101
has body: I have a problem with a page not redirecting during a postback. I have an aspx-page with this content being part of it: &lt;td class="tdinput" align="right"&gt; &lt;asp:Button ID="ButtonFrigiv" runat="server" Text="Frigiv sag" CssClass="button" OnClientClick="verifyReleaseOtherEmployeesCase()" /&gt; &lt;asp:Button runat="server" ID="ButtonFrigivHidden" OnClick="ButtonFrigiv_Click" Style="display: none;" UseSubmitBehavior="true" /&gt; &lt;/td&gt; The page also contains various UpdatePanels, however the above code is not included in one. As it is seen there's a button being displayed, which calls the following JavaScript: function verifyReleaseOtherEmployeesCase() { var logonUser = document.getElementById('&lt;%= HiddenLogonUser.ClientID %&gt;'); var lockedBy = document.getElementById('&lt;%= HiddenLockedBy.ClientID %&gt;'); var button = document.getElementById('&lt;%= ButtonFrigivHidden.ClientID %&gt;'); if (logonUser.value == lockedBy.value) { button.click(); } else if (confirm("Danish confirm message")) { button.click(); } else { return; } } So basically this JavaScript locates the 2nd button above (which is not being displayed to the user) and clicks it. When the button is clicked the following event handler is reached on the server: protected void ButtonFrigiv_Click(object sender, EventArgs e) { NyeSagerDAC.FrigivSag(SagID, LogonUser); Response.Redirect(LastList); } Where LastList is a string containing the page which was the entry point for the current page (there are multiple entry points). The server method is reached and the first line in the method is executed perfectly, however the page is not redirected. I have done some testing regarding whether it might have been considered an AJAX-callback (which doesn't allow redirects) using the following code in the event handler: HttpRequest request = HttpContext.Current.Request; string header = request.Headers["X-MicrosoftAjax"]; The content of the string header is empty and the Page_Load is called after the event …
tagged with: c#-4.0
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: postback
accepted answer: http://stackoverflow.com/a/26355741
type: Question
has answer: http://stackoverflow.com/a/26355741
tagged with: javascript
upvote count: 2
answer count: 1
tagged with: .net
has title: ASP.NET redirect from event handler hot by button clicked by JavaScript
tagged with: asp.net
favorite count: 0

serverside-javascript
tags question: http://stackoverflow.com/q/26408145
tag name: serverside-javascript
type: Tag

http://stackoverflow.com/comment/41413625
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26379032
has text: @BojanPetkovski Can i change the scripts src from the console ?
score: 0

http://stackoverflow.com/q/26406747
downvote count: 1
has comment: http://stackoverflow.com/comment/41462226
has comment: http://stackoverflow.com/comment/41462278
has comment: http://stackoverflow.com/comment/41462310
tagged with: javascript
type: UnansweredQuestion
score: 1
has title: AngularJS: Run Code when Controller is initialized
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26407483
has answer: http://stackoverflow.com/a/26406909
has body: Why does the following code not work? I want the $scope.init() function to run on startup. What is the correct way to run code on controller initialization? app.controller('LoginCtrl', function($scope) { $scope.init(); $scope.init = function() { ... }; });
has comment: http://stackoverflow.com/comment/41462292
tagged with: angularjs
upvote count: 2
answer count: 2

http://stackoverflow.com/comment/41398649
comment on: http://stackoverflow.com/q/26370710
score: 0
has text: `It not working` does not explain much. Can you elaborate ? The `window.prompt` returns an string. You need to parse that as float or integer.`x = parseFloat(window.prompt("Enter a integer"));`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41372877
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26356519
type: AnswerComment
has text: @Mastah I guess it's too much to hope that folks would have an appreciation for functional programming style, or functions transforming functions in useful ways. As it was, you got an answer which basically told you to write a loop over the arguments. I'm hoping that the part you didn't know was how to loop across arguments, not how to write the loop in the first place. :-)

http://stackoverflow.com/comment/41490447
comment on: http://stackoverflow.com/q/26422462
score: 0
type: Comment
type: QuestionComment
has text: @George where does that question answer the issue of running only on focus of a specific text area?

http://stackoverflow.com/q/26386118
tagged with: jquery
favorite count: 0
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41426381
has comment: http://stackoverflow.com/comment/41426282
upvote count: 3
type: UnansweredQuestion
type: Question
score: 3
has title: Changing a javascript variable inside a DIV using JQuery
has comment: http://stackoverflow.com/comment/41426336
has body: Firstly - i'm not even sure if the syntax is correct, but what i'm trying to do is, i have a div showing an animated image sequence which picks a position using a variable. I will eventually use JSON to feed the value being changed, but for now i'm just trying to understand how to use JQuery to change the variable. Here's the code: Any help much appreciated code is live btw at so you can at least see the animation seq http://ashleyjamesbrown.com/fgbp/noise.htm
has answer: http://stackoverflow.com/a/26386505
has comment: http://stackoverflow.com/comment/41426458
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41510017
score: 0
comment on: http://stackoverflow.com/q/26432662
type: QuestionComment
type: Comment
has text: I don't see any ajax requests in your javascript.

http://stackoverflow.com/a/26363432
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26357949
has body: This has nothing to do with CakePHP and everything to do with your browser's cache. Clear cache and try again, or try a different browser...etc. Sometimes I use Ctrl+F5 in Chrome, which supposedly "Reloads your current page, ignoring cached content", but that seems to work 10% of the time for me.
accepted answer of: http://stackoverflow.com/q/26357949

http://stackoverflow.com/comment/41543341
type: Comment
has text: It works but I didn't understand that `(?=[` part. Can you explain a little more? Thanks.
comment on: http://stackoverflow.com/a/26450276
type: AnswerComment
score: 0

http://stackoverflow.com/a/26380410
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26380065
has body: The problem is due to the way you're binding your change listener/function after you click the link the first time, so you have to click it again to trigger your new click bind (and incidentally, you're also adding another new click bind when you click it the second time). In your code example you call the function changetag, which binds a new click listener onto the a tag. Removing the second click bind jQuery(this).click(function () { and initiating the click immediately should make it work. Ex: jQuery(document).ready(function() { jQuery("#checkpname").click(function() { if (jQuery('#name').val() == '') { alert("Please select Product name First.") jQuery('#name').focus(); jQuery('#name').css('border', '1px solid red'); } else { changetab('step2'); } }); function changetab(hrf){ jQuery('a.btn').each(function () { //var thisid = $('#sell .tab-pane.active').attr('id'); jQuery('.wizard a[data-toggle="tab"]').removeClass('current'); jQuery('.wizard a[href="#' + hrf + '"]').click(); }); } });
score: 0
answers question: http://stackoverflow.com/q/26380065

http://stackoverflow.com/q/26417370
has comment: http://stackoverflow.com/comment/41482263
has answer: http://stackoverflow.com/a/26427720
has body: I'm trying to do a basic ng-grid. I have it is defined and it has data. I'll attach a picture too, I haven't ever seen ng-grid do this, but this is the first time I'm setting it up myself so maybe I'm doing it wrong. Here's my code: My Controller: controllers.controller('searchResultsController', ['$scope', '$rootScope', function($scope, $rootScope) { $scope.data = $scope.searchResults.data || $rootScope.searchResults.data; $scope.resultsGridOptions = { data: 'data', columnDefs: [ { field: 'startingCity', displayName: 'Starting City', width: '***' }, { field: 'destination', displayName: 'Destination', width: '***' }, { field: 'airline', displayName: 'Airline', width: '**' }, { field: 'price', displayName: 'Price', width: '*' }, { field: 'seatsInFirstClass', displayName: 'Seats In First Class', width: '*' }, { field: 'seatsInEconomy', displayName: 'Seats In Economy', width: '*' } ] }; } ] ); My app declaration: angular.module('reservationsApp', ['ngRoute', 'ngGrid', 'ui.bootstrap', 'reservationsControllers']); And if it'll do any good, my template (pretty plain though): &lt;div class="gridStyle" ng-grid="resultsGridOptions"&gt;&lt;/div&gt; Here's a screenshot of what I'm getting
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41483439
tagged with: ng-grid
tagged with: angularjs
has title: AngularJS ng-grid clumping together grid
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41481946
tagged with: javascript

http://stackoverflow.com/comment/41486892
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26420403
has text: No, i am not chaning the id.
score: 0

http://stackoverflow.com/q/26415594
answer count: 1
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
has title: Jquery image alt on hover
has answer: http://stackoverflow.com/a/26415673
accepted answer: http://stackoverflow.com/a/26415673
type: Question
has body: I have one question about image alt on hover image. I have to create this fiddle In this fiddle you can see there are big and smole images. When you hoverover smole image then big image changing. What i want to do. I want to add a alt from big image. In my demo shows alt with only smole images. Also my code said undefined. What i need to do for showing alt only from big images. $(document).ready(function() { var a = $(this).attr('alt'); $("#magazin_sldwr li img").hover(function(){ clearTimeout(autoScrollerTimer); $(this).parent('li').addClass('active').siblings().removeClass('active'); $('#mainm-img').attr('src',$(this).attr('src').replace('thumb/', '')).parent().attr('href',$(this).parent().attr('href'),$(this).parent().append('&lt;div class="title"&gt;' + a + '&lt;/div&gt;')); }, function(){ autoChangeImage(); });
score: 0

http://stackoverflow.com/a/26412927
type: Answer
answers question: http://stackoverflow.com/q/26412839
has body: You can't set headers after echo'in a response. Remove the echo 'email sent';
score: 0

http://stackoverflow.com/comment/41828576
type: Comment
comment on: http://stackoverflow.com/a/26450971
has text: If you use the webpack-dev-server it will watch for changes. You can even use the HotModuleReplacementPlugin to have your app update without hitting the refresh button in the browser. See http://gaearon.github.io/react-hot-loader/2014/07/23/integrating-jsx-live-reload-into-your-react-workflow/ for a really good set-up.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26453329
type: AnsweredQuestion
downvote count: 0
has body: I want to match and expression that contains the string yes, but only if it's not preceded by the string no. For example, this with match: Hello world, major yes here! But this will not match: Hell no yes The second string does not match because the yes string is preceded by no string. Apparently this needs negated lookbehind, which is not implemented in JavaScript regex flavor, I've tried stuff like that: /((?!no ))yes/ /^(?!.*no) yes$/ but they don't seem to have the desired effect :/
has answer: http://stackoverflow.com/a/26453525
type: Question
score: 1
possible better answer: http://stackoverflow.com/a/26453366
upvote count: 1
linked to: http://stackoverflow.com/q/406230
has answer: http://stackoverflow.com/a/26453366
has title: Regex that matches one word without another in JavaScript
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: regex
has answer: http://stackoverflow.com/a/26453391
accepted answer: http://stackoverflow.com/a/26453391

http://stackoverflow.com/q/26381780
has answer: http://stackoverflow.com/a/26381896
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41418466
has body: I am trying to extract the text from a document and pdf files and put them in a text area. My code is at follows: FileReader Example The only problem I am having is that text is being displayed as rubbish but if I upload a text file it works. What's going wrong?
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/1554280
has title: Javascript Read A Document and PDF
has comment: http://stackoverflow.com/comment/41418359
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1554280
score: 1
has comment: http://stackoverflow.com/comment/41418269

http://stackoverflow.com/a/26496664
type: Answer
accepted answer of: http://stackoverflow.com/q/26486291
score: 1
upvote count: 1
has body: This example removes future releases by adding a filter to the release combobox var today = new Date(); var filters = [ { property : 'ReleaseStartDate', operator : '&lt;=', value : today } ]; var rComboBox = Ext.create('Rally.ui.combobox.ReleaseComboBox',{ listeners:{ ready: function(combobox){ var rRef = combobox.getRecord().get('_ref'); this._getData(rRef); }, select: function(combobox){ var rRef = combobox.getRecord().get('_ref'); this._getData(rRef); }, scope: this } }); rComboBox.store.filter(filters); this.add(rComboBox); The source code is here.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26486291

facebook-graph-api
tags question: http://stackoverflow.com/q/26367792
tag name: facebook-graph-api
tags question: http://stackoverflow.com/q/26392005
tags question: http://stackoverflow.com/q/26462679
tags question: http://stackoverflow.com/q/26434934
tags question: http://stackoverflow.com/q/26504061
tags question: http://stackoverflow.com/q/26430486
tags question: http://stackoverflow.com/q/26367072
tags question: http://stackoverflow.com/q/26375727
tags question: http://stackoverflow.com/q/26493611
tags question: http://stackoverflow.com/q/26502766
tags question: http://stackoverflow.com/q/26376569
tags question: http://stackoverflow.com/q/26415371
tags question: http://stackoverflow.com/q/26444386
tags question: http://stackoverflow.com/q/26400571
type: Tag

http://stackoverflow.com/comment/41635304
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26488349
has text: @StormRideR Thank you. I did change to radio buttons!

http://stackoverflow.com/comment/41612907
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26488693
has text: To rule out the obvious problem people encounter when moving code inside a for loop, try wrapping everything inside the for loop in a closure: `for(...){ function(e,i){...original code...}(e,i)}`

http://stackoverflow.com/a/26405771
has body: Put the URLs of the websites in an array. Shuffle the array. Pick the websites from the shuffled array in order. You will pick every website at most once with no repeats.
upvote count: 6
has comment: http://stackoverflow.com/comment/41460297
has comment: http://stackoverflow.com/comment/41461166
answers question: http://stackoverflow.com/q/26405699
type: Answer
score: 6
downvote count: 0

http://stackoverflow.com/q/26406273
has body: I am trying to make it so that when you submit my form - if you type 'Martin' in first name, 'Neuhard' in last name, and select 'Binghamton University' in the dropdown it changes the background green and pops up a pitcure of binghamton university. It works if i use || but not when i use &&. Also i want to make it so that if the two email field aren't the same then alert('error') I've been trying for hours and cannot figure it out. the jsfiddle is below http://jsfiddle.net/esaunde1/ngjo8aoq/ HTML Get in touch! First Name Last Name E-mail Address E-mail Address Your Phone Number What school do you go to? Select One The College of NJ Rutgers University Columbia University Binghamton University JAVASCRIPT function valid(){ var name = document.getElementById('name'); var lname = document.getElementById('lame'); var home = document.getElementById('home'); if (name.value == 'Martin' && lname.value == 'Neuhard' && ){ $('#home').addClass('green'); $('#contact').addClass('image'); } else if (document.getElementById('first').value == 'martin'){ alert('thats our profs name!') } else return false; }
score: 0
tagged with: validation
answer count: 1
has title: Form Responses Changing Values
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41462086
has comment: http://stackoverflow.com/comment/41461714
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41461918
has comment: http://stackoverflow.com/comment/41461463
has answer: http://stackoverflow.com/a/26406922
has comment: http://stackoverflow.com/comment/41462098
has comment: http://stackoverflow.com/comment/41461964
type: Question
has comment: http://stackoverflow.com/comment/41461365
tagged with: javascript

http://stackoverflow.com/q/26494401
upvote count: 2
has comment: http://stackoverflow.com/comment/41622821
has body: I'm attempting to loop through an object and use different functions on each different sub-object based on it's type. instanceof seemed to be the only way to identify non-built in types, so I attempted to use it with for...in; however, I'm not getting the expected output. Here is a sample fiddle to illustrate my issue: http://jsfiddle.net/zv230dvL/2/ function testObject(){} function testContainer(objects){ this.zero = objects[0]; this.one = objects[1]; this.two = objects[2]; } var singleObject = new testObject(); var container = new testContainer( [new testObject(), new testObject(), new testObject()] ); ... //Testing if a single object functions as expected out(singleObject instanceof testObject); //Testing if directly referencing an object //in a container functions as expected out(container.zero instanceof testObject); //iterating through a container object... for(i in container){ out(i instanceof testObject); } The output is true true false false false First, what would be the appropriate method to do something like this? Second, why does the variable in the for...in loop behave in this manner? no jQuery please.
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41622125
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26494451
accepted answer: http://stackoverflow.com/a/26494451
type: Question
tagged with: object
has title: Using for...in and instanceof for parsing objects
tagged with: javascript

http://stackoverflow.com/a/26358583
upvote count: 1
has comment: http://stackoverflow.com/comment/41375476
type: Answer
answers question: http://stackoverflow.com/q/26358516
has body: You have forgotten a closing ')' in the middle line of the click event: Your code: $('.view-faq').click(function(){ var current = $(this).closest('.f-blurb'); $(".f-blub").not($(current).removeClass('hiden').addClass('shown'); current.removeClass('shown').addClass('hiden'); }) The correct code should be (as current is already jq object): $('.view-faq').click(function(){ var current = $(this).closest('.f-blurb'); $(".f-blub").not(current).removeClass('hiden').addClass('shown'); &lt;--------- current.removeClass('shown').addClass('hiden'); })
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41375433
has comment: http://stackoverflow.com/comment/41375944
has comment: http://stackoverflow.com/comment/41375614

http://stackoverflow.com/comment/41652099
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26510945
has text: _"I can't limit the number of opened elements."_ Why not?

http://stackoverflow.com/comment/41448920
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26399064
score: 0
has text: you need to provide your markup as well!

sidebar
type: Tag
tag name: sidebar
tags question: http://stackoverflow.com/q/26445660

http://stackoverflow.com/a/26494483
score: 0
type: Answer
has body: As written, this code will recursively establish listeners, increasing the resource usage each time there is a change in scope. It's unclear why you've chosen to watch both scope and the list's $watch method, but only one of these should be necessary. list.$watch(function() { // do whatever needs to be done when the list changes }); Also, updateList implies that you're changing the list or making copies of it. If you are changing the list inside a $watch event, that's going to trigger more watch events. If you're making copies of the list, those are probably unnecessary. More context about the use case and end goal could help with specifics.
answers question: http://stackoverflow.com/q/26411024

http://stackoverflow.com/q/26473811
tagged with: jquery-knob
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26474257
accepted answer: http://stackoverflow.com/a/26474257
has comment: http://stackoverflow.com/comment/41585796
type: Question
has comment: http://stackoverflow.com/comment/41585013
has title: jQuery Knob as a Progress Bar on hover in/out
has body: I'm trying to implement a progress bar (aterrien's jQuery Knob) that can have its progression interrupted on mouseout. I can begin the progression on mouseover, but I cannot interrupt the progression until it's been completed. I'd like to reverse the animation back to the starting point on mouseout, and resume progression from zero again on mouseover. Any ideas? Thanks in advance, Daniel (see my example in the comment)
score: 0
tagged with: user-interface
answer count: 1
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/19547215
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26372056
answers question: http://stackoverflow.com/q/26371929
downvote count: 0
score: 1
has body: You can do all of these checks with a single regular expression: ^\d+$ This ensures that the entry has one or more digits (\d is the character class [0-9], + is "one or more", ^ matches the beginning of the string and $ matches the end of the string.
type: Answer
has comment: http://stackoverflow.com/comment/41400922
has comment: http://stackoverflow.com/comment/41401020
upvote count: 1

http://stackoverflow.com/comment/41625876
comment on: http://stackoverflow.com/q/26495947
type: Comment
type: QuestionComment
has text: @dandavis promise and return actually do go together. thats how you chain promises. methods that return promises are incredibly useful for function composition
score: 1

http://stackoverflow.com/a/26478286
answers question: http://stackoverflow.com/q/26458781
upvote count: 4
downvote count: 0
score: 4
type: Answer
has body: use mine document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready function onDeviceReady() { checkConnection() } function checkConnection() { networkState = navigator.connection.type; var states = {}; states[Connection.UNKNOWN] = 'Unknown connection'; states[Connection.ETHERNET] = 'Ethernet connection'; states[Connection.WIFI] = 'WiFi connection'; states[Connection.CELL_2G] = 'Cell 2G connection'; states[Connection.CELL_3G] = 'Cell 3G connection'; states[Connection.CELL_4G] = 'Cell 4G connection'; states[Connection.CELL] = 'Cell generic connection'; states[Connection.NONE] = 'No network connection'; alert('Connection type: ' + states[networkState]); }

http://stackoverflow.com/comment/41592790
type: QuestionComment
has text: It would be better if you could post the full HTML table here, that seems to be a members-only page.
score: 1
comment on: http://stackoverflow.com/q/26478006
type: Comment

http://stackoverflow.com/comment/41599266
comment on: http://stackoverflow.com/q/26481645
score: 0
type: Comment
type: QuestionComment
has text: please i need help or suggestions

http://stackoverflow.com/q/26509046
has body: // javascript var a = angular.module('minimalReproApp', [ ]) a.controller('MainCtrl', function($scope) { $scope.fileData = {} $scope.fileData.xmlData = "ControllerScope"; }).directive('dropzone', function() { return { restrict: 'AE', scope: '=', transclude: true, link: function(scope, elem) { console.log(scope) console.log(scope.fileData.xmlData) scope.fileData.xmlData = "directive"; setTimeout(function() { console.log(1000) scope.fileData.xmlData = "something"; }, 1000) } }; }); //html &lt;div ng-app="minimalReproApp"&gt; &lt;div ng-controller="MainCtrl"&gt; {{a}} &lt;div class="jumbotron" dropzone&gt; &lt;/div&gt; &lt;div&gt;{{fileData.xmlData}} &lt;/div&gt; &lt;/div&gt; I'm trying to implement a custom dropzone directive that incorporates the html5 Filereader API. The filereader is intended to modify scope outside of the dropzone directive. As you can see from this fiddle: http://jsfiddle.net/HB7LU/7514/. The code initally binds the directive scope to the html, but doesn't after the timeout (my minimal reproduction of the file drop action) - why is this? How would I fix this?
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/77852316
has title: Angular directive modifies scope, but not after setTimeout
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/26509269
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41649168
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26509269
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/77852316
linked to: http://stackoverflow.com/q/16069309
tagged with: angularjs

http://stackoverflow.com/comment/41474962
has text: Well i can imagine what's going wrong, the login.index route resolves whatever your SessionService returns, it returns success as your backend login route might not be authenticated, it redirects to dashboard.index, authentication fails, redirect to login.index, rinse & repeat. Just a guess, but that could be what's going on..
comment on: http://stackoverflow.com/q/26413396
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/62128193
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26473546
has text: Firefox debugger > Events tell you wich line of code is that triggers each event.

http://stackoverflow.com/comment/41530854
score: 0
type: QuestionComment
has text: @TJ do u think u can help with my problem now ?
type: Comment
comment on: http://stackoverflow.com/q/26391577

http://stackoverflow.com/q/26397534
has title: table border line is removed when printing
tagged with: printing
answer count: 3
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26397808
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 1
has answer: http://stackoverflow.com/a/26397658
has answer: http://stackoverflow.com/a/26397634
upvote count: 1
type: Question
tagged with: javascript
has body: I have created an application for printing a html table, The printing application is working fine, but the problem is that the table is designed in such a way that the border line is applied using css (i can't modify anything to the styles since it was been done by other team), so when i trigger the print option that css is not applied. My code is as given below Can anyone please tell me some solution for this. Working Demo html Actions First Name Last Name Points Add/ Remove Jill Smith 50 Add/ Remove Eve Jackson 94 Add/ Remove John Doe 80 Add/ Remove Adam Johnson 67 Print me script function printData() { var divToPrint=document.getElementById("printTable"); newWin= window.open(""); newWin.document.write(divToPrint.outerHTML); newWin.print(); newWin.close(); } $('button').on('click',function(){ printData(); })

http://stackoverflow.com/q/26393190
has body: Let's say i have a search box and i want to display it after user click on button . so far so good . but i want to add another feature , when user click anywhere search box go away . How can i do this with AngularJs ? this is my code : HTML Search Angular app.controller("MainCtrl", function($scope,$http){ $scope.noneStyle = "noneVisible"; $scope.addStyle = function(){ $scope.noneStyle = "visibleStyle"; } }) any idea ? Thx in advance
has title: After click anywhere removed the class with angularJs
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/26393441
possible better answer: http://stackoverflow.com/a/26395676
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26395676
linked to: http://stackoverflow.com/q/12931369
has answer: http://stackoverflow.com/a/26393474
type: Question
has comment: http://stackoverflow.com/comment/41439650
has answer: http://stackoverflow.com/a/26393441
tagged with: javascript
score: 2
has answer: http://stackoverflow.com/a/26393517
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26394621
answers question: http://stackoverflow.com/q/26394450
type: AcceptedAnswer
type: Answer
score: 0
has body: You should see the Page loaded. #[1-5] in the console when you click the links: Test #1 Test #2 Test #3 Test #4 Test #5 window.addEventListener('load', function load(){ console.log('Page loaded.', location.hash); var a = document.getElementsByTagName('a'); for (var i = 0; i < a.length; i++) { a[i].addEventListener('click', function click(){ window.location = this.href; window.location.reload(true); }); } }); jsFiddle seems to have a problem with it not being a POST, so no live demo.
accepted answer of: http://stackoverflow.com/q/26394450

http://stackoverflow.com/q/26438319
has comment: http://stackoverflow.com/comment/41520843
type: Question
has comment: http://stackoverflow.com/comment/41568217
has comment: http://stackoverflow.com/comment/41521780
has title: validation using script of single web form
tagged with: javascript
has comment: http://stackoverflow.com/comment/41522159
score: 0
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41567172
has comment: http://stackoverflow.com/comment/41568031
has body: hi everybody i want to validate a single web form using this script but its not in correct way fields.each(function() { var value = $(this).val(); if (field_values[$(this).attr('id')] = null) { $(this).addClass('error'); $(this).effect("shake", { times: 3 }, 50); error++; alert(1); } else { $(this).addClass('valid'); alert(2); $('#progress_text').html('33% Complete'); $('#progress').css('width', '113px'); //slide steps $('#first_step').slideUp(); $('#second_step').slideDown(); } }); how to form the if condition in this script can anyone tell me thanks in advance
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41485372
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26419061
type: QuestionComment
has text: i need to match core skills data.

http://stackoverflow.com/q/26439079
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41522690
answer count: 0
has comment: http://stackoverflow.com/comment/41523001
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41522542
tagged with: nivo-slider
type: Question
has comment: http://stackoverflow.com/comment/41522574
has comment: http://stackoverflow.com/comment/41522660
tagged with: javascript
has body: I've added Nivo Slider to a wordpress home page. I've used it before, and I've followed the steps exactly, but the slideshow does not show up at all. If you view the source of the page you can see the code surrounded by "Nivo Slider" comments. If I take the script that fires the slider completely out, the images appear, but with the script included the slider vanishes. I hope someone with fresh eyes can spot what I'm overlooking. Here is the link: http://phillipsandphillipslaw.com/ Edit: I found that the height setting of "auto" was preventing the slideshow from showing up, so I set it to the height of the images, and it appears, but it still isn't working. So it seems that something it breaking but I can't determine what it is. I don't get any errors in the console, so I'm stuck in the diagnosis. It must be a conflict - but I'm not sure how to rule that out.
has title: Nivo Slider just doesn't show up? All code seems good
score: 0
has comment: http://stackoverflow.com/comment/41522480
has comment: http://stackoverflow.com/comment/41523646
tagged with: jquery

http://stackoverflow.com/comment/41633955
score: 0
type: AnswerComment
has text: Thanks! Just curious, what's the difference between the example i had and the example you had? the only difference i see is the syntax of how you generate the key. Why does this not work `action.unread[partnerId] = 1;`?
comment on: http://stackoverflow.com/a/26494394
type: Comment

http://stackoverflow.com/a/26382365
score: 0
accepted answer of: http://stackoverflow.com/q/26382312
type: AcceptedAnswer
type: Answer
has body: Instead of $('form').submit(function(){ alert("thanks"); return true; }); in your else, just return true; same in your if, you don't need to $('form').submit(function(){ //e.preventDefault(); return false; }); just return true; What you're doing in your code is hooking up to the submit event of the form. If you return false or true from submit button, it'll submit the form or not.
has comment: http://stackoverflow.com/comment/41419336
answers question: http://stackoverflow.com/q/26382312

http://stackoverflow.com/q/26472717
tagged with: internet-explorer
has body: I am working on a web application where people can build a house a preview it in 3D. The 3D preview works well in firefox, chrome and IE11+ but it won't work with ie9. Is there a way to get a few images of the 3D scene they are supposed to see so that I can at least show them images of what their house looks like in 3D? I am using three.js.
score: 0
has title: Getting a few images from a WebGL rendered canvas in IE9
tagged with: 3d
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41583391
type: Question
tagged with: three.js
tagged with: web-applications
has comment: http://stackoverflow.com/comment/41584977

http://stackoverflow.com/a/26507510
type: Answer
answers question: http://stackoverflow.com/q/26507413
has body: Because when you use the mapping, you convert each of the properties into an observable. Every observable property is a function and so you need to execute the function to return the value inside. See it working here: http://jsfiddle.net/q49vfy6q/1/ &lt;table&gt; &lt;tbody data-bind="foreach: entries()"&gt; &lt;tr&gt; &lt;td&gt; &lt;!-- ko if: type() === "file" --&gt;
score: 0

http://stackoverflow.com/a/26486484
downvote count: 0
has comment: http://stackoverflow.com/comment/49627778
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/26485315
upvote count: 3
answers question: http://stackoverflow.com/q/26485315
has body: To get only the localized time, in moment.js you have the 'LT' formatter: moment().format('LT'); the result is the localized time : 1:11PM Unfortunately, it seems that there are no formatters for localized time displaying seconds.
type: AcceptedAnswer

http://stackoverflow.com/comment/41416771
comment on: http://stackoverflow.com/q/26380849
type: Comment
type: QuestionComment
score: 0
has text: "i need to access column count": What does this mean? Do you mean how many objects there are in the array? `Result.length` will give you that.

http://stackoverflow.com/comment/41387437
has text: can you be be more clear, and post proper code, as said by @pollirrata I think you are adding that value more than once and never change
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26364854

http://stackoverflow.com/comment/41400424
comment on: http://stackoverflow.com/a/26371102
score: 0
type: AnswerComment
has text: Is jQuery ok? Example added. I am no javascript guru, I just know the basics. If jQuery is not ok I can replicate in Javascript :)
type: Comment

http://stackoverflow.com/a/26419105
has body: The code $(' ') will create jquery object so if you append it, the html will look like this if you want to append the in the end then save all the html in a variable and append it in the end for(continent in CityList){ var data = ' '; currentcontinent = CityList[continent]; for(city in currentcontinent) { data += ' '+CityList[continent][city]['EngName']+' ' } data += ' '; $(data).appendTo('#Display'); // or ('#Display').append(data); }
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26418940
has comment: http://stackoverflow.com/comment/41484808
answers question: http://stackoverflow.com/q/26418940
type: Answer

http://stackoverflow.com/q/26362654
type: Question
type: AnsweredQuestion
tagged with: asp.net-mvc
has body: First off, thanks for taking the time to read. I'm trying to delve into ASP.NET MVC at the moment, however i currently have no wish to use any type of JavaScript framework, so please, don't tell me how much easier it would be etc, in your answer. I currently have a Javascript function that successfully makes an AJAX call, however i am struggling to understand why no values are being returned from the request. The function is as follows. function ajaxRequestUser(num) { var ajax; try { ajax = new XMLHttpRequest(); } catch(e) { try { ajax = new ActiveXObject(Msxml2.XMLHTTP); } catch(e){ alert('old browser'); } } ajax.readystatechange = function () { if (ajax.readyState == 4) { var queryResult = ajax.responseText; if (!queryResult) { alert('No Information.'); } else { alert(queryResult); } } } var requestString = "?user="+num; ajax.open("GET", "/Users/GetUser" + requestString, true); ajax.send(null); } The function is called via a separate function that simply does some UI modifications to allow for the display of the data. The alerts are there at this point, because i was not receiving any data back from the call and i was testing to see if that part of the code was being hit at all (Don't go into the differences between Synchronous and Asynchronous.). No matter how long i waited the data being returned was not being returned, after breaking through the actual server side c#, i saw the data being sent back, but it was just never being received. Is there something in the code that was done wrong? Or am i going about receiving the inbound data in the wrong way?
answer count: 1
tagged with: javascript
has title: Making an ASP.NET MVC Ajax call with the use of Javascript
tagged with: ajax
score: 0
accepted answer: http://stackoverflow.com/a/26363498
tagged with: razor
has answer: http://stackoverflow.com/a/26363498

http://stackoverflow.com/q/26371083
has body: My question is about the map method of arrays in JavaScript. You can pass it a function that takes a second argument, the index of the current element of the array being processed, but... to what purpose? What happens when you do it and what's the difference when you don't? What would you use this feature for?
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/26371228
downvote count: 0
has title: JavaScript Array#map: index argument
has comment: http://stackoverflow.com/comment/41399291
favorite count: 0
has answer: http://stackoverflow.com/a/26371149
tagged with: dictionary
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26371146
possible better answer: http://stackoverflow.com/a/26371149
accepted answer: http://stackoverflow.com/a/26371228
score: 49
upvote count: 49
tagged with: methods
type: Question

http://stackoverflow.com/q/26472273
type: Question
tagged with: javascript
has title: Extension permission for Chrome settings menu (chrome://settings)
downvote count: 0
answer count: 1
favorite count: 0
has body: I'm writing a Chrome extension, it listens the chrome.windows.onRemoved.addListener and disconnects the user when chrome window is closed. I want to execute script (chrome.tabs.executeScript) in the "chrome://settings-frame" page. In this page i am going to manually disconnect user from Chrome. (by running this code: chrome.send('SyncSetupStopSyncing', [deleteProfile]);) Is this permission possible? Thanks for any hints.
type: UnansweredQuestion
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/26473101
score: 1
upvote count: 1
tagged with: google-chrome

http://stackoverflow.com/comment/77312505
score: 0
type: Comment
has text: Thanks Aaron for this share. I also needed this. Great fan and follower of your posts.
comment on: http://stackoverflow.com/a/26592567
type: AnswerComment

http://stackoverflow.com/a/26390795
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26390662
answers question: http://stackoverflow.com/q/26390662
type: AcceptedAnswer
downvote count: 0
has body: The problems here were in two places. In the model code and in the rendering view code: First, model should have defined the variables used in the template, at least by defaults as null. Second, rendering code in the view should mention the model's attributes in the template function defined in the same view but not only the model. Like so: First, in model file: defaults: { username: "",//or alternately username: null, }, Second in view file: this.$el.html( this.template_login( this.loginModel.attributes ) );

http://stackoverflow.com/q/26376926
has answer: http://stackoverflow.com/a/26377376
has title: Restrict the audio playback for only certain duration of time using jQuery
type: AnsweredQuestion
tagged with: audio
type: Question
accepted answer: http://stackoverflow.com/a/26377376
has comment: http://stackoverflow.com/comment/41409435
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a use-case where I need to play an audio on clicking an element. The audio is playing fine but its duration is a little longer than I thought. I would want it to pause(stop) after certain seconds. I could alert the duration time and I also tried applying stop and/or pause methods both of which didn't work. Any thoughts on this? I am pretty sure some of you might have come across a situation like this. Here is my code. jQuery var audioElement = document.createElement('audio'); audioElement.setAttribute('src', 'sound/crack.mp3'); $('#thanksBanner').click(function() { audioElement.play(); }); audioElement.addEventListener("loadedmetadata", function(_event) { var duration = audioElement.duration; //TODO whatever var ourDuration = duration - 1.5; if (duration &gt; ourDuration) { audioElement.pause(); alert(duration); }; });
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26503601
has body: JavaScript has no access to call commands like that. Imagine the security risks if that were possible. *shudder* You could, however, make an ajax call to a local server, and use a server-side language to execute the command.
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26503479
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26503479
downvote count: 0
has comment: http://stackoverflow.com/comment/41638914
has comment: http://stackoverflow.com/comment/41639069
has comment: http://stackoverflow.com/comment/41638961
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41639024

http://stackoverflow.com/comment/41555660
comment on: http://stackoverflow.com/q/26457729
type: Comment
type: QuestionComment
has text: Seems like you're better off defining a class `Color`, which has a field `color` and function `myColor()`.
score: 0

asp.net-mvc-ajax
tags question: http://stackoverflow.com/q/26439305
type: Tag
tag name: asp.net-mvc-ajax

http://stackoverflow.com/comment/41466008
has text: use event.preventDefault(); http://jsfiddle.net/5otvoxho/7/ (And i like upvotes ;) )
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26408575
type: Comment

http://stackoverflow.com/comment/41611971
comment on: http://stackoverflow.com/q/26488952
has text: @Lodder I was wondering if it is a jQuery problem. Thats the link I use to import jQuery. How would I check weather it is imported or not?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26428150
upvote count: 1
score: 1
downvote count: 0
type: Answer
has body: Assuming you want the year text off of the class attribute. $('[class*="timeline-year"]').each(function(){ var classString = $(this).attr('class'); var year = classString.match(/\d+$/)[0]; console.log(year); }); Demo: http://jsfiddle.net/ubL7h10u/9/
answers question: http://stackoverflow.com/q/26427974

http://stackoverflow.com/q/26380849
has answer: http://stackoverflow.com/a/26380925
has comment: http://stackoverflow.com/comment/41417174
tagged with: javascript
has title: How to access multidimensional array by index in javascript?
has comment: http://stackoverflow.com/comment/41417804
favorite count: 0
has answer: http://stackoverflow.com/a/26380976
has comment: http://stackoverflow.com/comment/41416771
accepted answer: http://stackoverflow.com/a/26380925
upvote count: 2
has answer: http://stackoverflow.com/a/26381370
possible better answer: http://stackoverflow.com/a/26380976
has comment: http://stackoverflow.com/comment/41417243
answer count: 4
type: AnsweredQuestion
has body: I have an array like below in java-script Result = [ {"ID":1,"Type":"Pyramid","Phase":"One"}, {"ID":2,"Type":"Pyramid","Phase":"Two"} ] I tried accessing the individual values and was able to by the below code alert(Result[0].ID) or alert(Result[0].Phase) Is there a way to access this by index? like Result[0][1], i tried but getting [object][object] also i need to access column count Please help me
score: 1
has comment: http://stackoverflow.com/comment/41417096
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26380911

http://stackoverflow.com/a/26394436
type: Answer
accepted answer of: http://stackoverflow.com/q/26394404
score: 2
upvote count: 2
has body: Callbacks don't natively preserve the value of this for you, so you will need to do something to set it for you. You can either create a closure variable or use .bind() with the callbacks. Here's one solution using a closure variable self: this.geocodeAddress = function geocodeAddress(location) { var self = this; // I have full access to this.zoom, this.center etc. here var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': location }, function (results, status) { // this.zoom, this.center etc. are inaccessible here and return undefined. if (status == google.maps.GeocoderStatus.OK) { self.map.setCenter(results[0].geometry.location); self.addMapMarker({ center: results[0].geometry.location, draggable: true, title: location }); } else { alert('Could not find the address entered'); } }); } And, a solution using .bind(): this.geocodeAddress = function geocodeAddress(location) { // I have full access to this.zoom, this.center etc. here var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': location }, function (results, status) { // this.zoom, this.center etc. are inaccessible here and return undefined. if (status == google.maps.GeocoderStatus.OK) { this.map.setCenter(results[0].geometry.location); this.addMapMarker({ center: results[0].geometry.location, draggable: true, title: location }); } else { alert('Could not find the address entered'); } }.bind(this)); }
has comment: http://stackoverflow.com/comment/41441134
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26394404
has comment: http://stackoverflow.com/comment/41441416

http://stackoverflow.com/comment/41635525
score: 0
type: Comment
type: QuestionComment
has text: I agree with you and did it (i'm going to edit my post), but i need to have only one hexagonal clickable surface and to put image on it, and that's the hard point for me.
comment on: http://stackoverflow.com/q/26467692

http://stackoverflow.com/comment/41592391
type: QuestionComment
has text: I think that the backend code is not even being called right? You have a set of issues in your code. First thing to do is to call the page it self and not the source code, remove the `.vb` extension...
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26477597

http://stackoverflow.com/comment/48083552
has text: I would just wrap the http request in a service. Basically, before the call, you strip it, then it comes back down, you can add it back in a .then call.
comment on: http://stackoverflow.com/q/26387868
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26454498
has answer: http://stackoverflow.com/a/26454835
has comment: http://stackoverflow.com/comment/41550017
has body: I'm building an extension that will search a web page for a particular piece of text and insert a tiny photo after the text. If the text is contained within a div tag, these seems fairly easy. Simply use the following: :contains(text) However, if the text spans multiple div tags, I'm a little perplexed as to how to proceed...Perhaps I can iteratively search?
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41549897
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26454565
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Search for text in web page that spans multiple div tags using javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/41464306
type: Comment
type: QuestionComment
has text: @ZaneZ - Client and server side code (ie javascript vs cfml/cfscript) are two different things. Javascript does not know anything about CF code. If you want to invoke CF code onChange, you need to use ajax to submit an http request to the CF server. That said, why not use a javascript function? If you search I am sure it has been done before ..
comment on: http://stackoverflow.com/q/26407015
score: 0

http://stackoverflow.com/q/26411024
score: 2
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26429168
has answer: http://stackoverflow.com/a/26494483
tagged with: angularfire
favorite count: 0
has title: Firebase/AngularFire performance issues causing page to become unresponsive? $watch at fault?
tagged with: angularjs
type: Question
upvote count: 2
answer count: 2
tagged with: firebase
has body: I've built a site with angularfire and I've noticed that as the site is left open it begins to lag and eventually freezes the browser. Is there a way I can trace this to the source to see what's causing it? It's very likely this double watch function but I can't seem to get the list to sort properly and repopulate when I change .start() and .end() parameters on my $firebase array. scope.$watch(function(){ scope.list.$watch(updateList); return scope.list; }, updateList); Seems to be related to the nesting. The following works much better. Can anyone please explain why I need to have two $watches setup? scope.list.$watch(updateList); scope.$watch(function(scope){ return scope.list; }, updateList);

http://stackoverflow.com/comment/41491567
type: Comment
score: 2
has text: What does "I can't get the JS to load" mean? Do you have any errors in the console (F12)? Have you done any basic debugging?
comment on: http://stackoverflow.com/q/26423128
type: QuestionComment

http://stackoverflow.com/q/26396443
has body: Ok, I make a simple app in C# that worked ok, alot of things didn't work right because it required me to click javascript links. So started another project and this time I used webkit, everything function perfect after the switch except one item. I need some assistance repairing this to work with webkit because it is the main function of my app. I have never used webkit before I don't know where to start. private void timer2_Tick(object sender, EventArgs e) { HtmlElementCollection elems = web.Document.GetElementsByTagName("a"); foreach (HtmlElement elem in elems) { String value = elem.GetAttribute("value"); if (elem.InnerText == "Recruit") { elem.InvokeMember("click"); } } } Before the switch this worked, Now I have a error: Error 3 Cannot implicitly convert type 'WebKit.DOM.NodeList' to 'System.Windows.Forms.HtmlElementCollection' C:\Users\Mass\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs 48 43 WindowsFormsApplication1 Any help would be greatly appreciated. Also I need to keep it as is with GetElementsByTagName I cannot switch to GetElementbyId. Edit: to any who may find this helpful, The last set of errors I had had to do with innertext. after reading webkit documents I fount that it does not use inner text but TextContent. //Looks for the value of the tag String value = ele.GetAttribute("value"); //If innertext = value perform click if (ele.TextContent == "Recruit") { //invoke a click here }
answer count: 1
has title: Webkit and C# Repair script
has comment: http://stackoverflow.com/comment/41444750
has comment: http://stackoverflow.com/comment/41444881
has comment: http://stackoverflow.com/comment/41444992
has comment: http://stackoverflow.com/comment/41445005
has comment: http://stackoverflow.com/comment/41447091
has comment: http://stackoverflow.com/comment/41447030
has comment: http://stackoverflow.com/comment/41444579
tagged with: c#
has comment: http://stackoverflow.com/comment/41444533
downvote count: 0
has comment: http://stackoverflow.com/comment/41444670
tagged with: javascript
has comment: http://stackoverflow.com/comment/41446982
tagged with: webkit
has comment: http://stackoverflow.com/comment/41444747
has answer: http://stackoverflow.com/a/26396867
accepted answer: http://stackoverflow.com/a/26396867
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41444912
score: 1
has comment: http://stackoverflow.com/comment/41447173
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41444540
has comment: http://stackoverflow.com/comment/41444504
upvote count: 1

http://stackoverflow.com/q/26468951
upvote count: 1
linked to: http://stackoverflow.com/q/2846283
type: Question
has comment: http://stackoverflow.com/comment/41575753
accepted answer: http://stackoverflow.com/a/26469000
has title: Do parentheses prevent semicolon insertion?
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41575655
possible better answer: http://stackoverflow.com/a/26469203
has answer: http://stackoverflow.com/a/26469000
has comment: http://stackoverflow.com/comment/41579522
has answer: http://stackoverflow.com/a/26469203
tagged with: automatic-semicolon-insertion
type: AnsweredQuestion
tagged with: line-breaks
has body: Say that I want to set a bunch of variables equal to null (and don't want to use an array/loop structure) or maybe I just want to write a large boolean expression across multiple lines. Does an unclosed parenthetical prevent semicolon insertion in such a case? E.g. some_variable = another_variable = yet_another_variable = ( oh_look_a_parenthesis_above_me = hey_heres_another_variable) = ( and_for_some_reason_another = last_one) = null; Or if(test_for_some_complex_expr &amp;&amp; another_test || ( but_maybe_this_one &amp;&amp; or_this_one)) { // ... } And how does this compare versus using &amp;&amp; or || or = to group expressions over line breaks? I.e., would this always work too? some_variable = another_variable = a_variable_after_a_line_break = and_one_more; while(test_for_an_expr &amp;&amp; another_test || (an_expr_here &amp;&amp; and_an_expr_here)) { // ... } I'm looking for the way that is most standard across all browsers (including IE6+).

http://stackoverflow.com/comment/41416448
score: 0
has text: What kind of thing is `imageObj` inside `initializeImages()` ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26376406

http://stackoverflow.com/a/26445580
answers question: http://stackoverflow.com/q/26445537
accepted answer of: http://stackoverflow.com/q/26445537
has body: The reason for this is that the log is renewed for every request (in case of Chrome browser) and as you are setting the console.log to be fired onsubmit the log is logged but will be cleared immediately Check the checkbox Preserve Log in the console of Chrome.
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41533790
type: Answer

http://stackoverflow.com/comment/41512196
score: 1
has text: just a semantic for referencing what is expected to be a constant, similar to naming private methods with an underscore.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26418099

http://stackoverflow.com/comment/41629858
comment on: http://stackoverflow.com/q/26480006
score: 0
type: QuestionComment
type: Comment
has text: I put a little effort into reproducing your situation and failed: http://plnkr.co/edit/1ajiLzoeb2yJaA1YxRG8?p=preview (everything seems ok). You'll need to reproduce it for further help.

http://stackoverflow.com/comment/41373757
score: 0
type: Comment
type: QuestionComment
has text: @bitoiu IE9, Firefox 32.0.1 and Chrome 37.0.2062.120. I have no idea what JSPerf is or how to use it I'm afraid.
comment on: http://stackoverflow.com/q/26357225

http://stackoverflow.com/a/26411144
has comment: http://stackoverflow.com/comment/41470401
downvote count: 0
answers question: http://stackoverflow.com/q/26410911
type: Answer
score: 1
upvote count: 1
has body: Something like var maxHeight = S.map($) .reduce(function(prev,curr){ return Math.max(prev,curr.height()); },0); $(S.join(",")).height(maxHeight); or var q=$(S.join(",")); q.height( q.toArray().reduce(function(prev,curr){ return Math.max(prev,curr.height()); },0));

http://stackoverflow.com/comment/41586528
score: 0
type: Comment
type: QuestionComment
has text: @charlietfl True and agreed, but for the sake of this question, can we assume that readability, code /file size etc. is irrelevant? I'd like to focus purely on the efficiency - the mechanics if you will - of the code this time. Cheers. I've edited the question in response.
comment on: http://stackoverflow.com/q/26474400

http://stackoverflow.com/comment/41389974
type: Comment
score: 3
comment on: http://stackoverflow.com/q/26366195
has text: Could you reveal part of that JSON? we could write a customized filter
type: QuestionComment

http://stackoverflow.com/comment/41501417
has text: Just check if the value of the textbox is null before pushing it. The model is completely redone after each keystroke, so if you don't push it again it won't show up. I can edit my answer to show it if you like.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26428010
score: 1

http://stackoverflow.com/q/26415188
has title: CasperJS/PhantomJS doesn't load https page
has body: I know there are certain web pages PhantomJS/CasperJS can't open, and I was wondering if this one was one of them: https://maizepages.umich.edu. CasperJS gives an error: PhantomJS failed to open page status=fail. I tried ignoring-ssl-errors and changing my user agent but I'm not sure how to determine which ones to use. All I'm doing right now is the basic casper setup with casper.start(url, function () { ... }) where url=https://maizepages.umich.edu;
favorite count: 0
tagged with: casperjs
downvote count: 0
tagged with: web-scraping
type: Question
tagged with: phantomjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41485812
linked to: http://stackoverflow.com/q/12021578
tagged with: ssl
score: 24
accepted answer: http://stackoverflow.com/a/26419531
answer count: 1
linked to: http://stackoverflow.com/q/26530934
upvote count: 24
tagged with: javascript
has answer: http://stackoverflow.com/a/26419531

http://stackoverflow.com/a/26408048
has comment: http://stackoverflow.com/comment/54821141
has comment: http://stackoverflow.com/comment/54807163
answers question: http://stackoverflow.com/q/26391195
has comment: http://stackoverflow.com/comment/54820932
has comment: http://stackoverflow.com/comment/41472100
upvote count: 53
type: AcceptedAnswer
downvote count: 0
score: 53
has comment: http://stackoverflow.com/comment/43228579
type: Answer
has comment: http://stackoverflow.com/comment/41489273
has comment: http://stackoverflow.com/comment/83830254
has body: First: Features don't fire clicks! For information on the events features do fire, check http://openlayers.org/en/master/apidoc/ol.Feature.html. For checking if a feature did get clicked, there is the .forEachFeatureAtPixel(pixel, callback) function of ol.Map. ( http://openlayers.org/en/master/apidoc/ol.Map.html#forEachFeatureAtPixel ) The callback is executed on every feature at the pixel. The callback gets passed 2 arguments: the feature and the layer the feature is in. Good to know is the .getEventPixel(event) function, if you don't work with openlayers event handlers but with handlers on the viewport. If your using openlayers eventhandler, the event has a property .pixel. (http://openlayers.org/en/master/apidoc/ol.Map.html#getEventPixel) The methods .getEventCoordinate(event) and .getCoordinateFromPixels(pixels) might be useful, too. So you would add it like this to your map.on("click", ... : map.on("click", function(e) { map.forEachFeatureAtPixel(e.pixel, function (feature, layer) { //do something }) }); Same thing with jQuery: $(map.getViewport()).on("click", function(e) { map.forEachFeatureAtPixel(map.getEventPixel(e), function (feature, layer) { //do something }); }); Same thing with pure JS: map.getViewport().addEventListener("click", function(e) { map.forEachFeatureAtPixel(map.getEventPixel(e), function (feature, layer) { //do something }); }); You might also want to check this example, there are two uses of this function, first with openlayers events, the second with jQuery events: http://openlayers.org/en/master/examples/icon.js Note There is also the possibility to do this with an ol.interaction.Select (http://openlayers.org/en/master/apidoc/ol.interaction.Select.html?unstable=true), but this is a little bit overpowered for this case. And it has some unintuitive caveats caused by openlayers internally moving the selected features to another so called unmanaged layer. Anyhow this works by adding a listener to the collection belonging to the interaction. …
has comment: http://stackoverflow.com/comment/41496765
accepted answer of: http://stackoverflow.com/q/26391195
has comment: http://stackoverflow.com/comment/83786853

http://stackoverflow.com/q/26402437
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/41454356
has comment: http://stackoverflow.com/comment/41463589
type: UnansweredQuestion
has body: The table contains a few rows like that: I need to disable 'graduations' being checked if 'indicator' is not checked. And if checked, i need to check exactly two 'graduations' in that row. My actual code only limits the number of checked 'graduations'. $(function() { $('input[name=graduations\\[\\]]').click(function() { if($(this).parent().siblings().children("input[name=graduations\\[\\]]:checkbox:checked").length >= 2) this.checked = false; }); });
has title: If a checkbox is selected, select two others
downvote count: 1
score: -1
has answer: http://stackoverflow.com/a/26402709
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26402585
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41527036
comment on: http://stackoverflow.com/a/26441920
score: 1
type: AnswerComment
has text: @Nakul case-insensitive is not applied, so it is not a problem
type: Comment

http://stackoverflow.com/q/26356839
duplicate of: http://stackoverflow.com/q/25671760
tagged with: promise
has answer: http://stackoverflow.com/a/26356932
accepted answer: http://stackoverflow.com/a/26356932
type: AnsweredQuestion
tagged with: angular-promise
linked to: http://stackoverflow.com/q/25671760
type: Question
has title: JavaScript: wait for every asynchronous call finished
tagged with: underscore.js
score: 0
has body: I'm trying to load data from multiple sources and want to continue processing only after all data being loaded. Here is my code: var tables = []; $http .get('/tables') .then(function (response) { _.each(response.data, function (table) { tables.push(table); }); }) // get detail data .then(function () { _.each(tables, function (table) { $http.get('/tables/' + table) .success(function (data) { process(data); }); }); }) .then(function () { // after everything loaded // run this function }); Thanks for your help!
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41463508
score: 0
type: AnswerComment
has text: I'm not so sure about Schema.objectId, I haven't looked at it in that way it may worth to try it out anyway, probably one reason could be the id not being in the right format as an example when you pass an id as a string you have to do an explicit cast to object id otherwise you're not going to find the value
type: Comment
comment on: http://stackoverflow.com/a/26406710

http://stackoverflow.com/a/26512910
score: 0
answers question: http://stackoverflow.com/q/26511582
type: Answer
has body: I believe a promise is returned on a resource query. Try this: Stuff.query(function(response) { response[0].$getThings(function(things) { $scope.things = things; ); }); Or: Stuff.query() .$promise .then(function(stuff) { $scope.stuffs = stuff; return stuff[0].$getThings(); }) .then(function(things) { $scope.things = things; });

http://stackoverflow.com/comment/41649410
comment on: http://stackoverflow.com/a/26509493
type: Comment
has text: Yeah good try, I tried something similar to that earlier, unfortunately it's not being triggered. I even tried using sub-pub and triggering an event within the collectionView. It seems the only thing that works is sub-pub within the itemView, but it gets called for each message lol.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41650903
score: 0
type: Comment
type: QuestionComment
has text: How is it working well? do you see the drop down box? It's not showing pages numbers if you click it.. It should display 3 items per page but it isn't.
comment on: http://stackoverflow.com/q/26509720

http://stackoverflow.com/comment/41486469
has text: Regarding your update: **Never** build json-strings by hand. Allways build a valid php data structure and use json_encode only once.
score: 1
comment on: http://stackoverflow.com/q/26419711
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26370275
accepted answer of: http://stackoverflow.com/q/26370197
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26370197
has body: You need to build those elements individually and append them after you've already operated on them: foreach(element) { var anchor = $("&lt;a href='" + element +"'&gt;"); var header = $('&lt;h4&gt;').text('stuff'); var p = $('&lt;p&gt;').text('More stuff'); anchor.append(header).append(p); $("#ul").append(anchor); }
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26365684
score: 0
type: Answer
has body: Well, that's what a submit button does :) You can override this behavior by preventing the default behavior of the event when handling the submit event of the form: $("#login").submit(function(e) { e.preventDefault(); // the rest of the code }); Ideally, in order to achieve graceful degradation, the submit button (and the form in general) should still perform the necessary actions for the application by way of posting the form and reloading the page. So the form should have an action which invokes the server-side operation being invoked. Then the JavaScript code would override that behavior (using the above method) and provide a more UX-friendly AJAX approach to the operation being invoked. Both should work, so that JavaScript isn't required in order to use the application.
answers question: http://stackoverflow.com/q/26365619

http://stackoverflow.com/comment/41463194
score: 0
type: Comment
has text: @narzero I'm not sure if you're utilizing these methods (assumptions from your example given) but with the method getCart you could do `Shopify.getCart(function(cart) { $('body').append(template(cart)); });`
comment on: http://stackoverflow.com/a/26406103
type: AnswerComment

http://stackoverflow.com/comment/66020008
score: 0
type: Comment
comment on: http://stackoverflow.com/a/37997286
type: AnswerComment
has text: Or it may be legacy code. Or, god forbid, it may be `eval()`ed through string concatenation, or whatever. You missed the point. The point is hooking into library functions is a broadly useful debugging feature, it should be easy. Digging through arbitrary amounts of unfamiliar code isn't easy.

http://stackoverflow.com/a/26422758
has comment: http://stackoverflow.com/comment/41491454
has comment: http://stackoverflow.com/comment/41492388
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41492569
score: 0
has comment: http://stackoverflow.com/comment/41491183
has comment: http://stackoverflow.com/comment/41490957
has body: You can achieve this by using jQuery. Include jQuery in your project by putting this in your &lt;head&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; Then, at the end of the file: &lt;script&gt; $('#texttwo').keyup(function(){ var textone; var texttwo; textone = parseFloat($('#textone').val()); texttwo = parseFloat($('#texttwo').val()); var result = textone + texttwo; $('#result').val(result.toFixed(2)); }); &lt;/script&gt; This will give you the result when ever you change the value of the second box. You will need to do this, too: Change &lt;input type=text name=value1&gt; &lt;input type=text name=value2&gt; &lt;input type=text name=result&gt; to: &lt;input type="text" name="value1" id="textone"&gt; &lt;input type="text" name="value2" id="texttwo"&gt; &lt;input type="text" name="result" id="result"&gt; EDIT This is my entire file: &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="text" name="value1" id="textone"&gt; &lt;input type="text" name="value2" id="texttwo"&gt; &lt;input type="text" name="result" id="result"&gt; &lt;script&gt; $('#texttwo').keyup(function(){ var textone; var texttwo; textone = parseFloat($('#textone').val()); texttwo = parseFloat($('#texttwo').val()); var result = textone + texttwo; $('#result').val(result.toFixed(2)); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41491540
has comment: http://stackoverflow.com/comment/41491001
accepted answer of: http://stackoverflow.com/q/26422548
has comment: http://stackoverflow.com/comment/41491633
has comment: http://stackoverflow.com/comment/41491266
type: Answer
answers question: http://stackoverflow.com/q/26422548
has comment: http://stackoverflow.com/comment/41491360

http://stackoverflow.com/q/26463398
has title: small logical issue in this jquery code: "load" more pages with jquery
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/26463648
type: Question
tagged with: javascript
has body: I have many article divs in news index page where each div contains a single news teaser. I want to show first 10, then during scrolling down and reaching the bottom, i will show the another 10 etc etc.. this is my js. $(function () { shown = 0; $('.artikel').hide(); $('.artikel').each(function () { if (shown &lt;= 10) { shown += 1; $(this).show(); } }); $(window).scroll(function () { if ($(window).scrollTop() + $(window).height() == $(document).height()) { setTimeout(function () { // problem here. $('.artikel').each(function () { if (shown &lt;= 20) { shown += 1; $(this).show(); } }); }, 1500); } }); }); the problem in my logic is, once i scroll to bottom, the function inside setTimeOut is counting all articles again from beginning. I want that it shows the next 10 news beginning from the last shown article. can someone give a small help with this please?
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26463648
has comment: http://stackoverflow.com/comment/41565472
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26378569
has comment: http://stackoverflow.com/comment/41412694
tagged with: javascript
type: Question
score: 0
has body: I'm trying to change the text within a P tag from an external PHP file. Is there someway I can use innerHTML? currently this is the line of code I'm trying to use but it doesn't seem to work echo ' '; I tried just doing document.getElementById("response").innerHTML = "test"; However it also doesn't seem to work, I also tried the echo without the script tags
answer count: 2
has comment: http://stackoverflow.com/comment/41412397
has answer: http://stackoverflow.com/a/26378720
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: innerHTML in external PHP file
type: UnansweredQuestion
tagged with: innerhtml
has comment: http://stackoverflow.com/comment/41412359
has answer: http://stackoverflow.com/a/26378622

http://stackoverflow.com/a/26495015
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26494725
type: Answer
answers question: http://stackoverflow.com/q/26494725
has comment: http://stackoverflow.com/comment/41645728
downvote count: 0
score: 1
has body: You can use the traversing methods of jquery and use them to target the elements you want $("time.overdue").each(function(){ // for each time that has overdue class var time = $(this).attr('datetime'); // store its datetime value $("a.cal-evt").filter(function(){ // find all the cal-evt links that contain the same time return $('time', this).attr('datetime') == time; }).addClass("red"); // apply the red class on the filtered items }); Demo at http://jsfiddle.net/qk79jgL4/9/

http://stackoverflow.com/comment/43664508
type: QuestionComment
has text: @Mushi, have you make usage of the code I shared with you ? In case please mark my answer as accepted
comment on: http://stackoverflow.com/q/26509625
score: 0
type: Comment

http://stackoverflow.com/comment/41722180
type: AnswerComment
comment on: http://stackoverflow.com/a/26494070
score: 0
type: Comment
has text: Whops, 3!^(2!) Error can you help me please?

http://stackoverflow.com/comment/41566406
comment on: http://stackoverflow.com/a/26463968
type: AnswerComment
score: 0
type: Comment
has text: i want using the variable userName and not the string userName

http://stackoverflow.com/comment/41577904
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26413410
type: Comment
has text: Crayon, thanks.. best answer I've had on Stack Overflow

http://stackoverflow.com/comment/41610869
type: Comment
type: QuestionComment
score: 0
has text: You need to use dynamic environment maps. What you do is you render to a texture each frame, grab the image and apply it as an environment map to your objects. Two passes are required. You would need to use the WebGLRenderTarget renderer.
comment on: http://stackoverflow.com/q/26487858

http://stackoverflow.com/comment/41444063
comment on: http://stackoverflow.com/a/26375210
has text: Ok! if you made it then please post the code for others to see :)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26436090
has comment: http://stackoverflow.com/comment/41516834
tagged with: javascript
has body: Im making a like system and am encorporating ajax to make it smooth. Everything works okay except it always defaults to the last post in for loop. My thinking is there is no way for the javascript to know which element of id "like" to post to. main.js: $(".like&gt;a").click(function() { $.post(base_url + "index.php/userprofile/like_post/", { post : post }, function(data) { alert('liked'); }, "json"); return false; }); Im passing through the post variable from the view file. I grab the postID of each post. userprofile_view.php: &lt;?php foreach ($posts as $post) { ?&gt; &lt;?php $postID = $this-&gt;model_posts-&gt;getPostData('id', $post-&gt;post); ?&gt; &lt;script type="text/javascript"&gt; var post = "&lt;?php echo $postID; ?&gt;"; var base_url = "&lt;?php echo base_url(); ?&gt;"; &lt;/script&gt; model_posts.php: function likePost($post) { $data['user_ID'] = $this-&gt;session-&gt;userdata('id'); $data['post_liked'] = $post; $insert = $this-&gt;db-&gt;insert('user_post_likes', $data); return $insert; } userprofile.php(controller): public function like_post() { $this-&gt;load-&gt;model('model_posts'); $post = $this-&gt;input-&gt;post('post'); $this-&gt;model_posts-&gt;likePost($post); } If someone couldhelp me out that would be great!
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26436222
tagged with: jquery
has comment: http://stackoverflow.com/comment/41516904
tagged with: ajax
has answer: http://stackoverflow.com/a/26436169
type: Question
has comment: http://stackoverflow.com/comment/41516855
has comment: http://stackoverflow.com/comment/41516879
tagged with: php
possible better answer: http://stackoverflow.com/a/26436169
has title: AJAX- getting a specific array value in post
has comment: http://stackoverflow.com/comment/41516860
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41516905
has answer: http://stackoverflow.com/a/26436222
has answer: http://stackoverflow.com/a/26436171

http://stackoverflow.com/q/26508333
upvote count: 1
type: Question
tagged with: javascript
has title: D3 data binding with slider and play/pause
has comment: http://stackoverflow.com/comment/41671425
downvote count: 0
favorite count: 0
has body: I am looking to implement a map with a 'play/pause' feature that will overlay items as the time scale progresses. However, I also wanted to give users the ability to set the time themselves. Very similar to Mike's work here Any ideas on the best way to implement this? I would like to avoid html element sliders because of a lack of styling options (as far as filling up the bar with different colors, it gets messy overlaying SVG). There is also d3.slider (independent open source on git), but the documentation is lacking. Is using a brush handler the best option? Thank you!
tagged with: d3.js
type: UnansweredQuestion
tagged with: slider
tagged with: http://stackoverflow.com/tag/html
tagged with: data-binding
answer count: 0
score: 1

http://stackoverflow.com/comment/41638110
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26503202
has text: *"i can't modify my source"* Huh? Sorry, that requires explanation. As far as I can tell, this is a simple duplicate of the question you've linked to.
score: 0

editorformodel
tags question: http://stackoverflow.com/q/26392852
type: Tag
tag name: editorformodel

http://stackoverflow.com/a/26372362
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41401581
accepted answer of: http://stackoverflow.com/q/26372310
answers question: http://stackoverflow.com/q/26372310
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: Define the total outside and increment it inside. data = []; total = { expire : 0, target: 0, quoted: 0 }; $('tr.count').each(function(i) { var self = $(this), expire = self.find('td:nth-of-type(2) input').val(), target = self.find('td:nth-of-type(3) input').val(), quoted = self.find('td:nth-of-type(4) input').val(); data[i] = { expire : expire, target : target, quoted : quoted, }; total.expire += expire; total.target += target; total.quoted += quoted; });

http://stackoverflow.com/comment/41400805
comment on: http://stackoverflow.com/a/26371956
has text: your this point `For an array, insertion is O(n) to find the right location and then O(n) to insert because you need to push everything down. For a linked list, it would be O(n) to find the location and then O(n) to insert because you only have to adjust pointers.` is a bit confusing. `O(n)` is for both linked list and array finding right location and insertion? O(n) for both? Could you please elaborate?
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41491151
has text: And just so you know, you wouldn't be able to handle any `key` `event` in an element unless it's actually `focused`. So you can actually ignore the `focus` handling.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26422462
type: QuestionComment

http://stackoverflow.com/q/26410464
has title: Javascript - how do i check if the movie is finished? while using jQuery and other third party libraries?
score: 0
answer count: 1
has body: I have some third party library and jQuery now using Javascript i need to detect if any video is playing and ended as event listener. I tried following but its not working: $(document).ready(function() { if(InitialiseDocReadyScripts()) { console.log('Initialised Document Ready Scripts Successfully'); } else { console.log('Failed to Initialise Document Ready Scripts'); } var play_video = document.getElementById('mediaplayer'); play_video.onended = function(e) { console.log('&gt;&gt;&gt; Playing finished: ', e); }; });
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26410659
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41469316
tagged with: google-chrome
type: Question
accepted answer: http://stackoverflow.com/a/26410659
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41507342
type: Comment
has text: onclick method probably executed after onsubmit method.
score: 0
comment on: http://stackoverflow.com/a/26430756
type: AnswerComment

http://stackoverflow.com/a/26505580
has comment: http://stackoverflow.com/comment/41657466
type: Answer
has comment: http://stackoverflow.com/comment/41644787
has body: response is the result passed BY php, not TO php. What's passed to php is the id and the task. In your tab.php, you can access these two values : &lt;?php $id = $_POST['id']; $task = $_POST['task']; //do anything you want with it... ?&gt;
has comment: http://stackoverflow.com/comment/41642033
score: 0
answers question: http://stackoverflow.com/q/26505516

http://stackoverflow.com/q/26416253
tagged with: extjs
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26416408
has body: I am trying add ellipsis to a item created by ExtJS. I just want to add to this item, thus I don't want to add extra things .css file. I found out there is "style" parameter that takes in css styles and tried. style: { 'overflow: hidden; text-overflow: ellipsis;' }, but this gives me a compilation error. I found out style: {"background-color": 'red' }, works, but I can't figure out how to add a second css style to the same element. What is the correct way to add more style to the same item? Thanks!
has title: Add multiple style elements for an item in ExtJS
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26416408
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41519403
has text: I clicked on the plunker link, saw the 'E' directive declared in the HTML, moused over it, and the background color changed to red. Am I missing something?
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26437518
type: Comment

http://stackoverflow.com/a/26362434
has body: make a new file logut.php and put this code into it session_destroy(); unset($_SESSION['adminname']); header('location:login.php');
type: Answer
has comment: http://stackoverflow.com/comment/41382733
has comment: http://stackoverflow.com/comment/41383684
score: 0
answers question: http://stackoverflow.com/q/26362306

http://stackoverflow.com/q/26482227
tagged with: model-view-controller
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26482805
type: Question
tagged with: frameworks
has comment: http://stackoverflow.com/comment/41600504
tagged with: javascript
score: 0
has title: Subviews for elements in AngularJS
answer count: 1
has answer: http://stackoverflow.com/a/26482805
has body: I want to have an single-page App (AngularJS) with following views: Login Main View Now the Main-View should have different "elements": - Toolbar - Main Content Div - 2 Sidebars Can I handle all this elements as a subview? I would like to have a .html Template for each of these "elements". Thank you very much!
tagged with: angularjs
tagged with: single-page-application

http://stackoverflow.com/q/26379767
tagged with: jquery
has answer: http://stackoverflow.com/a/26380048
has comment: http://stackoverflow.com/comment/41416240
tagged with: ajax
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41414829
has body: I've got the following div: The following javascript with the ajax call does return 0 as data. It doesn't however add the html content to the div when I put the code in the .done part of the ajax call. When i put that code at the start of the javascript the progress bar appears with 45% of the bar filled. $("#ipaddress_form").submit(function(e) { var ipjs = $("#input_ipaddress").val(); var hostjs = $("#input_hostname").val(); var commjs = $("#input_comms").val(); $.ajax({ url: "include/handlingJS.inc.php", type: "POST", data: { "ipjs": ipjs, "hostjs": hostjs, "commjs": commjs } }).done(function(data) { alert(data); if(data == 0) { bar = $('#progress-bar'); bar.html(' 45% Complete '); } }); }); Is there something I missed?
has comment: http://stackoverflow.com/comment/41414583
type: Question
has answer: http://stackoverflow.com/a/26381043
tagged with: javascript
has comment: http://stackoverflow.com/comment/41415399
has title: change div html content after Ajax done function
has answer: http://stackoverflow.com/a/26379957
score: 0
has comment: http://stackoverflow.com/comment/41414685
answer count: 3

http://stackoverflow.com/q/26451697
score: 15
upvote count: 15
has comment: http://stackoverflow.com/comment/41545944
has comment: http://stackoverflow.com/comment/41547043
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41545701
has answer: http://stackoverflow.com/a/26451730
has comment: http://stackoverflow.com/comment/41545795
has comment: http://stackoverflow.com/comment/41575221
type: AnsweredQuestion
has title: Why assign an IIFE to a variable?
has body: I've been using IIFE in JavaScript and in AngularJS and have been using the following structure: Method 1: //IIFE Immediately Invoked Function Expression (function () { }()); However, I've seen the following often where a variable is assigned to the IIFE Method 2: //IIFE Immediately Invoked Function Expression assigned to doStuff variable var doStuff = (function () { }()); NOTE: This question is NOT about what this pattern is or what an IIFE is. This is pertaining specifically to why one would use a return variable on an IIFE and its relation to Angular practices as well. In Angular Method 1 works fine, but in many of the raw JS examples I see, Method 2 is used. My assumption is that anything encasulated in doStuff will be avliable via it and callable. However, I'm not 100% sure on the exact reasoning or distinction between the 2 methods and need some help understanding when to use the different methods?
type: Question
accepted answer: http://stackoverflow.com/a/26451730
tagged with: javascript
linked to: http://stackoverflow.com/q/26092101

http://stackoverflow.com/q/26357856
type: Question
has title: Date conversion in grails inside javascript
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26358468
tagged with: grails
answer count: 3
has answer: http://stackoverflow.com/a/26360676
possible better answer: http://stackoverflow.com/a/26358468
tagged with: javascript
has body: I am creating one date field in my gsp by below code by using native grails date format: Delivery date: <g:datePicker name="myDate" date="${new Date()}" id="delDate" /> While catching the date by id in javascript, it is showing null. My code is as follows: var delDate=$('#delDate').val(); alert("date"+ deldate) is showing dateundefined. How can I get the date in string format so that further I can pass it to json as value. Thanks
score: 0
accepted answer: http://stackoverflow.com/a/26360676
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26358490

http://stackoverflow.com/comment/41519310
has text: @BibashAdhikari I don't know that, sorry. Idk what is the purpose of that function
comment on: http://stackoverflow.com/a/26437466
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26456916
has comment: http://stackoverflow.com/comment/41554513
downvote count: 0
has comment: http://stackoverflow.com/comment/41556763
has comment: http://stackoverflow.com/comment/41554344
has comment: http://stackoverflow.com/comment/41556665
score: 4
has comment: http://stackoverflow.com/comment/41556606
has comment: http://stackoverflow.com/comment/41557084
answers question: http://stackoverflow.com/q/26456746
has body: According to the documentation this function includes the script from given URL which needs to be accessible from the hosted page. Obviously your local path is not accessible on remote host (relative nor absolute) so you need to inject the script with injectJs instead. Edit: Here is the code I used for testing: var page = require('webpage').create(); page.open("http://ipecho.net/", function(status) { if ( status === "success" ) { if (page.injectJs("jquery.min.js")) { var h1 = page.evaluate(function() { return $("h1:eq(0)").css({fontSize: 10, color: "red"}).text(); }); console.log(h1); } } page.render("test.png"); phantom.exit(); }); The extra code can be also injected the same way as jquery and will work for sure. Remember about evaluate() limitations (but it is not really a big deal in this case): Note: The arguments and the return value to the evaluate function must be a simple primitive object. The rule of thumb: if it can be serialized via JSON, then it is fine. Closures, functions, DOM nodes, etc. will not work! Edit: Also about your filepath problem: check what is your working directory. Using relative paths can be tricky because of that so I suggest you to use absolute. webpage.libraryPath is all you need. I hope I helped you now.
type: Answer
upvote count: 4

http://stackoverflow.com/comment/41420118
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26382706
has text: You can pass `event` as a parameter instead of `this`. Then use `event.target` in your click handler function.
score: 0

http://stackoverflow.com/comment/41601507
has text: Via Angular controller let's say ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26477351

http://stackoverflow.com/q/26461578
type: UnansweredQuestion
has title: Changing webpage by math.random using cookies
tagged with: http://stackoverflow.com/tag/html
tagged with: cookies
has body: I am looking for a way to change webpage through a list without getting the same page twice. I have tried shuffling a list however when a new page is loaded it just reloads the script. So I guess I need to use some sort of cookie. However I am quite new to javascript. Can anyone please help me? I was thinking something like this, just with a cookie of some sort: var pages = ['sang1.html','sang2.html','sang3.html','sang4.html','sang5.html','sang6.html','sang7.html','sang8.html','sang9.html','sang10.html','sang11.html','sang12.html','sang13.html','sang14.html','sang15.html','sang17.html','sang18.html','sang19.html','sang20.html','sang21.html''sang22.html','sang23.html','sang24.html','sang25.html','sang26.html','sang27.html','sang28.html','sang29.html','sang30.html','sang31.html','sang32.html''sang33.html','sang34.html','sang35.html']; var page = Math.floor((Math.random() * pages.length) + 1); window.location.href = pages[page]; pages.splice(page);
type: Question
has comment: http://stackoverflow.com/comment/41562347
has answer: http://stackoverflow.com/a/26461790
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41562217
has answer: http://stackoverflow.com/a/26462664

http://stackoverflow.com/q/26446255
tagged with: arrays
downvote count: 0
has body: I would like to convert a JS array to a PHP array. I tried to send the value to the PHP page: var seatsReserved = []; function reserve(seat) { seat.setAttribute("class", "reserved"); var hasClass = seat.classList.contains('reserved'); if (hasClass) { seatsReserved.push(parseInt(seat.innerHTML)); $.post('../index.php', { 'seatsReserved': seatsReserved }); console.log(seatsReserved.sort(function(a, b) { return a - b })); } } However, when I run $seatsReserved = $_POST['seatsReserved']; I get this error: Notice: Undefined index: seatsReserved How can I correctly pass the array to PHP?
tagged with: javascript
linked to: http://stackoverflow.com/q/5035547
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/41535117
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/5035547
tagged with: php
has comment: http://stackoverflow.com/comment/41535146
has comment: http://stackoverflow.com/comment/41535130
score: 3
has comment: http://stackoverflow.com/comment/105037091
upvote count: 3
has comment: http://stackoverflow.com/comment/41535357
has comment: http://stackoverflow.com/comment/41535332
type: Question
has title: How do you convert a JS array into a PHP array?
has comment: http://stackoverflow.com/comment/41535380

http://stackoverflow.com/q/26446433
has answer: http://stackoverflow.com/a/26447954
answer count: 3
score: 2
has answer: http://stackoverflow.com/a/26450978
favorite count: 0
type: Question
upvote count: 2
tagged with: requirejs
has comment: http://stackoverflow.com/comment/41536701
has title: Is there a reason to nest require function calls?
has body: My company has some existing Javascript code that looks like this. require([pathA], function (A) { require([pathB], function (B) { // use A and B }); }); I have been told not to write the follow: require([pathA, pathB], function (A, B) { // use A and B }); What issues does this first form take care of. I'd really like to understand because sometimes I may have 6 dependencies and it seems a bit strange that I have to create 6 nested require functions!
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26450023

http://stackoverflow.com/q/26382485
has comment: http://stackoverflow.com/comment/41419431
has body: When viewing any of our product pages on a mobile, if you click the additional info tab the page scrolls to the bottom of the window. I've tried debugging this in the chrome developer tools by putting a breakpoint on a click event and on a scroll event, but I'm not sure if I'm debugging this properly? The browser breaks on jquery-1.7.2.min.js and in particular on the first few lines of this code block. if (!(a.nodeType === 3 || a.nodeType === 8 || !c || !d || !(h = f._data(a)))) { d.handler &amp;&amp; (p = d, d = p.handler, g = p.selector), d.guid || (d.guid = f.guid++), j = h.events, j || (h.events = j = {}), i = h.handle, i || (h.handle = i = function(a) { return typeof f != "undefined" &amp;&amp; (!a || f.event.triggered !== a.type) ? f.event.dispatch.apply(i.elem, arguments) : b }, i.elem = a), c = f.trim(I(c)).split(" "); for (k = 0; k &lt; c.length; k++) { l = A.exec(c[k]) || [], m = l[1], n = (l[2] || "").split(".").sort(), s = f.event.special[m] || {}, m = (g ? s.delegateType : s.bindType) || m, s = f.event.special[m] || {}, o = f.extend({ type: m, origType: l[1], data: e, handler: d, guid: d.guid, selector: g, quick: g &amp;&amp; G(g), namespace: n.join(".") }, p), r = j[m]; if (!r) { r = j[m] = [], r.delegateCount = 0; if (!s.setup || s.setup.call(a, e, n, i) === !1) a.addEventListener ? a.addEventListener(m, i, !1) : a.attachEvent &amp;&amp; a.attachEvent("on" + m, i) } s.add &amp;&amp; (s.add.call(a, o), o.handler.guid || (o.handler.guid = d.guid)), g ? r.splice(r.delegateCount++, 0, o) : r.push(o), f.event.global[m] = !0 } a = null } Any idea on what could be causing the page to scroll this way and how to fix it?
downvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41419750
has answer: http://stackoverflow.com/a/26383626
tagged with: google-chrome-devtools
type: Question
tagged with: debugging
answer count: 2
has comment: http://stackoverflow.com/comment/41420768
has comment: http://stackoverflow.com/comment/41420188
tagged with: javascript
tagged with: jquery
has title: What is causing page to scroll
favorite count: 0
has answer: http://stackoverflow.com/a/26385896
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/41657162
type: Comment
comment on: http://stackoverflow.com/q/26512831
has text: That did it. Don't know why, but now the script is showing up. If you want to add an answer to that effect I'll come back and accept it.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26491011
has title: Keep Dojo Select options-pane visible on click
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41621353
accepted answer: http://stackoverflow.com/a/26531640
score: 0
has body: The default behaviour for Dijit/Form/Select option is when you click it - it would close the options pane and assign the value to Select. I would like options-pane to stay visible even when you click any of it. So the pane would disappear only if you would click outside of it. How can I prevent options-pane from disappearing?
possible better answer: http://stackoverflow.com/a/26497593
has answer: http://stackoverflow.com/a/26497593
tagged with: dojo
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26531640
type: Question

http://stackoverflow.com/comment/41490022
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26421777
has text: http://stackoverflow.com/questions/487073/check-if-element-is-visible-after-scrolling
score: 0

http://stackoverflow.com/comment/41497752
score: 1
has text: Is the actual execution delayed or is all of the output just buffered until the code execution completes?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26426397

http://stackoverflow.com/q/26458104
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26458335
has title: How to change the flot bar fill and border color?
tagged with: http://stackoverflow.com/tag/json
tagged with: codeigniter
type: Question
tagged with: flot
tagged with: javascript
score: 0
answer count: 2
has body: I have created a user graph for my codeigniter project. The bar fill is set at the default. But I would like the BARS to change it so it looks like the bars on this image: http://www.riwakawebsitedesigns.com/offsite/images/userchart.PNG I echo the data from my controller. But just would like to know how to make bars and bar-border look like the image above. When I add these shadowSize: 0, colors: ['#9FD5F1', '#1065D2'], to the series bar it does not work. &lt;script type="text/javascript"&gt; $(document).ready(function () { var data = &lt;?php echo $data;?&gt;; $.plot($("#chart-user"), [data], { series: { bars: { shadowSize: 0, show: true, fill: true, //fillColor: '#9FD5F1' }, grid: { backgroundColor: '#FFFFFF', hoverable: true } } }); }); &lt;/script&gt;
has answer: http://stackoverflow.com/a/37454663

http://stackoverflow.com/q/26406188
accepted answer: http://stackoverflow.com/a/26406320
tagged with: jquery
has comment: http://stackoverflow.com/comment/41461246
has title: What is the right way of organizing JQuery and other plugins?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26406352
has comment: http://stackoverflow.com/comment/41461051
type: AnsweredQuestion
upvote count: 2
score: 0
possible better answer: http://stackoverflow.com/a/26406352
downvote count: 2
has answer: http://stackoverflow.com/a/26406320
type: Question
has comment: http://stackoverflow.com/comment/41461272
has body: I have an HTML that uses Jquery. Let's say in the I call to them. My question is. What will be the effect of this? Will calling jquery again disable the plugin (jquery.jshowoff)? Will the browser only be able to read jquery.min and not the plugin? I hope this is clear enough if so, I can be extra clear. Thank you.
tagged with: javascript
linked to: http://stackoverflow.com/q/2731897
answer count: 2

http://stackoverflow.com/comment/41438626
has text: I get this warning for the first line: Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26392280
score: 2

http://stackoverflow.com/comment/41596640
comment on: http://stackoverflow.com/q/26480092
score: 0
type: QuestionComment
type: Comment
has text: @Regent well it still might be called event handler. I just want to make clear that it is not attached multiple times. I also would highly suggest not to use `onclick=""` in production code.

http://stackoverflow.com/q/26409643
has answer: http://stackoverflow.com/a/26410086
has title: How to loop a CSS3 fill up animation?
has body: I so far managed to make it so that on hover the background goes from blue to red, but I want it to loop red over blue, then blue over red, then red over blue etc. http://jsfiddle.net/rfnslyr/1z14hwo5/ html &lt;div class="preloader"&gt;&lt;/div&gt; css .preloader { background: #ff0000; height: 100px; width: 100px; background: linear-gradient(to top, red 50%, blue 50%); background-size: 100% 200%; background-position:top; transition:all 2s ease; } .preloader:hover { background-position:bottom; }
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26410086
possible better answer: http://stackoverflow.com/a/26409769
has answer: http://stackoverflow.com/a/26409823
has answer: http://stackoverflow.com/a/26409769
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0
answer count: 3

http://stackoverflow.com/q/26476347
linked to: http://stackoverflow.com/q/2485423
type: UnansweredQuestion
has title: How come no 'var' needed inside js function?
duplicate of: http://stackoverflow.com/q/2485423
answer count: 0
score: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41589785
has body: How come this works and returns 123 twice: function hello(){ hello123 = 123 console.log(hello123) } hello() console.log(hello123) How come I don't need to declare the variable hello123 with var How come the variable persists outside the function? Is that because it's declared on window with the function being part of that scope? Thanks
has comment: http://stackoverflow.com/comment/41589865

http://stackoverflow.com/comment/41570621
type: Comment
type: QuestionComment
score: 1
has text: Please post your layout code
comment on: http://stackoverflow.com/q/26466157

http://stackoverflow.com/comment/41544694
type: AnswerComment
has text: Yes this last one is the best. Can you put that in your answer above?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26450799

http://stackoverflow.com/comment/41396583
type: QuestionComment
score: 0
has text: You can redirect via the client
comment on: http://stackoverflow.com/q/26369674
type: Comment

http://stackoverflow.com/comment/41537984
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26447862
score: 0
has text: I don't know what you are attempting to do. But it is highly likely that is not the way to do it.

http://stackoverflow.com/a/26414427
downvote count: 9
score: 52
answers question: http://stackoverflow.com/q/26402534
type: Answer
has body: I haven't used Angular, but reading the link above, it seems that you're trying to code for something that you don't need to handle. You make changes to state in your React component hierarchy (via this.setState()) and React will cause your component to be re-rendered (effectively 'listening' for changes). If you want to 'listen' from another component in your hierarchy then you have two options: Pass handlers down (via props) from a common parent and have them update the parent's state, causing the hierarchy below the parent to be re-rendered. Alternatively, to avoid an explosion of handlers cascading down the hierarchy, you should look at the flux pattern, which moves your state into data stores and allows components to watch them for changes. The Fluxxor plugin is very useful for managing this.
upvote count: 61
has comment: http://stackoverflow.com/comment/69549399
has comment: http://stackoverflow.com/comment/62156155
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/123027243
accepted answer of: http://stackoverflow.com/q/26402534
has comment: http://stackoverflow.com/comment/126358475

http://stackoverflow.com/comment/41696171
comment on: http://stackoverflow.com/a/26421641
score: 0
type: AnswerComment
type: Comment
has text: I think maybe I don't fully understand what is involved in the `reset` then. Doesn't it clear out the collection so it has a total Model count of 0?

http://stackoverflow.com/q/26445145
has comment: http://stackoverflow.com/comment/41533344
has comment: http://stackoverflow.com/comment/41533505
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41533333
has body: Im trying to get 2 different Ajax results to display dynamically on a browser game Im building. I have the php files and the proper divs set. When I run this script, It only shows one of the values. I need the dayofweek, and hourofday to display on the same webpage. Javascript Only no Jquery - The Ajax - Couldnt get to work so went with Jquery in answer at bottom! var xmlHttp = createXmlHttpRequestObject(); var xmlHttp2 = createXmlHttpRequestObject(); function createXmlHttpRequestObject(){ var xmlHttp; if(window.ActiveXObject){ try{ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ xmlHttp = false; } }else{ try{ xmlHttp = new XMLHttpRequest(); }catch(e){ xmlHttp = false; } } if(!xmlHttp) alert("cant create that object hoss!"); else return xmlHttp; } function hourofday(){ if(xmlHttp.readyState==0 || xmlHttp.readyState==4) { hourofday = encodeURIComponent(document.getElementById("hourofday").value); xmlHttp.open("POST", "hourofday.php", true); xmlHttp.onreadystatechange = handleServerResponse; xmlHttp.send(null); setTimeout('hourofday()',1000); } } function dayofweek(){ if(xmlHttp2.readyState==0 || xmlHttp2.readyState==4) { dayofweek = encodeURIComponent(document.getElementById("dayofweek").value); xmlHttp2.open("POST", "dayofweek.php", true); xmlHttp2.onreadystatechange = handleServerResponse2; xmlHttp2.send(null); setTimeout('dayofweek()',1000); } } function handleServerResponse(){ if(xmlHttp.readyState==4){ if(xmlHttp.status==200){ xmlResponse = xmlHttp.responseXML; xmlDocumentElement = xmlResponse.documentElement; time = xmlDocumentElement.firstChild.data; document.getElementById("hourofday").innerHTML = time; }else{ alert('Something went wrong.'); } } } function handleServerResponse2(){ if(xmlHttp2.readyState==4){ if(xmlHttp2.status==200){ xmlResponse = xmlHttp2.responseXML; xmlDocumentElement = xmlResponse.documentElement; day = xmlDocumentElement.firstChild.data; document.getElementById("dayofweek").innerHTML = day; }else{ alert('Something went wrong…
has comment: http://stackoverflow.com/comment/41533508
tagged with: javascript
has comment: http://stackoverflow.com/comment/41533559
has comment: http://stackoverflow.com/comment/41533066
tagged with: ajax
has comment: http://stackoverflow.com/comment/41533459
has title: Multiple Ajax Calls - 2nd Ajax Function Not Displaying PHP Results
has comment: http://stackoverflow.com/comment/41533430
has comment: http://stackoverflow.com/comment/41533588
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41533374
tagged with: php
has comment: http://stackoverflow.com/comment/41533319
has comment: http://stackoverflow.com/comment/41533201
type: Question
has comment: http://stackoverflow.com/comment/41533586
has comment: http://stackoverflow.com/comment/41533431
has answer: http://stackoverflow.com/a/26446189
has comment: http://stackoverflow.com/comment/41533351
has comment: http://stackoverflow.com/comment/41533476
has answer: http://stackoverflow.com/a/26445547
has comment: http://stackoverflow.com/comment/41533531

titanium
type: Tag
tags question: http://stackoverflow.com/q/26490273
tags question: http://stackoverflow.com/q/26432638
tag name: titanium
tags question: http://stackoverflow.com/q/26398921
tags question: http://stackoverflow.com/q/26499785
tags question: http://stackoverflow.com/q/26374903
tags question: http://stackoverflow.com/q/26412648
tags question: http://stackoverflow.com/q/26427739
tags question: http://stackoverflow.com/q/26365640

http://stackoverflow.com/comment/41498022
score: 0
comment on: http://stackoverflow.com/a/26417077
type: Comment
has text: @JavaLeave You definitely can append divs that way. There was a syntax error in my code. It's fixed now. We're appending an array of elements at the end, I used semicolons `;` instead of a comma `,`.
type: AnswerComment

http://stackoverflow.com/comment/41452967
has text: I am passing back a partial View as I am building the results from the model into a DevExpress Gridview, so that could be a problem
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26401105

http://stackoverflow.com/a/70173853
downvote count: 0
type: Answer
has body: Another possible reason could be due to an empty object {} inside the pipeline. It can happen if you are using any conditional stages in the pipeline. eg: const pipeline = []: ..... ..... let sort = {} if(params.sort){ sort = { $sort: { popularity: -1 } } } pipeline.push(sort) This will cause the same error "Arguments must be aggregate pipeline operators" Instead you can use something like this: let sort; if(params.sort){ sort = { $sort: { popularity: -1 } } } pipeline.concat(sort? [sort] : [])
answers question: http://stackoverflow.com/q/26399989
score: 4
upvote count: 4

http://stackoverflow.com/q/26429416
linked to: http://stackoverflow.com/q/3537469
has answer: http://stackoverflow.com/a/26430286
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26429603
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/26429547
has title: jquery load image into div strange behaviour
type: Question
has body: I've made slideshow with thumbnails at it's side. Here, basically a div which displays the image and after clickimg on a particular thumbnail, it's related picture will be dynamically displayed in the main div (#display #slideshowpic). Here is the code example, And here is the javascript, $('.thumb').click( function() { $('#slideshowpic').attr('src',""); /// clears or removes current image $('#slideshowpic').attr('src',"/uploads/" + $(this).attr('id') + ".jpg"); }); Here, the image which is to be loaded in the main div after clicking thumbnail, is progressive image which is interlanced with php gd. This is working perfectly in firefox. After clicking thumbnail, the image instantly displays in the main div with progressive fasion. But it doen't seems to be working in chrome. The Problem is (chrome) : After clicking the thumbnail; first the image is cleared as per the code, then the previous image displays instead of new image (clicked image) and then new image displays after taking some time delay (i think the delay is the time which new image is taking to load). google chrome doesn't show image till it loads image fully I just can't figure out where is the problem is. Should i use another technique to load that dynamic image.. ? please help. I stucked in it from many days. EDIT : you can check it in below links, http://bit.ly/ZxVCM3 http://bit.ly/1oeutK5 http://bit.ly/1rIxvAV Click the thumbnails to load the slideshow.
score: 0
answer count: 3
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41490589
score: 0
type: Comment
has text: Sorry if I ask something that might be very simple... I also didn't understand the part about tehe PHP script with the loop that should save the html in a variable (This line: Value1 Value2 )
type: AnswerComment
comment on: http://stackoverflow.com/a/26412327

http://stackoverflow.com/comment/41484988
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26400076
score: 0
has text: thanks for the input, but I had already tried this, but didn't have any luck.

http://stackoverflow.com/q/26363119
has comment: http://stackoverflow.com/comment/41384758
tagged with: web
has answer: http://stackoverflow.com/a/26363564
type: Question
answer count: 1
score: 0
has body: Hello My website address is www.abcdef.com/context/index.html however user is also able to access www.abcdef/context/resources/somPngFile.png which i don't want (here resources is a folder in which i have kept the image files) Also I do all the validation and session checking in index.html.If user directly accesses the png file from url he is able to get it. Any slution as how to avoid this are appreciated. I am using apache tomcat as server and coding in jquery.
tagged with: apache
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41384624
type: UnansweredQuestion
has title: Prevent User to access the file in the resource folder .. hosted on Apache Tomcat
tagged with: tomcat

http://stackoverflow.com/q/26465025
tagged with: css
has comment: http://stackoverflow.com/comment/41568064
answer count: 0
tagged with: hide
type: Question
has title: jquery show/hide div with css transition - Mobile responsive
has body: I'm trying to make a very lite weight (codewise) responsive menu. i have made this so far but i'm starting to think letting jquery do the transnational effect on the drop down is a bad idea as it doesn't look good on a mobile phone becuase of the frame rate i'm guessing? demo below demo with code: http://jsfiddle.net/pv7cx8cg/ How can i do the same thing with Js and Css transistions? and is it a good idea to do it that way? Any help will be great, thanks. Jquery: $( ".menu-icon" ).click(function() { $( ".navbar" ).slideToggle( "slow" ); }); Html: Menu Home Deals My Survivalist About Contact Content Moves with drop down Css: #header-bar{ min-width:200px; max-width:100%; height:50px; background:#29333A; display: block; } .navbar{ display:none; background:#DDD; } ul.reponsive-nav li.nav-item{ list-style-type:none; display:inline; float:left; margin:0; background:#FFF; width:100%; /* Remove this and*/ border-bottom:1px solid #DDD;/*this for desktop menu */ } ul.reponsive-nav li.nav-item a{ display: block; color:#333; text-align:center; font-size:16px; padding:9px 15px 6px 15px; padding:auto; text-decoration:none; } p{ display: inline-block; background:#0CB264; width:100%; text-align:center; padding:30px 0; margin-top:15px; }
tagged with: javascript
score: 0
tagged with: mobile
tagged with: show
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41568100

http://stackoverflow.com/comment/41650159
type: QuestionComment
has text: `for...in` is a bad way of iterating arrays.
comment on: http://stackoverflow.com/q/26509976
score: 1
type: Comment

http://stackoverflow.com/comment/41526135
comment on: http://stackoverflow.com/q/26440553
score: 0
type: Comment
has text: What you want is `setTimeout(getDiff, 5000)` (which *schedules* the function, but does not *call* it). Notice that your current code *does* recursively call the function, unfortunately with no end.
type: QuestionComment

http://stackoverflow.com/comment/41462991
type: Comment
has text: oh thanks aloooooooooooooooooooooooooooooooooooooooooooot man,,, so perfffffeeeecccccttttttt ......
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26392310

http://stackoverflow.com/comment/41418221
score: 1
type: Comment
comment on: http://stackoverflow.com/a/26380925
has text: I like your answer more than others as i dont have to convert my original data.. Thanks much
type: AnswerComment

http://stackoverflow.com/q/26453211
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I want to make my logo static .png image, but when I put cursor over the logo, I want it to play "slideshow" of 7 images, changing one by one. I know that I can achive this with code like this: &lt;img src="image.png" onmouseover="this.src='image.gif'" onmouseout="this.src='image.png'" /&gt; But I want something like this: &lt;img src="image.png" onmouseover="this.src='image1.png/0.1s delay/image2.png/0.1s delay/image3.png/0.1s delay/'" onmouseout="this.src='image.png'" /&gt;
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26453485
type: Question
possible better answer: http://stackoverflow.com/a/26453269
tagged with: javascript
has answer: http://stackoverflow.com/a/26453485
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/26453269
has title: Multiple images onmouseover, one by one.
downvote count: 0

http://stackoverflow.com/comment/41414999
has text: your amazing! as soon as I can accept your answer I will :)
score: 1
comment on: http://stackoverflow.com/a/26379948
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41553051
score: 0
type: AnswerComment
type: Comment
has text: No, the point of var row = e.range.getRowIndex(); is that we ARE defining the range as 'The row that I made the changes on'. This code is running for me without issue. I will have a brief look if you wish to grant edit access.
comment on: http://stackoverflow.com/a/26455522

http://stackoverflow.com/comment/41539284
score: 0
type: Comment
type: QuestionComment
has text: @hindmost What difference does it make? `console.log()` is showing that the `name` property exists.
comment on: http://stackoverflow.com/q/26448805

http://stackoverflow.com/comment/41578860
score: 0
type: AnswerComment
type: Comment
has text: Great to see that ;) Enjoy Angular JS ;)
comment on: http://stackoverflow.com/a/26470107

http://stackoverflow.com/a/26373447
score: 0
has body: When you call that, the DOM isn't yet ready therefore, there is no #name element which you're looking for. Wrap your code in DOM ready like this $(document).ready(function() { $('#name').click(function() { alert('alert box working'); }); }); Or bring the &lt;script src="alert_box.js"&gt; before &lt;/body&gt; Learn about DOM Ready
type: Answer
answers question: http://stackoverflow.com/q/26373427

http://stackoverflow.com/a/26447903
score: 1
upvote count: 1
has body: it's rather simple, just create div and set innerHTML of this div to textarea value, then get textContent or innerText of the div. See this fiddle for more details: https://fiddle.sencha.com/#fiddle/c1f
accepted answer of: http://stackoverflow.com/q/26423791
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41559572
answers question: http://stackoverflow.com/q/26423791
type: Answer

http://stackoverflow.com/a/26448462
answers question: http://stackoverflow.com/q/26438825
accepted answer of: http://stackoverflow.com/q/26438825
score: 0
type: AcceptedAnswer
has body: I solved this by unbinding each individual event handler binded by ajaxifyShopify. For those interested, here's the code: &lt;script&gt; jQuery(function($) { ajaxifyShopify.init({ method: '{{ settings.ajax_cart_method }}', wrapperClass: 'wrapper', formSelector: '#addToCartForm', addToCartSelector: '#addToCart', cartCountSelector: '#cartCount', toggleCartButton: '.cart-toggle', useCartTemplate: true, btnClass: 'btn', moneyFormat:, disableAjaxCart: false, enableQtySelectors: true }); }); console.log('ajaxifyShopify initialized for the first time'); var ias = jQuery.ias({ container: '#products', item: '.single-product', pagination: '.pagination-custom', next: '.next' }); ias.extension(new IASSpinnerExtension({ src: '{{ "spiffygif_36x36.gif" | asset_url }}' })); ias.on('rendered', function(data, items) { console.log('ias rendered event'); // Unbind previous ajaxifyShopify event handlers $("wrapper").off(); $("#addToCartForm").off(); $("#addToCart").off(); $("#cartCount").off(); $(".cart-toggle").off(); console.log('ajaxifyShopify off from ias rendered event'); // Initialize ajaxifyShopify jQuery(function($) { ajaxifyShopify.init({ method: '{{ settings.ajax_cart_method }}', wrapperClass: 'wrapper', formSelector: '#addToCartForm', addToCartSelector: '#addToCart', cartCountSelector: '#cartCount', toggleCartButton: '.cart-toggle', useCartTemplate: true, btnClass: 'btn', moneyFormat:, disableAjaxCart: false, enableQtySelectors: true }); console.log('ajaxifyShopify initialized from ias rendered event'); }); }) &lt;/script&gt;
type: Answer

http://stackoverflow.com/a/26409961
score: 3
has body: You are passing an object literal. You can initialize it with the common parts first, then add the specific parts based on logic. For example: var param = { placement: 'auto', trigger: 'hover', html: true, delay: {"show": 0, "hide": 100}, container: $elem, animation: true, } if (is_title === 'false') { param.template = ' '; } else { param.template = ' '; } $elem.popover(param); Alternatively, you can use conditionals inside your object literal, so you could do something like this: $elem.popover({ placement: 'auto', trigger: 'hover', html: true, delay: {"show": 0, "hide": 100}, container: $elem, animation: true, template: is_title ? ' ' :' ' });
accepted answer of: http://stackoverflow.com/q/26409886
upvote count: 3
answers question: http://stackoverflow.com/q/26409886
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41468268
type: Answer

http://stackoverflow.com/comment/41860581
type: QuestionComment
comment on: http://stackoverflow.com/q/26459182
has text: @User089247 but it successfully creates a record for the `Video` in my DB. So it definitely does submit the first form. I believe that JS I highlighted should take the pressing of that submit button and fire the 2nd modal but that is not happening, despite the form being submitted properly. Notice the logs that show that the `video` is inserted into the db - `SQL (3.4ms) INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["description", "Why hello there lady"], ["title", "Hello there"], (4.5ms) COMMIT`
score: 0
type: Comment

http://stackoverflow.com/q/26425438
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-api-3
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26425552
tagged with: dictionary
has body: I want to get nearest Stations, Stores, Schools, Shopping Places, Leisure Centres with distance on a property listing http://goo.gl/wIFPnz. Please suggest me how to get.
has title: how to get nearest school and other predefined places name with distance from multiple fixed locations?
score: 0
tagged with: wordpress
type: Question

http://stackoverflow.com/q/26376293
has body: I have made a simple carousal using an online script called "simplyScroll". here is the link to the script: http://logicbox.net/jquery/simplyscroll/#config My Problem: here is the link the page: http://namdarshirazian.com/exhibition.php Generally in desktop mode, when I click on each image, it runs a javascript and shows a popup. This javascript is written by myself. Simply a simple action of hide and show. But when viewed with smartphone (android/firefox), it does not triggers click event. VERY STRANGE. Can anyone please help my why this does not work? The click action is as simple as : $("body").on("click", "element", function(){ });
accepted answer: http://stackoverflow.com/a/26376367
type: Question
tagged with: javascript
tagged with: touch
score: 0
answer count: 2
has title: Why the click does not work in touch mode
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26376446
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26376446
tagged with: css
has comment: http://stackoverflow.com/comment/41408431
has answer: http://stackoverflow.com/a/26376367
type: AnsweredQuestion

http://stackoverflow.com/q/26483463
has body: i have seen another answers and it wan't happen to me this is my array [ { "itemCode": "ITM-00000003", "label": "FRAME 1", "orderQty": "697", "rowId": 0 }, { "itemCode": "ITM-00000004", "label": "CCCLEN", "orderQty": "50", "rowId": 1 } ] i want to remove object using 'itemCode' ex: itemCode="ITM-00000004" i'm using this $("#iName").autocomplete({ source: deletedItems, select: function (event, ui) { var rowid = ui.item.rowId; var itemCode = ui.item.itemCode; var itemName = ui.item.label; var orderQty = ui.item.orderQty; $("#invoiceDetailTbl tbody").append(" " + " " + itemCode + " " + " " + itemName + " " + " " + orderQty + " " + " " + ' ' + " " + " " + '' + " " + " "); resetTableEvents(); tableKeyUp(); amountCalc(); deletedItems = _.without(deletedItems, _.findWhere(deletedItems, { itemCode: itemCode })); } }); but it wouldn't happen
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/2722159
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41602214
answer count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/2722159
has title: how to remove object from array using object value
type: Question
has comment: http://stackoverflow.com/comment/41602327

http://stackoverflow.com/q/26407695
has body: I'm starting to work on a PhoneGap/Cordova project (focusing on Android for now). I'm trying to load a remote URL (and that seems to work fine, modified it in the Activity class (loadUrl("http://10.0.3.2");. However, there are certain files and drawables, if I modify in my Assets folder for instance, get reset back to their original state. For instance, in index.js I'm changing the onDeviceReady method to do this: onDeviceReady: function() { alert(navigator.userAgent); // I've added this line and it alerts null anyway? app.receivedEvent('deviceready'); }, When I run phonegap run android, the build that gets made will include that alert function but when I go back to my Editor (PHPStorm in this case), it will inform me that the file has been editted outside the IDE and when it gets reloaded my alert is no longer there. I've googled this repeatedly (PhoneGap resetting code on build; as well as other queries) but I can't find an answer to what's going on. Why is this happening?
tagged with: javascript
type: Question
answer count: 1
downvote count: 0
has title: Phonegap/Cordova code keeps getting reset on build
favorite count: 0
tagged with: android
tagged with: cordova
type: UnansweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26407941

http://stackoverflow.com/a/26431810
type: Answer
has comment: http://stackoverflow.com/comment/41508802
accepted answer of: http://stackoverflow.com/q/26431657
answers question: http://stackoverflow.com/q/26431657
has comment: http://stackoverflow.com/comment/41508767
has comment: http://stackoverflow.com/comment/41508908
has body: Create a custom attribute. When you click next or prev : $(".thumbnails [data-index='" + $('.slides .active-slide').attr('data-index') + "']").addClass("active-thumb"); Code not tested but i think you get the idea. Edit : To remove the active. Save the current index. Remove all the active and apply the active again with the current index previously saved. // assume we click next var currentIndex = $('.slides .active-slide').attr('data-index'); $(".thumbnails li").removeClass("active-thumb"); $(".thumbnails [data-index='" + (currentIndex + 1) + "']").addClass("active-thumb"); Of course, you need a little bit more to check if your at the end or the begening of the slide but i'm sure you can handle that.
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/41641777
type: Comment
type: QuestionComment
has text: Looking at the calc() function in your above fiddle, I have no clue as to how to extend it so it takes in account the state of the checkboxes without resorting once again to on.click()...
score: 0
comment on: http://stackoverflow.com/q/26503926

http://stackoverflow.com/q/26435532
has answer: http://stackoverflow.com/a/26435854
tagged with: python
type: AnsweredQuestion
has body: I tried to put following query together, but it is not working: db.sss.find({ "pos": { "$gte": 200000, "$lt": 2000000 }, "$where": "(this.chr.letter != "X" &amp;&amp; this.chr.no == 5) &amp;&amp; (this.chr.letter != "X" &amp;&amp; this.chr.no == 6) &amp;&amp; (this.chr.letter != this.chr.letter)" }) The above condition above I tried to explain below: chr.no = 5 and chr.no = 6 chr.letter between two objects/dicts in chr are not the same and no X, and the document must be in range 200000 - 2000000 The example output could look like this: {"x_type":"7", "sub_name":"B01", "name":"A", "pos":828288, "s_type":1} {"x_type":"9", "sub_name":"B01", "name":"A", "pos":871963, "s_type":3} Document "x_type":"8" meet not the range condition. Document "x_type":"10" is not valid, because chr.no = 6 has chr.letter = X. And document "x_type":"14" is not valid, because chr.no = 5 and chr.no = 6 both have the same chr.letter = G The database contains following documents: { "_id":ObjectId("5441b57bb6d08aa98ee8d34f"), "name":"A", "pos":828288, "s_type":1, "sub_name":"B01", "type":"Test", "x_type":7, "chr":[ { "letter":"C", "no":4 }, { "letter":"C", "no":5 }, { "letter":"T", "no":6 } ] }{ "_id":ObjectId("5441b57cb6d08aa98ee8d350"), "name":"A", "pos":171878, "s_type":3, "sub_name":"B01", "type":"Test", "x_type":8, "chr":[ { "letter":"C", "no":5 }, { "letter":"T", "no":6 } ] }{ "_id":ObjectId("5441b57cb6d08aa98ee8d351"), "name":"A", "pos":871963, "s_type":3, "sub_name":"B01", "type":"Test", "x_type":9, "chr":[ { "letter":"A", "no":5 }, { "letter":"G", "no":6 } ] }{ "_id":ObjectId("5441b57cb6d08aa98ee8d352"), "name":"A", "pos":1932523, "s_type":1, "sub_name":"B01", "type":"Test", "x_type":10, "chr":[ { "letter":"T", "no":4 }, { "letter":"A", "no":5 }, { "letter":"X", "no":6 } ] }{ "_id":ObjectId("5441b57cb6d08aa98ee8d353"), "name":"A", "pos":667214, "s_type":1, "sub_name":"B01", "type":"Test", "x_type":14, "chr":[ { "letter":"T", "no":4 }, { "letter":"G", "no":5 }, { "letter":"G", "no":6 } ] }…
tagged with: pymongo
accepted answer: http://stackoverflow.com/a/26436244
type: Question
tagged with: mongodb
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26436244
score: 0
has comment: http://stackoverflow.com/comment/41516698
has title: Multiple $where queries in MongoDB
possible better answer: http://stackoverflow.com/a/26435854

http://stackoverflow.com/comment/41477638
comment on: http://stackoverflow.com/q/26414669
score: 0
has text: Seab Amini, Yes exactly but the link that I open in another tab is not from my site.
type: Comment
type: QuestionComment

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/26423865
type: Tag
tags question: http://stackoverflow.com/q/26384968
tags question: http://stackoverflow.com/q/26440121

http://stackoverflow.com/q/26510935
tagged with: flash
has comment: http://stackoverflow.com/comment/41658142
tagged with: javascript
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42103100
has answer: http://stackoverflow.com/a/26615310
tagged with: actionscript-3
has title: How to free a webcam after removing the SWF from the DOM (IE)
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/41653219
tagged with: internet-explorer
score: 0
accepted answer: http://stackoverflow.com/a/26615310
has body: I have a simple flash application, which displays a user's webcam and a small HTML containing it. Camtest AlternativeContent I am using SWFObject to embed my flash application to the DOM swfobject.embedSWF("mySWFApplication.swf", "mySWFApplication", "500", "500", "9.0.0"); In the SWF application I select my camera and grant access to it (Webcam LED turns green) At some point I want to remove the object from the DOM to release the camera: swfobject.removeSWF("myContent"); In Chrome and FF everything is fine now. The webcam has been released (LED went dark) and can be used by other applications again. But in the Internet Explorer the situation is different. The camera is still in use although the div element surrounding the swf has been removed from the DOM. It looks like that the SWF is still held in the Internet Explorer's memory. The only thing helping so far is to reload the browser window. I see two possible solutions to solve this problem in IE: Refreshing the page (by forcing a reload) Offering an ActionScript/JS bridged method to free the camera Is there any other way to remove the SWF from the memory without relying on Actionscript or a reload?
has comment: http://stackoverflow.com/comment/41654171

http://stackoverflow.com/q/26414597
has comment: http://stackoverflow.com/comment/41477052
score: 0
has answer: http://stackoverflow.com/a/26415630
has comment: http://stackoverflow.com/comment/41476979
has comment: http://stackoverflow.com/comment/41476981
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41477733
has body: Following HTML is from a page at Google's corporate site: &lt;!DOCTYPE html&gt; &lt;html class="google" lang="en"&gt; &lt;head&gt; &lt;script&gt; (function(H){H.className=H.className.replace(/\bgoogle\b/,'google-js')})(document.documentElement) &lt;/script&gt; ... I understand what it does, but do not understand the reason behind it. Why would you want to change the class attribute as above? (I am new to web development.)
accepted answer: http://stackoverflow.com/a/26415630
type: Question
type: AnsweredQuestion
has title: Why change class attribute for the HTML tag?
has comment: http://stackoverflow.com/comment/41477161
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26408515
favorite count: 0
type: UnansweredQuestion
score: 1
has title: Bing Maps API request returning Uncaught SyntaxError: Unexpected token :
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
tagged with: bing-maps
has body: I'm getting an error Uncaught SyntaxError: Unexpected token : (dev.virtualearth.net/:1) Here is my javascript. function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { alert("Geolocation is not supported by this browswer or not enabled."); } } function showPosition(position) { $.ajax({ url: 'http://dev.virtualearth.net/REST/v1/Locations/', dataType: 'jsonp', data: { q: position.coords.latitude + ',' + position.coords.longitude, key: '***' } }).then(function(data) { //alert("Latitude: " + position.coords.latitude + "&lt;br /&gt; Longitude: " + position.coords.longitude + //"&lt;br /&gt; Province: " + data.resourceSets.resources[0].address.locality); console.log(data.toString()); }); } The json returned is valid but not sure where the error is occuring.
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26421234

http://stackoverflow.com/q/26432698
favorite count: 0
type: UnansweredQuestion
tagged with: translation
score: -2
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/26432857
tagged with: javascript
upvote count: 0
answer count: 1
has title: How can I do the translation? to do this?
has body: I create two variables, named variable1 and variable2 I store an English word, cat, in variable1, and Google translation service translates "cat" to the French word, "chat", and stores it in variable2

http://stackoverflow.com/comment/41507817
comment on: http://stackoverflow.com/q/26431463
score: 0
type: Comment
type: QuestionComment
has text: You need to change your `action` attribute: `action="DB.php"`

http://stackoverflow.com/comment/57504344
comment on: http://stackoverflow.com/a/28779871
score: 0
type: AnswerComment
has text: This solution is very inefficient
type: Comment

http://stackoverflow.com/q/26406075
has title: Jquery swap image gallery on mouseover
has answer: http://stackoverflow.com/a/26406225
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26406225
has answer: http://stackoverflow.com/a/26406330
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26406330
has body: I have created this DEMO for my question. In my demo you can see when you hover over the thumbnail image with the mouse the bigger picture is changing. What i want to? I want to change the images automatically after a few second. What i need to do for it ? Anyone can help me ? $(document).ready(function() { $("#magazin_sldwr li img").hover(function(){ $('#mainm-img').attr('src',$(this).attr('src').replace('thumb/', '')); }); var imgSwap = []; $("#magazin_sldwr li img").each(function(){ imgUrl = this.src.replace('thumb/', ''); imgSwap.push(imgUrl); }); $(imgSwap).preload(); }); $.fn.preload = function() { this.each(function(){ $('&lt;img/&gt;')[0].src = this; }); }
tagged with: css

http://stackoverflow.com/comment/41565068
has text: `console.log(item[0].name);` should work.
comment on: http://stackoverflow.com/q/26463297
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26503703
has comment: http://stackoverflow.com/comment/41663886
downvote count: 0
has body: $cell = $('&lt;td&gt;') .attr('id',cellID) .click(function(){ alert($(this).attr('id')); }) .appendTo($row); Or insetad of alert you can use $('#whereyouwanttodisplay').html($(this).attr('id'));
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26503048
has comment: http://stackoverflow.com/comment/41639075
has comment: http://stackoverflow.com/comment/41639081

http://stackoverflow.com/comment/41426637
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26386136
has text: Why is this being downvoted? Am I not allowed to ask a question to experts?

http://stackoverflow.com/a/26371975
has body: Try $("div#jo").html("&lt;%= escape_javascript select_tag(:dates, options_for_select(dates)) %&gt;")
answers question: http://stackoverflow.com/q/26371669
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41400869
type: Answer
has comment: http://stackoverflow.com/comment/41402218
score: 1
accepted answer of: http://stackoverflow.com/q/26371669
upvote count: 1
has comment: http://stackoverflow.com/comment/41400800

http://stackoverflow.com/comment/41553122
comment on: http://stackoverflow.com/a/26432925
type: AnswerComment
score: 0
has text: Then your `answers` array isn't getting defined, before the ajax call is made --- what was the answers array supposed to contain?
type: Comment

http://stackoverflow.com/q/26357203
tagged with: php
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has body: I'm trying to improve the load time performance for this datatable. So far it loads just over 700 records and it's already really slow. Am I using deferRender correctly in this instance? It doesn't seem to change or improve anything. I'm thinking it might be the loadJSON function hindering it. $(document).ready( function () { $('#log_table').dataTable( { "deferRender": true, "dom": '&lt;"top"f&gt;rt&lt;"bottom"lp&gt;&lt;"clear"&gt;', "fnCreatedRow": function( nRow, aData, iDataIndex ) { }, "aoColumnDefs": [ { "targets": [ 0 ], "visible": false, "searchable": false } ] } ); } ); function loadJSON(data){ console.log(data); var t = $('#log_table').DataTable(); t.clear(); var json = $.parseJSON(data); $.each(json, function(key,value) { t.row.add( [ value.uuid, value.date, value.username, value.loggedTable, value.action_performed, value.queryString ] ).draw(); }); } $("#audit_trail_menu").click(function(){ $.ajax({ url: './inc/AuditTrailScripts.php?argument=loadAllRecords', success: function(data) { loadJSON(data); } }) }); PHP if(!empty($_GET["argument"])){ /* * loadAllRecords * Fetch all records to load into the datatable * table to fetch from - media */ if ($_GET['argument']=='loadAllRecords'){ $json= fetchAll(); echo json_encode($json); } };
tagged with: datatables
answer count: 1
has answer: http://stackoverflow.com/a/26357376
accepted answer: http://stackoverflow.com/a/26357376
has title: Datatables deferRender not being triggered

http://stackoverflow.com/comment/41582701
has text: If I put some content in the body, will it fade the div and the content or only the background?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26472463

http://stackoverflow.com/comment/41504719
has text: I tried it and it didn't work. I believe I tried this before without any decent results. I updated my question with the exception I received.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26429001

http://stackoverflow.com/comment/41638000
type: QuestionComment
has text: Maybe I can transcode the snapshots into a webm video?
comment on: http://stackoverflow.com/q/26421328
score: 0
type: Comment

http://stackoverflow.com/a/26446175
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26445555
has body: Something like this should work if the image src attribute contains "ball" or "truck" for every image. var ballCount = 0; $('img[src*=ball]').each(function(){ if($(this).prop("checked")){ ballCount+=1; } }); var truckCount = 0; $('img[src*=truck]').each(function(){ if($(this).prop("checked")){ truckCount+=1; } }); instead, if image src doesn't contains that info, you need to give an id or a class to every image, to identify if that is a truck or a ball image. The above code change only at the line $('img[src*=something]') and became with ids: $('img[id^=truck]') //where ids need to be like truck1, truckTwo, truckSomething with classes: $('.truck')

http://stackoverflow.com/comment/41402146
type: QuestionComment
comment on: http://stackoverflow.com/q/26371248
has text: I created a jsfiddle but I'm not familiar with it and I can't get the json data to work which originally came from php. http://jsfiddle.net/2qcbb3rj/9/
score: 0
type: Comment

http://stackoverflow.com/q/26464372
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/26464474
score: 1
tagged with: session-cookies
has body: I have implemented the following function in node js routes.js.Before any requested is served first it is checked for isAuthenticated. function isLoggedIn(req, res, next) { if (req.isAuthenticated()) { console.log('Session Expiry '+req.session.cookie.expires); console.log('Authenticated'); return next(); } console.log('Not Authenticated'); res.redirect('/'); } But when I refresh or navigate to other page after some time after opening the page,it goes to index page instead of the current page.I found it was because req.isAuthenticated() evaluates to false after some time the page loaded. Why does it become false? Is it because of improper serializing This is my serialize and deserilize methods,am I doing in correctly, passport.serializeUser(function (user, done) { console.log('Serializing User'); done(null, user.id); }); // used to deserialize the user passport.deserializeUser(function (id, done) { console.log('Calling Deserlize'); dbconn.user_findById(id, function (err, user) {//call to query DB console.log('Deserializing user from DB'); done(err, user); }); }); Is it concerned with cookie or session. Kindly help
upvote count: 1
type: Question
has title: req.isAuthenticated() returns false after some time the server started
tagged with: javascript
tagged with: express
answer count: 2
has answer: http://stackoverflow.com/a/26521176
downvote count: 0
tagged with: passport.js

http://stackoverflow.com/comment/41420844
comment on: http://stackoverflow.com/q/26383272
score: 2
has text: Putting `class` in quotes should also work.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26509716
downvote count: 0
score: 1
has body: I have an ng-repeat and it's repeating data successfully. Now, i want to filter the results by properties i type into an input box. However, it either doesn't work at all or, if i try various things sometimes NOTHING gets displayed, at all. As you can see it's a work in progress and i've tried out a bunch of different stuff: hence why my code is inconsistent! Please, refrain from commenting on this as it's NOT CONSTRUCTIVE! {{plan.TrusteeCustNum}} {{plan.CustomerNumber}} {{plan.ContractNumber}} {{plan.PlanCode }} {{plan.PlanStatus}} Rates State Availability How can i get ANY filter to filter the results by the properties i'm using and sort them by those said properties?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26509857
tagged with: filter
answer count: 3
upvote count: 1
tagged with: angularjs-ng-repeat
has title: AngularJS filter by property using Ng-Repeat NOT working
has answer: http://stackoverflow.com/a/26510282
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26510489

http://stackoverflow.com/comment/41482327
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26417564
has text: Not to mention the question about `onload` makes no sense without the code.
type: Comment

http://stackoverflow.com/comment/41636199
comment on: http://stackoverflow.com/a/26501662
type: AnswerComment
score: 0
type: Comment
has text: got it, and how do this for agendaDay and agendaWeek

http://stackoverflow.com/q/26388329
downvote count: 0
tagged with: javascript
has title: How to use Handlebars helpers in rails?
score: 2
has body: I have a helper for truncating words, but I don't know where to put it / how to use it. I want {{name}} to be truncated. How should I proceed? Thanks My helper (helper.js) Handlebars.registerHelper ('truncate', function (str, len) { if (str.length > len) { var new_str = str.substr (0, len+1); while (new_str.length) { var ch = new_str.substr ( -1 ); new_str = new_str.substr ( 0, -1 ); if (ch == ' ') { break; } } if ( new_str == '' ) { new_str = str.substr ( 0, len ); } return new Handlebars.SafeString ( new_str +'...' ); } return str; }); My view
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: handlebars.js
tagged with: ruby-on-rails
answer count: 0
type: Question

http://stackoverflow.com/comment/41484324
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26418784
score: 0
has text: What kind of value you want to pass integer or string? If it's integer then `1 === 001`. Can you explain bit more whey you need 001?

http://stackoverflow.com/q/26413161
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41474369
tagged with: javascript
tagged with: jquery
has body: I am new to jQuery, and I am trying to use a jQuery plugin called imgAreaSelect! the documentation is here I have two different images (in same size) to work on: image1 and image2. What I want to do with this plugin is to select an area from image1, while showing the selected area on image2. I wrote a code below to select an area from image1 and show the same selected are on image 2. However, I can only select area on image 1 and 2 separately -- they are not synced. How can I sync the selection? $(document).ready(function () { $('#image1').imgAreaSelect({ handles: true, onSelectEnd: function(img, selection){ $('#img1_x1').val(selection.x1); $('#img1_y1').val(selection.y1); $('#img1_x2').val(selection.x2); $('#img1_y2').val(selection.y2); } }); var ias = $('#image2').imgAreaSelect({ instance: true }); ias.setSelection( val(selection.x1), val(selection.y1), val(selection.x2), val(selection.y2), true ); ias.setOptions({ show:true }); ias.update(); }); What can I do to display the selection area (dashed rectangle) on image2 at the same position? It would be the best if a user can adjust the size of selected area on image2 as well, and see the changed area on image1. Please help me!
has comment: http://stackoverflow.com/comment/41626808
upvote count: 1
favorite count: 0
type: UnansweredQuestion
answer count: 0
downvote count: 0
has title: imgAreaSelect - selecting the same area in multiple images

http://stackoverflow.com/comment/41434397
score: 0
has text: When you say "crash Safari", what do you really mean? What actually happens? What errors show in the log?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26390594

http://stackoverflow.com/comment/41655216
has text: Look into the ***Description*** section at the first note ***For object references...*** **[Array.prototype.slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)**, you'll see it matches your complex example where `array` is actually an object reference. While in the simple example, the elements are just numbers, so copying value is performed.
comment on: http://stackoverflow.com/q/26511686
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26438757
has body: Reloading the page or loading a new page means reloading javascript since it is runs in the context of the current page. There is good way to pass along javascript variables to a new page; it requires some form of data persistence. Cookies and localStorage are two of the most common ways of persisting data client-side. Client cookies are written to the browser cache and are transparent in HTTP headers. LocalStorage is a newer mechanism but well supported, allowing up to 5MB of browser storage without passing in headers. In your use case, instead of storing the timer it would probably make sense to store the timestamp when the timer was started. That way it can be recalculated in the next page from this one static start value. var timerStart; var expireDate = new Date(); function displayTimer(){ var now = new Date().getTime(); var timerStart = timerStart || cookieTimer(); val timeDiff = now - timerStart; document.getElementById("timer").innerHTML = timeDiff.toString(); if(timeDiff &gt; expireDate.getTime()) clearInterval(timerInterval); } val timerInterval = setInterval(displayTimer, 1); // Using cookies function cookieTimer(){ function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i&lt;ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) != -1) return c.substring(name.length,c.length); } return ""; } function setCookie(cname, cvalue, expireDate) { var d = new Date(); d.setTime(d.getTime() + expireDate.getTime()); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires; } var timerCookie = getCookie("timer"); if(timerCookie !== "") return new Date(timerCookie).getTime()); else { setCookie("timer", timerStart, expireDate); return new Date().getTime(); } } // Using localStorage function localStorageTimer(){ function setLocalStorageObject(key, obj, expireDate){ obj.expires = expireDate.getTime(); localStorage.setItem(key, JSON.stringify(o…
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26438053
upvote count: 1

http://stackoverflow.com/q/26485316
has comment: http://stackoverflow.com/comment/41644191
favorite count: 0
linked to: http://stackoverflow.com/q/23323929
has comment: http://stackoverflow.com/comment/41632374
score: 1
duplicate of: http://stackoverflow.com/q/23323929
has comment: http://stackoverflow.com/comment/41672290
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41616190
has body: I have a CKEditor and I am using the ignore item to make it work. ignore: ':hidden:not(.chosen) :hidden:not(.ckeditor)', This makes sure that I dont validate hidden fields. I found that I also need to do that for ckeditor to make it work. I validates ok if the textarea is required and nothing is entered but even if text is entered it still returns errors. I am using data-rule-required to set what is required and what isnt. How can I get the validate to miss hidden chosen boxes and properly validate ckeditor I have found that it will validate and allow form submission if I submit twice. Also if I already have the textarea populated and I am editing it by removing all the text then it will pass validation.
has comment: http://stackoverflow.com/comment/41644528
has title: JQuery Validate CKEditor not working
tagged with: jquery-validate
type: Question
downvote count: 0
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
has comment: http://stackoverflow.com/comment/41644103

http://stackoverflow.com/a/26376611
score: 1
has body: load sends a GET request, yet your PHP is looking in the $_POST for the loc1 value. Try using $_REQUEST or better yet, $_GET to retrieve your querystring values. &lt;? session_start(); echo $loc = $_GET['loc1']; echo $bed = $_GET['bed']; echo $bud = $_GET['bud']; ?&gt;
upvote count: 1
answers question: http://stackoverflow.com/q/26376527
type: Answer
downvote count: 0

http://stackoverflow.com/q/26460178
has answer: http://stackoverflow.com/a/26460297
possible better answer: http://stackoverflow.com/a/26460286
favorite count: 0
has answer: http://stackoverflow.com/a/26460200
has answer: http://stackoverflow.com/a/26460286
upvote count: 2
has answer: http://stackoverflow.com/a/26460339
has title: How to append li into ul
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26460281
downvote count: 1
has comment: http://stackoverflow.com/comment/41559986
type: Question
has body: i have array values. i need to insert array values into li ,after that it will be appended into ul. HTML Array value x=[1, 2, 3, 4, 5]; Need Output 1 2 3 4 5 1 2 3 4 5 I have tried some thing i wont work. fiddle link
has answer: http://stackoverflow.com/a/26460289
tagged with: javascript
tagged with: jquery
answer count: 6
accepted answer: http://stackoverflow.com/a/26460281

http://stackoverflow.com/a/26410120
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26410073
score: 1
accepted answer of: http://stackoverflow.com/q/26410073
has comment: http://stackoverflow.com/comment/41470288
has body: Sounds like you are inventing the callback :) Pass an actual function and call it with (); function testFunc(callback){ callback(); } testFunc(function(){$(".someClass").text("someText");});
has comment: http://stackoverflow.com/comment/41468695

http://stackoverflow.com/comment/41618871
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26492612
has text: There's nothing wrong with this snippet. Your problem is somewhere else in your code, not here.
type: Comment

http://stackoverflow.com/q/26433161
has comment: http://stackoverflow.com/comment/41511212
has body: I have a variable I only want to increment if the condition is met in the for loop. The other code in the if statement works perfectly but the variable never increments. Is it possible to do this in jQuery? Here is a simplified example of what I have been trying: var i = 0; for (var c = 1; c < 3; c++) { if(condition){ i++; } } EDIT: I apologize for my question being a little unclear. Here's what I am actually trying to do: Show Next Button Button 1 Button 2 Button 3 123 456 0 The first two buttons show when the page loads but I have to click the "#showNew" button 3 times before the third button is shown. I made a jsFiddle and it works fine so there must be a conflict with something else on my site. The weird thing is if I put "alert(i);" immediately after the for loop on my site I get the number I'm looking for (2). It appears to be reseting "i" back to zero once it reaches the onclick for some reason.
tagged with: for-loop
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41511082
has comment: http://stackoverflow.com/comment/41511042
favorite count: 0
has comment: http://stackoverflow.com/comment/41510994
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26434149
tagged with: increment
score: -2
accepted answer: http://stackoverflow.com/a/26434149
has answer: http://stackoverflow.com/a/26433228
downvote count: 2
has title: Increase variable in for loop
has comment: http://stackoverflow.com/comment/41511030
has comment: http://stackoverflow.com/comment/41511028
possible better answer: http://stackoverflow.com/a/26433228
tagged with: javascript

http://stackoverflow.com/q/26500550
answer count: 1
downvote count: 0
tagged with: gulp
tagged with: jasmine
has body: I'm having an angular project bundled with browserify using Gulp. Here is the tree |--app |--src --js -main.js -otherFiles.js |--spec --mainspec.js &lt;-- jasmin spec file |--public --js --main.js I'm having a gulp file which takes my source, main.js file, and browserifies it along with a gulp-jasmine tasks gulp.task('js', function() { return gulp.src('src/js/main.js') .pipe(browserify({})) .pipe(gulp.dest('public/js')); }); gulp.task('specs', function () { return gulp.src('spec/*.js') .pipe(jasmine()); }); Along with some watch tasks etc. Now, in my mainspec.js file, angular is not recognized, considering my test code: describe("An Angular App", function() { it("should actually have angular defined", function() { expect(angular).toBeDefined(); }); }); And I'm getting an ReferenceError: angular is not defined error on terminal. I tried to require('angular'); on the first line but with no luck, getting a new error ReferenceError: window is not defined. I know there is something wrong with the setup and the test file not being able to reach the browserified files, but I can't just figure out the solution. Any ideas? Thanks in advance.
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26500858
type: AnsweredQuestion
type: Question
upvote count: 4
accepted answer: http://stackoverflow.com/a/26500858
tagged with: javascript
score: 4
has title: Unit Testing Angular + Browserify + Gulp and Jasmine
tagged with: browserify

http://stackoverflow.com/comment/41633377
type: QuestionComment
comment on: http://stackoverflow.com/q/26500597
has text: @Fred-ii- so what? That will be absurd not working coding nonetheless
score: 0
type: Comment

http://stackoverflow.com/comment/74028491
has text: Was needing to trigger a method when a property in another component was updated (up one via callback, down one via prop), and adding `componentDidUpdate` in the component with the prop was the right prescription. Thanks for this.
score: 7
comment on: http://stackoverflow.com/a/26408784
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41534653
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26445715
has text: Thnaks for the extra info, it will help me for sure :)

http://stackoverflow.com/comment/41516801
has text: @LightnessRacesinOrbit: isNan("I am not a number") returns `true`, even though "I am not a number"==="I am not a number" also returns `true`.
comment on: http://stackoverflow.com/a/26426444
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41619909
has text: I agree with @blex. By using media query and display: none; your video will still be downloaded. Screen size is not reliable to check for performance: imagine you are at the airport or on a bad wifi connection. However this is a really good question and I'll be curious to know how people will deal with this issue.
comment on: http://stackoverflow.com/q/26492135
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26427913
downvote count: 0
answers question: http://stackoverflow.com/q/26426881
has body: There is nothing in the code you posted that will cause the page to reload. "without this action" - but when? Consider using oninput event - http://www.w3schools.com/jsref/event_oninput.asp .
upvote count: 2
type: Answer
score: 2

angularjs-ng-repeat
tags question: http://stackoverflow.com/q/26411350
tags question: http://stackoverflow.com/q/26504481
tags question: http://stackoverflow.com/q/26502214
tags question: http://stackoverflow.com/q/26446007
tags question: http://stackoverflow.com/q/26447233
tags question: http://stackoverflow.com/q/26472079
tags question: http://stackoverflow.com/q/26483842
tags question: http://stackoverflow.com/q/26385104
tags question: http://stackoverflow.com/q/26431102
type: Tag
tags question: http://stackoverflow.com/q/26473887
tags question: http://stackoverflow.com/q/26408379
tags question: http://stackoverflow.com/q/26381198
tags question: http://stackoverflow.com/q/26431599
tags question: http://stackoverflow.com/q/26399783
tags question: http://stackoverflow.com/q/26389443
tag name: angularjs-ng-repeat
tags question: http://stackoverflow.com/q/26392038
tags question: http://stackoverflow.com/q/26395412
tags question: http://stackoverflow.com/q/26440662
tags question: http://stackoverflow.com/q/26509716
tags question: http://stackoverflow.com/q/26448886
tags question: http://stackoverflow.com/q/26358599
tags question: http://stackoverflow.com/q/26445397

http://stackoverflow.com/q/26464316
has answer: http://stackoverflow.com/a/51754551
tagged with: google-maps
has body: I get a heatmap layer of city people, and I need to sort range people on a heatmap, how I dynamically change google heatmap gradient? var heatMapData = [ {location: new google.maps.LatLng(37.782, -122.447), weight: 50}, new google.maps.LatLng(37.782, -122.445), {location: new google.maps.LatLng(37.782, -122.443), weight: 20}, {location: new google.maps.LatLng(37.782, -122.441), weight: 30}, {location: new google.maps.LatLng(37.782, -122.439), weight: 20}, new google.maps.LatLng(37.782, -122.437), {location: new google.maps.LatLng(37.782, -122.435), weight: 55}, {location: new google.maps.LatLng(37.785, -122.447), weight: 30}, {location: new google.maps.LatLng(37.785, -122.445), weight: 20}, new google.maps.LatLng(37.785, -122.443), {location: new google.maps.LatLng(37.785, -122.441), weight: 86}, new google.maps.LatLng(37.785, -122.439), {location: new google.maps.LatLng(37.785, -122.437), weight: 20}, {location: new google.maps.LatLng(37.785, -122.435), weight: 20} ]; var sanFrancisco = new google.maps.LatLng(37.774546, -122.433523); map = new google.maps.Map(document.getElementById('map-canvas'), { center: sanFrancisco, zoom: 13, mapTypeId: google.maps.MapTypeId.SATELLITE }); var heatmap = new google.maps.visualization.HeatmapLayer({ data: heatMapData }); heatmap.setMap(map); For example: How I look range from 20 to 40 on heatmap?
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Google heatmap gradient range?
tagged with: heatmap
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: google-maps-api-3

http://stackoverflow.com/q/26358408
tagged with: css
type: AnsweredQuestion
score: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/26358544
has body: I have the select below: hello [test] hello2 [test2] hello33 [test33] hel [hel] How can I align the text inside the options to appear like this: hello____[test] hello2___[test2] hello33__[test33] hel_____ [hel] I tried adding spaces with JavaScript but they are not visible. ( _ is space char above)
type: Question
has comment: http://stackoverflow.com/comment/41375098
has comment: http://stackoverflow.com/comment/41375223
has comment: http://stackoverflow.com/comment/41375073
has comment: http://stackoverflow.com/comment/41375253
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26358544
tagged with: html-select
has title: align two words in a select option
has comment: http://stackoverflow.com/comment/41375306

http://stackoverflow.com/a/26401940
score: 31
accepted answer of: http://stackoverflow.com/q/26401893
type: AcceptedAnswer
downvote count: 0
has body: No, the WebSocket clients sends the HTTP request asking for a WebSocket connection, then the server responds with an HTTP 101 Switching protocols, meaning that it accepts the connection, and then the client can start to send and receive data in binary format. Example client request: GET /chat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw== Sec-WebSocket-Protocol: chat, superchat Sec-WebSocket-Version: 13 Origin: http://example.com Example server response: HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk= Sec-WebSocket-Protocol: chat It is well explained in the Wikipedia article: http://en.wikipedia.org/wiki/WebSocket#WebSocket_protocol_handshake And it is detailed in the spec: https://www.rfc-editor.org/rfc/rfc6455#section-1.3 It's just the browser that is doing some internal magic to reuse a connection, the whole upgrade process is irrelevant for me as a user? That is right. I still have to use two different classes, I just happen to use the same port and the browser then decides for performance reasons to upgrade. Is that really correct? If you want to use AJAX you use XMLHttpRequest. If you want to use WebSocket, you use the WebSocket class. Still, they can be accessed by the same port. The difference is that the WebSocket connection will negotiate with the server a full duplex persistent binary channel, while the XMLHttpRequest will just make a request and get a response.
type: Answer
has comment: http://stackoverflow.com/comment/41456893
has comment: http://stackoverflow.com/comment/41457074
upvote count: 31
has comment: http://stackoverflow.com/comment/89978462
has comment: http://stackoverflow.com/comment/89943357
answers question: http://stackoverflow.com/q/26401893

http://stackoverflow.com/a/26444062
has comment: http://stackoverflow.com/comment/41533691
has comment: http://stackoverflow.com/comment/41533808
score: 0
has comment: http://stackoverflow.com/comment/41532482
type: Answer
answers question: http://stackoverflow.com/q/26443686
has comment: http://stackoverflow.com/comment/41531057
has body: It works for me: var app = require('express')(); app.use(require('body-parser').urlencoded({ extended: true })); app.get('/', function(req, res) { res.send(' \ \ \ \ \ VAL1 \ VAL2 \ VAL3 \ \ \ \ \ \ \ \ VAL1 \ VAL2 \ VAL3 \ \ \ \ \ \ '); }); app.post('/add', function(req, res) { res.json(req.body.type[0]['serial']); }); app.listen(9000); Then after pressing Submit something like this is displayed in the browser: ["asdf","fdsa"]
has comment: http://stackoverflow.com/comment/41531184

http://stackoverflow.com/a/26499977
has body: Formatting your javascript is really important to catch those type of syntax error for your self. As @Mottie said use some kind of javascript formatter to fix those issues.Tidy Up, http://jsbeautifier.org/ are better place to start up with. Here is the correct code $('#check').click(function() { var salary; var isValid = $('#salaryForm').validate().form(); // if validation passes, display a message if (isValid) { var salary = Number($('#salary').val()); if (salary &lt; 40000) { if ($('input[name=radio]:checked').length &gt; 0) { if ($('input[name=job1]:checked').length &gt; 0) { $('#message').html("Loan Approved.") } else { $('#message').html("Loan Denied.") } } else { $('#message').html("Loan Denied.") } } else if (salary &gt;= 40000) { if ($('input[name=radio]:checked').length &gt; 0) { if ($('input[name=job1]:checked').length &gt; 0) { $('#message').html("Loan Approved.") } else { if ($('input[name=job1]:checked').length &gt; 0) $('#message').html("Loan Approved.") } }else { $('#message').html("Loan Denied.") } } } }); // form validation $('#salaryForm').validate( { rules: { salary: { required: true, digits: true, range: [1, 1000000] } } });
type: Answer
answers question: http://stackoverflow.com/q/26499569
score: 0

http://stackoverflow.com/comment/41431569
comment on: http://stackoverflow.com/q/26387653
type: QuestionComment
type: Comment
has text: "Is there a better way to work with dynamic content?" Yes, use a data binding framework such as Knockout, Ember, Angular, etc.
score: 0

animation
tags question: http://stackoverflow.com/q/26386118
tags question: http://stackoverflow.com/q/26378349
tags question: http://stackoverflow.com/q/26432414
tags question: http://stackoverflow.com/q/26384566
tags question: http://stackoverflow.com/q/26358784
type: Tag
tags question: http://stackoverflow.com/q/26493857
tags question: http://stackoverflow.com/q/26433522
tags question: http://stackoverflow.com/q/26365570
tag name: animation
tags question: http://stackoverflow.com/q/26454483
tags question: http://stackoverflow.com/q/26502600
tags question: http://stackoverflow.com/q/26367818
tags question: http://stackoverflow.com/q/26502054
tags question: http://stackoverflow.com/q/26507458
tags question: http://stackoverflow.com/q/26446498
tags question: http://stackoverflow.com/q/26457989
tags question: http://stackoverflow.com/q/26490938
tags question: http://stackoverflow.com/q/26428517
tags question: http://stackoverflow.com/q/26438974
tags question: http://stackoverflow.com/q/26443467
tags question: http://stackoverflow.com/q/26443464

http://stackoverflow.com/q/26418821
accepted answer: http://stackoverflow.com/a/26420078
upvote count: 1
type: AnsweredQuestion
tagged with: jquery-datatables-editor
score: 1
type: Question
has body: i am creating json format for jquery datatable using jquery , but it gives error "DataTables warning (table id = 'tblDynamicModifierItems2'): Requested unknown parameter '0' from the data source for row 0" my Html is my Jquery code is var aaData = []; var ModifierItemCode = "1"; var Description = "10 cane rum" aaData.push({ "ModifierItemCode": ModifierItemCode, "ModifierItem": Description, "Delete": "Delete" }); var oTable = $("#tblDynamicModifierItems").dataTable({ "aaData": aaData, "aoColumns": [{ "bVisible": false }, { "sTitle": "Description" }, null], }); oTable.fnSort(1, 'asc'); can anyOne help me solve this?
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26420078
favorite count: 0
tagged with: datatables
has title: binding jquery datatable gives error "Requested unknown parameter '0' from the data source for row 0"

http://stackoverflow.com/comment/41463255
comment on: http://stackoverflow.com/a/26385953
has text: @user2513722 there were some little errors. I edited my question and also added a download link for a working example of the extension. [Download it](http://www.mediafire.com/download/lnte4jku1ly68um/extension-26384241.zip) and see.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26403532
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41457728
upvote count: 1
has comment: http://stackoverflow.com/comment/41457556
has comment: http://stackoverflow.com/comment/41457372
has body: You never defined the route. angular.module('app.controllers.login', ["app.factories.http","ui.router"]) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('dashboard', { url: "/dashboard", views: { "view": { templateUrl: "views/something.html" } } }); This should work! If you want something like a re-route to the login page, which I assume, you can also add the following in the config: $urlRouterProvider.otherwise("login"); What this does is, if someone tries to go to a route which doesn't exist it will route you back to login. NOTE: If you are using $q or $timeout, try using $location.path('/dashboard'); instead. More info on that particular behaviour: https://github.com/angular-ui/ui-router/issues/916
has comment: http://stackoverflow.com/comment/41457861
accepted answer of: http://stackoverflow.com/q/26403233
has comment: http://stackoverflow.com/comment/41457831
has comment: http://stackoverflow.com/comment/41457310
answers question: http://stackoverflow.com/q/26403233
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41458019

http://stackoverflow.com/comment/41459845
type: QuestionComment
has text: This is the error from the console log: GET https://api.meet2know.com/v1/leads?callback=jQuery11110770312482258305_1413465698548&request.json&_=1413465698549 jquery.min.js:4send jquery.min.js:4m.extend.ajax jquery.min.js:4(anonymous function) (index):30m.event.dispatch jquery.min.js:3r.handle
comment on: http://stackoverflow.com/q/26404948
score: 0
type: Comment

http://stackoverflow.com/comment/41522628
comment on: http://stackoverflow.com/q/26434337
has text: is the style sheet `index.css` needed?. Trying removing it and check if it works.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41443849
comment on: http://stackoverflow.com/q/26396130
score: 0
has text: http://jsfiddle.net/1uvL7tcm/3/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41385067
type: Comment
score: 0
type: AnswerComment
has text: Agree. On the other hand, if you are working with cordova, maybe you should only start the app once 'deviceready' event fired.
comment on: http://stackoverflow.com/a/26359235

http://stackoverflow.com/comment/41571417
type: AnswerComment
has text: Gustav: i have created fiddle on your suggestion http://jsfiddle.net/atulkushwah/wg1seup6/1/ see here circle not moving if we added normalizationFactor. Please suggest!
type: Comment
comment on: http://stackoverflow.com/a/26405773
score: 0

http://stackoverflow.com/q/26473300
type: Question
has title: How to get the count based on days on EST time when the timestamp is in GMT
tagged with: mongodb
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
has body: I have something similar shown below Find all documents within last n days The problem is I have a timestamp in GMT but I need the counts based on EST time ...
upvote count: 0
has answer: http://stackoverflow.com/a/26473982
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15572607
score: -1

http://stackoverflow.com/comment/41569670
has text: Thank you for your answer, but it seems that the white space is not actually part of the `string` added to the textarea, I suspect it is due to the autosize function.
type: AnswerComment
comment on: http://stackoverflow.com/a/26427631
score: 0
type: Comment

http://stackoverflow.com/a/26406891
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41463697
has body: There is indeed a much better way to do this. I'm going to rearrange your data structure. The filter to go from my data structure to yours is a linear time algorithm, though I don't see why you'd want to. But if you must, the translation is linear time. result = {}; for (var category in categories) { result[category._id] = {name : category.name, books: []}; } for (var book in books) { //Probably also want some safety logic for if result[book.category] is undefined... addBook(result[book.category].books, book); //you already know how to add your book info, so I won't duplicate that logic. } Afterwards you can either return result, or do logic to change result into your mocked up data structure. But creating this preliminary structure will save you computation time, because dictionary accesses are MUCH faster than iterating over your arrays multiple times. If b = number of books and c = number of categories. Complexity Your algorithm: O(b * c) Complexity My algorithm: O(b + c) Complexity My algorithm with translation to your data structure O(2 * (b + c)) though the memory complexity goes up. A good tradeoff for this problem, in my opinion. O(b*c) is not very good.
answers question: http://stackoverflow.com/q/26406599
has comment: http://stackoverflow.com/comment/41463549
downvote count: 0
score: 1

http://stackoverflow.com/q/26460840
type: AnsweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41561135
has answer: http://stackoverflow.com/a/26460969
tagged with: javascript
score: -1
has body: I am using jquery scripts in my website(www.authorsandeepmishra.com), but script is taking sometime to respond to events. I am using disqus script for commenting in the same website, i have made the navigation bar fixed, but commenting section is still moving above the navigation bar which is not meant. Kindly help me.
upvote count: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26460969
favorite count: 0
has comment: http://stackoverflow.com/comment/41560937
has title: jQuery is Slow in responding to events
tagged with: disqus

http://stackoverflow.com/a/26498532
type: Answer
has body: Your for loops are different, this is causing the offset of 'Sun': for (var i = 0; i < dayNames.length; i++){ myHTML += ' ' + dayNames[i] + ' ' + ' '; if (i%6 == 0){ myHTML += " "; } }; for (var i=1; i <= monthLength[myMonth]; i++){ myHTML+=" " + i + " "; if (i%7 == 0){ myHTML += " "; } } Change them to: for (var i = 0; i < dayNames.length; i++){ myHTML += ' ' + dayNames[i] + ' ' + ' '; if ((i+1)%7 == 0){ myHTML += " "; } }; for (var i = 0; i < monthLength[myMonth]; i++){ myHTML+=" " + (i + 1) + " "; if ((i+1)%7 == 0){ myHTML += " "; } } should resolve your issue: http://jsfiddle.net/166ea9n9/
upvote count: 0
accepted answer of: http://stackoverflow.com/q/26498459
answers question: http://stackoverflow.com/q/26498459
score: -1
has comment: http://stackoverflow.com/comment/41630157
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/q/26442465
type: Question
has body: I'm very new to javascript but in mid-level with HTML and CSS. So here is the issue. I just registered a third party contact form service with Foxyform. They provided a code to paste in the page and upload it. It works fine in desktop views, however when one visits the contact page on different mobile or smaller devices it looks out of space and non-responsive. There is no option to edit it in @media screen within the theme. Is it possible to make this contact form responsive? Here are the codes: HTML: &lt;a id="foxyform_embed_link_602624" href="http://www.foxyform.com/"&gt;&lt;/a&gt; Javascript: (function(d, t) { var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.src = "http://www.foxyform.com/js.php?id=602624&amp;sec_hash=54f3ab77bfb&amp;width=350px"; s.parentNode.insertBefore(g, s); }(document, "script"));
has comment: http://stackoverflow.com/comment/41528205
tagged with: javascript
has comment: http://stackoverflow.com/comment/41528370
has comment: http://stackoverflow.com/comment/41528501
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41528026
has comment: http://stackoverflow.com/comment/41528224
has title: Making this contact form responsive with Javascript
has comment: http://stackoverflow.com/comment/41528015
has comment: http://stackoverflow.com/comment/41528069
has comment: http://stackoverflow.com/comment/41528153
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41527986
has answer: http://stackoverflow.com/a/43381899
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41528038
has answer: http://stackoverflow.com/a/26442537
has comment: http://stackoverflow.com/comment/41528270

http://stackoverflow.com/comment/41379909
type: AnswerComment
type: Comment
has text: Yeah that's what scares me - keyCodes can sometimes be not what you expect
score: 1
comment on: http://stackoverflow.com/a/26360948

http://stackoverflow.com/comment/41649192
type: Comment
has text: I don't know, maybe someone thought my code was a failed attempt to answer my own question.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26507116

http://stackoverflow.com/q/26470147
tagged with: charts
score: 1
has title: interactive line chart shows data points outside xDomain
type: Question
upvote count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I need to produce an interactive line chart of multiple series and I'm using NVD3 with interactivity turned on for that (useIntractiveGuidline). But there appears to be a problem if xDomain of the chart is more narrow than the data points span. Consider an example. You have 3 data series with X points 1, 2, and 3. You chart has the X range of [ 1.1, 4 ]. Now, if you move you mouse arount the Y axis of the chart a bit, you'll see that -- even if you use clipEdge -- NVD3 is still displaying data points and a pop-up with values: I've compiled a JSFiddle for this bug: http://jsfiddle.net/e6kwrqdw/. My JavaScript code: var data = [ { key: 's#1', values: [ { x: 1, y: 5 }, { x: 2, y: 7 }, { x: 3, y: 3 } ] }, { key: 's#2', values: [ { x: 1, y: 4 }, { x: 2, y: 8 }, { x: 3, y: 4 } ] }, { key: 's#3', values: [ { x: 1, y: 1 }, { x: 2, y: 2 }, { x: 3, y: 6 } ] } ]; var chart = nv.models.lineChart() .useInteractiveGuideline(true) .tooltips(true) .margin({ left: 200 }) .xDomain([ 1.1, 4 ]) .clipEdge(true) .showLegend(true); d3.select('#chart').datum(data).call(chart);
answer count: 0
tagged with: nvd3.js
type: UnansweredQuestion

http://stackoverflow.com/comment/41481652
comment on: http://stackoverflow.com/q/26416655
type: QuestionComment
score: 0
has text: Im actually using express/node too for the server. There a couple other pages that work though. An about and contact form that work correctly. The trailing / on those dont work either though. /contact works. Direct link to /contact/ won't. Ill add my express route code to the question.
type: Comment

http://stackoverflow.com/q/26423567
tagged with: javascript
tagged with: asp.net
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41492402
tagged with: sitecore
has body: I've seen a lot of solutions to check if a user has disabled JavaScript in server side in C# (and I mean really disabled, not if the browser doesn't support JavaScript since I already tried EcmaScriptVersion). Here are two of the articles that I found: How to detect if JavaScript is enabled from the server side in C#/.NET Detect if JavaScript is enabled in ASPX I'm currently trying the first approach from Nuno Freitas because it seems to be the cleanest without having to play around with query string parameters, but the session variable is never setted and the SetJavascriptEnabled is never called. I've added the ScriptManager to my aspx page like this &lt;asp:ScriptManager ID="scriptManager" runat="server" EnablePageMethods="true"/&gt; And the startup script is being registered as in the article (in the OnPreRender event) but it's not being shown in the page. Btw this is a website that uses sitecore. Any help?
has answer: http://stackoverflow.com/a/26423773
has comment: http://stackoverflow.com/comment/41496677
score: 0
tagged with: webmethod
upvote count: 1
answer count: 1
downvote count: 1
tagged with: c#
has comment: http://stackoverflow.com/comment/41492548
has title: Sitecore - WebMethod is not being called
has comment: http://stackoverflow.com/comment/41493048
has comment: http://stackoverflow.com/comment/41492815
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41492682

http://stackoverflow.com/comment/41599286
has text: Have you checked the console to check for any errors which are preventing the form submission?
comment on: http://stackoverflow.com/q/26481820
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26489982
tagged with: javascript
tagged with: angular-ui-bootstrap
has title: Angular JS UI Bootstrap Datepicker: max-date and init date issue
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26490063
favorite count: 0
tagged with: angularjs
tagged with: datepicker
type: AnsweredQuestion
score: 1
has body: What a day I've been having... anyway, I have been assisting some colleagues with an AngularJS project and so much is wrong, anyway... I am using the AngularJS UI Bootstrap Datepicker version 0.11.2 with AngularJS version 1.3. So far so good however I wish to set the minimum date 2 months from the current day, the maximum date six months from the current day and the initial date 2 months from the current day. This is what I have so far: View &lt;div data-datepicker data-ng-model="dt" data-min-date="minDate" data-max-date="maxDate" data-max-mode="day" data-show-weeks="false" data-starting-day="1" data-year-range="2" class="custom-date-picker"&gt;&lt;/div&gt; and in my controller... var today = new Date(), twoMonth = today.setMonth(today.getMonth() + 2), sixMonth = today.setMonth(today.getMonth() + 6); $scope.today = function() { $scope.minDate = twoMonth; $scope.maxDate = sixMonth; }; $scope.today(); This is all find however I've noticed that minDate is correct, maxDate is actually 8 months in the future and when I add the following to the directive to set the initial date like so (notice data-init-date="minDate") &lt;div data-datepicker data-ng-model="dt" data-init-date="minDate" data-min-date="minDate" data-max-date="maxDate" data-max-mode="day" data-show-weeks="false" data-starting-day="1" data-year-range="2" class="custom-date-picker"&gt;&lt;/div&gt; I get the following error! TypeError: undefined is not a function at e._refreshView (js/vendor/angular/ng-ui-bootstrap-tpls-0.11.2.min.js:8:16705) at refreshView (js/vendor/angular/ng-ui-bootstrap-tpls-0.11.2.min.js:8:13968) at link (js/vendor/angular/ng-ui-bootstrap-tpls-0.11.2.min.js:8:17848) at B (js/vendor/angular/angular-1.3.0-beta.18.min.js:55:369) at js/vendor/angular/angular-1.3.0-beta.18.min.js:62:378 at g (js/vendor/angular/angular-1.3.0-beta.18.min.js:48:105) at js/vendor/angular/angular-1.3.0-beta.18.min.js:47:233 at js/vendor/angular/angular-1.3.0-beta.18.min.js:49:54 at Object.r [as transclude] (js/vend…
accepted answer: http://stackoverflow.com/a/26490063
upvote count: 1
type: Question

http://stackoverflow.com/q/26369495
tagged with: signalr
has body: I'm using SignalR to transferring commands from client to server without refreshing the page. When the client enter some of my web pages, I'm starting a new hub connection. Like this: var hub = $.connection.siteControllerHub; $.connection.hub.start(); This "start()" function takes some time (+-5 seconds). mean while, the page is already finished loading and the user start using my UI. SingalR cannot serve the user, until it's finish loading the connection. I'm know that I'm can use the async approach with the done() register: $.connection.siteControllerHub.start().done(function () { // On finish loading... }); But this kind of operations is not suitable for me, since if I'm using this - I'm need to disable the UI until this event happens. And this not cool at all. I'm prefer that loading of the page will takes longer but when it's done, everything will be ready for use. What do you think? How do you recommend to implement it? Thank you.
upvote count: 2
has title: Hub.start - wait for finish
tagged with: signalr.client
answer count: 1
tagged with: javascript
favorite count: 0
downvote count: 0
tagged with: signalr-hub
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26377593
type: Question
score: 2

http://stackoverflow.com/q/26490674
has body: My function in HTML file is: Click Me! Now what should be my javascript function to pass that url (i.e. http://widefide.com/feed) to "demo"? Like this? : function geturl(ok) { document.getElementById("demo").innerHTML = ok; } This is returning this error: "`Uncaught SyntaxError: Unexpected token } " Is this because thar element is getting url from PHP+MYSQL? For instance: print(" Click Me!
has answer: http://stackoverflow.com/a/26490755
favorite count: 0
has answer: http://stackoverflow.com/a/26490807
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has title: Javascript - Passing pre-defined value
tagged with: javascript
score: 0
answer count: 2
tagged with: function

http://stackoverflow.com/a/26424192
has body: You can't use ng-repeat and ng-if on the same element, because both of them want to do things like remove &amp; replace the entire element. This kind of makes sense - what would you do when ng-repeat is saying "hey draw this" but ng-if is saying "hey no don't draw this?" I think the best solution here would be to preprocess your array to only include the records you want, and then ng-repeat over that with no ng-if. You could also move the ng-if to an element inside the ng-repeat element, so that there is no ambiguity about what's shown &amp; hidden.
answers question: http://stackoverflow.com/q/26424111
score: 4
upvote count: 4
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41603215
has text: it is now submitting even is strengthPercentage is less than 60, I'm not sure if i declared it in the right place, i have put it just above $('#myForm').submit(function () { return true; });
comment on: http://stackoverflow.com/a/26482538
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26447223
has comment: http://stackoverflow.com/comment/41766055
has comment: http://stackoverflow.com/comment/41536923
type: Answer
has comment: http://stackoverflow.com/comment/41798969
answers question: http://stackoverflow.com/q/26446592
accepted answer of: http://stackoverflow.com/q/26446592
score: 0
type: AcceptedAnswer
has body: Here you are : http://jsfiddle.net/dsmeuzL5/ HTML : &lt;iframe id="myframe" src="//www.yourpage.com"&gt;&lt;/iframe&gt; JS : var iframe = document.getElementById('myframe'); var MouseWheelHandler = function (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))); console.log(delta); var doc = iframe.contentDocument ? iframe.contentDocument : (iframe.contentWindow ? iframe.contentWindow.document : iframe.document); doc.body.scrollTop = doc.body.scrollTop - (delta * 30); return false; } if (window.addEventListener) { // IE9, Chrome, Safari, Opera window.addEventListener("mousewheel", MouseWheelHandler, false); // Firefox window.addEventListener("DOMMouseScroll", MouseWheelHandler, false); } // IE 6/7/8 else window.attachEvent("onmousewheel", MouseWheelHandler);

http://stackoverflow.com/a/26547129
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26507889
answers question: http://stackoverflow.com/q/26507889
type: Answer
downvote count: 0
score: 1
has body: Tnx, ok, personally I would add class "hide" (as I can see it's using bootstrap(?)) to categories in loop (that is triggered after 11th element) so to generate them in HTML but not show them and dynamically add 12th element (show/load more "button") that will have Prototype event listener "on click" and a simple function to "toggle" hidden divs). If there are hundreds of categories I would "slice" them in whole DIVs (of twelwe) and do the same as above (hide (and show) classes and JS toggling but with a loop over all 12 elements). And if there would still be some page loading issues I would write a "pagination" for these categories - a PHP function/class with pagination functionality - having "category", "offset", "start" as parameters - and then Prototype as AJAX call (triggered by button click). I am not very Prototype guy but I'm sure you can find many examples here or all over the net... This, last method is kind of bad for seo I think. Also it opens another question (as all above does) - can (do we want it to) user bookmark (or spider find) exact subcategories list? If yes it means additional work and handling (as all AJAX app do)... Maybe, just maybe, all these subcategories can be solved in an AI/UX way? So to speak - have less of them at same time :)?

http://stackoverflow.com/comment/41386592
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26364304
has text: Pls, note that I don't use grunt plugin link to which I have provided by myself but from its description it seems that it does exactly what you need

http://stackoverflow.com/q/26484326
has comment: http://stackoverflow.com/comment/41603630
has comment: http://stackoverflow.com/comment/41603685
tagged with: javascript
tagged with: jquery
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26484438
favorite count: 0
has body: I'm currently building the website for my brand new creation and - since I've never been such a CSS guru - I need your lights! There is a central screenshot (with the editor inside). When the window is at full size, the screenshot appears fine and centered as it's supposed to be. When I start reducing the width of the window, the image seems as if it's moving to the right. Would it be possible to keep it where it initially is, and resize it when the window resizes? On resizing, the navbar menu collapses and a toggle button (mobile-style) is created in its place. Is there any way to disable this? Or, at least, not trigger at that stage but at a smaller width (while the navbar-brand is still fitting)? That's the core HTML section: &lt;div class="navbar navbar-inverse navbar-fixed-top"&gt; &lt;div class="container-fluid"&gt; &lt;div class="navbar-header"&gt; &lt;button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" &gt; &lt;span class="sr-only" style="color:black;"&gt;Toggle navigation&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;/button&gt; &lt;a class="navbar-brand" href="#"&gt;&lt;img src="images/logo.png" width="40"&gt;&amp;nbsp;&amp;nbsp;Peppermint&lt;/a&gt; &lt;/div&gt; &lt;div class="collapse navbar-collapse"&gt; &lt;ul class="nav navbar-nav navbar-right"&gt; &lt;li class="active"&gt;&lt;a href="#"&gt;&lt;i class="fa fa-home"&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Overview&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-question-circle"&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Documentation&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://sites.fastspring.com/insili/product/peppermint" target="_blank"&gt;&lt;i class="fa fa-shopping-cart"&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;Buy&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="mailto:info@insili.co.uk?subject=Peppermint Support Request"&gt;&lt;i class=…
has title: Bootstrap resizing and auto-collapsing
tagged with: twitter-bootstrap
tagged with: css
has answer: http://stackoverflow.com/a/26484438
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question

ratchet
type: Tag
tag name: ratchet
tags question: http://stackoverflow.com/q/26465437

http://stackoverflow.com/comment/41552103
score: 0
type: AnswerComment
type: Comment
has text: `val()` is a function not a property and ID's can be numeric in html5 spec
comment on: http://stackoverflow.com/a/26455741

bash
tags question: http://stackoverflow.com/q/26377116
type: Tag
tags question: http://stackoverflow.com/q/26454604
tags question: http://stackoverflow.com/q/26464103
tags question: http://stackoverflow.com/q/26491558
tag name: bash

http://stackoverflow.com/q/26476450
has title: binding data not working in angularjs
type: Question
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41590173
linked to: http://stackoverflow.com/q/22406633
has comment: http://stackoverflow.com/comment/41590179
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41590257
has comment: http://stackoverflow.com/comment/41590297
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41590227
has comment: http://stackoverflow.com/comment/41590075
has answer: http://stackoverflow.com/a/26476584
has body: I am a new with AngularJS, and I am trying to bind data to the form controller, but it is not working. HTML {{ user.name }} AngularJS angular.module('myapp', []).controller('simpleContr', function($scope) { $scope.users = [ { name:'Ashraf', city:'Cairo'}, { name:'Ali', city:'Assuit'}, { name:'Mohammed', city:'Qena'} ]; });

http://stackoverflow.com/q/26425268
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26425433
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26425433
has body: So I am developing this site from scratch (first time ever) and I've made the general layout from the psd I made and everything is great, so I am now at the point where I want to refine the site a bit with some javascript effects-functions. When I am at the index page, you have a banner, sidebar and content (articles). When I press the articles it goes to the article (obviously) but I want to make a custom loading page like this at 0:22: https://www.youtube.com/watch?v=k1q6Y_snURw#t=20 I've got to make or find a gif but say I've done that, how would I add this to the site? The articles are all in a class by themselves although I guess I would have to use the ID for each specific article to get it to go to the respective article.
tagged with: css
type: AnsweredQuestion
has title: How to do a custom transition using Javascript
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26427387
score: 1
linked to: http://stackoverflow.com/q/4034659
has comment: http://stackoverflow.com/comment/41495697
accepted answer: http://stackoverflow.com/a/26427387
answer count: 2

http://stackoverflow.com/comment/41556081
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26455767
type: Comment
has text: Just a quick question: apart from the snippet which basically copies OP's code, making your answer look bigger, what new revelations does this answer bring that was not already covered by the two other answers?

http://stackoverflow.com/comment/41411133
comment on: http://stackoverflow.com/q/26377427
type: Comment
score: 0
has text: Just like @DanielRoseman mention that you have confused the server-side code with the client-side code.
type: QuestionComment

http://stackoverflow.com/q/26435777
has title: Combo box options to hyperlink
type: Question
has body: Please note that i have the following two set of codes which does different functions Drop down list set to hyperlink Combo box (textbox as well as dropdown) which selects the option but no hyperlink Now: I want to combine these functions My first set of code: Select City Mumbai Pune Bangalore Delhi My second set of code: Your preferred programming language: Select one... ActionScript AppleScript Asp BASIC C C++ Clojure COBOL ColdFusion Erlang Fortran Groovy Haskell Java JavaScript Lisp Perl PHP Python Ruby Scala Scheme Show underlying select Second set can be seen in live here Forget the toggle button, I'm not interested in that! What i want is redirection/hyperlink directly to the page which are linked in the value! Another option that I will be v.helpful with is Go button, when clicked on GO should redirect me to that page(hyperlink) Thanks in Advance
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/41517208
has comment: http://stackoverflow.com/comment/41520680
tagged with: javascript

http://stackoverflow.com/q/26489545
score: 1
possible better answer: http://stackoverflow.com/a/26525226
has comment: http://stackoverflow.com/comment/41637489
has title: RoR render PDF and print it automatically
type: Question
answer count: 2
tagged with: wicked-pdf
downvote count: 0
has comment: http://stackoverflow.com/comment/41676641
has comment: http://stackoverflow.com/comment/41639335
tagged with: javascript
linked to: http://stackoverflow.com/q/8240472
has comment: http://stackoverflow.com/comment/41613339
has answer: http://stackoverflow.com/a/26524452
upvote count: 1
accepted answer: http://stackoverflow.com/a/26524452
has body: I'm using wicked_pdf to render a PDF-File. The Web-App runs in chrome with kiosk-mode (--kiosk --kiosk-printing). The problem is that i have to open the print-dialog when the PDF is rendered, so that the PDF is printed automatically via kiosk. I tried this with the Javascript-function window.print(); in my PDF-/HTML-Template. But the function is not executed and no print-dialog is opened. Here my controller-method (materials_stocks_controller.rb): def create @material = Manufacturer::MaterialsStock.new(params[:manufacturer_materials_stock]) respond_to do |wants| if @material.save @materials = Manufacturer::MaterialsStock.ordered_collection wants.js { render :layout => false } wants.pdf { render :pdf => "Material-Barcode", :template => 'manufacturer/material_info', :show_as_html => !params[:debug].blank?, :page_height => 62, :page_width => 110, :margin => { :top => 3, :bottom => 3, :left => 0, :right => 3 }, :use_xserver => false, :print_media_type => true, "load-error-handling"=> "ignore" } else raise "Unable to create material in stock" end end end The view (material_info.pdf.erb): Has anyone an idea how to open the print-dialog? Thanks!! :) Update: I replaced the template-code completely with the page-number-JS-Code from the wicked_pdf-Docu and the JS is not running was well: new Code in material_info.pdf.erb (for testing): Page of
has comment: http://stackoverflow.com/comment/41621121
has answer: http://stackoverflow.com/a/26525226
has comment: http://stackoverflow.com/comment/41651086
favorite count: 0
has comment: http://stackoverflow.com/comment/41660732
tagged with: kiosk-mode
tagged with: ruby-on-rails
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41639417

http://stackoverflow.com/comment/41555931
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26457914
type: QuestionComment
has text: $(window).resize(IndexGrid.init);

http://stackoverflow.com/q/26467207
tagged with: onclick
score: 1
tagged with: selenium
upvote count: 1
has body: I am new in Selenium and I don't know if there is a way to search by javascript or onclick method. I have the following HTML ... &lt;td&gt; &lt;input id="Disable" class="buttons" type="button" name="Disable" onclick="javascript:actionPost('Edit', '1')" value="Disable"&gt; &lt;/td&gt; &lt;td&gt; &lt;input id="Edit" class="buttons" type="button" name="Edit" onclick="javascript:actionPost('Edit', 'LDAP_Test')" value="Edit"&gt; &lt;/td&gt; .... The only difference is in the javaScript command. The first command is with parameter "1" and the second with "LDAP_Test". How can I say to Selenium to click on the second button for example. I cannot change the HTML file. It should be used as it is. Thanks in advance.
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26467756
answer count: 1
downvote count: 0
favorite count: 0
has title: Selenium WebDrive - Find element by Javascript or onclick
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26467756

http://stackoverflow.com/comment/74239174
has text: saved me from hours!!
score: 0
comment on: http://stackoverflow.com/a/26512686
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26446552
favorite count: 0
has comment: http://stackoverflow.com/comment/41535915
type: Question
tagged with: php
has body: I'm developing a search system(multiple filters) that uses pagination with php. At first i was using the method POST with the main form. But, using POST i was unable to keep the pagination. Reason: when the user search by name, for example, as he clicks in the next pages the query get lost and return to the first page. To fix this i use GET method instead. But using GET, the url gets the parameters. And the users don't want that. Example: http://mysearch.com/search.php?name=joe&amp;id=1 I just want to be http://mysearch.com/search.php I tried this workaround: if(typeof window.history.pushState == 'function') { window.history.pushState({}, "Hide", "http://mysearch.com/search.php"); } But when i hit the "Previous Page/Back" in the browser, the URL with the parameters come back either. Is there a solution for this? Use GET or POST with pagination and the parameters does not shows in the URL?
has comment: http://stackoverflow.com/comment/41536173
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41536053
has comment: http://stackoverflow.com/comment/41535689
has comment: http://stackoverflow.com/comment/41535760
tagged with: pagination
tagged with: javascript
type: UnansweredQuestion
has title: PHP - Pagination: $_POST or $_GET
has comment: http://stackoverflow.com/comment/41535657
has comment: http://stackoverflow.com/comment/41535642
downvote count: 0
has answer: http://stackoverflow.com/a/26446689
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41535596

http://stackoverflow.com/comment/41635079
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26489721
score: 0
has text: @Andy sorry I mean "wrapping" :)

http://stackoverflow.com/comment/41601476
has text: What exactly do you need to do with the numbers?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26481617

http://stackoverflow.com/comment/56221115
has text: The first code snippet doesn't seem to work in Chrome 48. oldReady is simply null.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26447781

http://stackoverflow.com/comment/41634674
type: QuestionComment
type: Comment
has text: The code for `exPopupWindowMethod()` would be nice.
comment on: http://stackoverflow.com/q/26501347
score: 0

http://stackoverflow.com/a/26418435
type: Answer
has body: OP, not sure what your purpose is, but in general, this can be useful. I had a project where I needed to embed a fancy template from one site onto a page on a different site with a very different, and conflicting stylesheet. I used some code similar to the following to grab every applied style from the original content, via document.styleSheets, then reapplied them all as inline styles, so I could put it onto the "parent" site without the stylesheets conflicting. Fiddle JS var selector,rule; var result=[]; var sheets = document.styleSheets; for (var i in sheets) { //rules or cssRules, depending on the browser var rules = sheets[i].rules || sheets[i].cssRules; //iterate over every css rule in the document for (var r in rules) { selector=rules[r].selectorText; rule=rules[r].cssText; //select demo itself, as well as all of its children $('.demo, .demo *').each(function () { //console.log($(this),selector); //for each element, see if it matches the current rule. add if it does if ($(this).is(selector)) { result.push(rule); } }); } } console.log(result); //result[0] .demo { height: 100px; width: 100px; background: none repeat scroll 0% 0% rgb(255, 255, 0); } //result[1] .new_class { height: 40px; width: 40px; background: none repeat scroll 0% 0% rgb(153, 153, 153); } //result[2] #para { color: rgb(225, 225, 225); } Granted, you will have to tweak this on your own to do things like, removing duplicate styles that would occur if you were to apply this to a larger block of HTML, and for dealing with inline styles (which this does not attempt to do, but you can get them from the style attribute and work from there...), and possibly the computed style, which you can get with getComputedStyle, as indicated by the @Derek's answer. but this should get you started.
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/26418200
upvote count: 3

http://stackoverflow.com/a/26361603
upvote count: 1
downvote count: 0
has body: Since there are lots of complains about js-beautify, I'm posting this alternative: GIT: https://github.com/maxogden/commonjs-html-prettyprinter DEMO: http://requirebin.com/?gist=45056f6a9b306a14ea3d CODE: var htmlmodule = require('html'); var str = ' \n \n Hello \n \n \n '; var pretty = htmlmodule.prettyPrint(str); IF this does not work as you intend to, I recommend parsing the HTML string... for this job you can use this xmldom parseFromString... it's really simple.
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26360414

http://stackoverflow.com/a/26414761
score: 1
answers question: http://stackoverflow.com/q/26414640
upvote count: 1
type: Answer
has body: It's because your arr.push() is not working as you expect it to. It is pushing one jQuery object onto your array, not the 4 individual elements you expect. If you set your array as follows it will work: $(function() { var arr = $('.list ul li').get(); $('.list ul').html(arr.reverse()); }) 2011 2012 2013 2014
downvote count: 0

http://stackoverflow.com/q/26416304
score: 1
has answer: http://stackoverflow.com/a/39783030
has title: Reading CSV file in to an array using javascript
has answer: http://stackoverflow.com/a/26416647
answer count: 2
possible better answer: http://stackoverflow.com/a/26416647
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/39783030
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/41479991
has comment: http://stackoverflow.com/comment/41480121
has comment: http://stackoverflow.com/comment/41479920
type: AnsweredQuestion
has body: I'm trying to do something fairly simple I think but I'm missing something. I've very new to Javascript. I'm trying to read a CSV file in to an array (in my code below I'm simply trying to output the data to an alert box). I keep getting an error "access denied." function readTextFile(file) { var rawFile = new XMLHttpRequest(); rawFile.open("GET", file, true); rawFile.onreadystatechange = function () { if(rawFile.readyState === 4) { if(rawFile.status === 200 || rawFile.status == 0) { var allText = rawFile.responseText; alert(allText); } } } rawFile.send(null); } I suspect there is an issue with where I have the csv file located? Due to restrictions with our CMS I can only reference the file like this www.example.com/csvfile.csv. Any help would be greatly appreciated.
upvote count: 1
type: Question

http://stackoverflow.com/comment/41588995
has text: line 36 is just a PHP line using the session variable gender - $_SESSION['gender']. Many session variables are getting these errors. That said I'm very sure its related to the JS above. eg: If I comment out the JS above the session errors don't appear anymore.
score: 0
comment on: http://stackoverflow.com/q/26475641
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41696258
comment on: http://stackoverflow.com/a/26512455
score: 0
type: Comment
has text: Sorry for late response. I saw that width and height of your image inside of "hidden" container is `w: 0; h: 0`. Now I can't check again because you removed that from the website. But, at least that was the only problem I noticed for not showing hidden content from hidden container after button click.
type: AnswerComment

http://stackoverflow.com/comment/41508703
type: Comment
has text: Just added a new question. Not sure if the question is clear enough. Many thanks.
comment on: http://stackoverflow.com/a/26430886
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41582575
has text: @tymeJV the script is in the head, it works on JSfiddle but when i load it up on dreamweaver presing f12, it doesnt work, its wierd.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26472477

http://stackoverflow.com/comment/41590310
type: Comment
type: QuestionComment
has text: Look at `src/node_file.cc` and `lib/fs.js` in the node source. Also look at _how Node/V8 C++ extensions are written_ that will explain all of it.
score: 3
comment on: http://stackoverflow.com/q/26476591

http://stackoverflow.com/comment/41452266
comment on: http://stackoverflow.com/a/26399073
has text: @poojaagarwal Event runs twice, one for the source container, and one for the target container. You need to put checks inside the handler to see which is which.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26357909
type: AnsweredQuestion
upvote count: 3
downvote count: 2
type: Question
score: 1
tagged with: math
has comment: http://stackoverflow.com/comment/41374767
has title: Very Basic Math Script Using AJAX?
linked to: http://stackoverflow.com/q/19571718
has body: I wanna ask if is it possible to do very basic math inside form's input text field using AJAX? I know its possible with javascript/jquery but I don't want to having to clicking submit button and reload the page to see the result. I want the math calculation with instant result inside the input text field. example: Input Text Field 1 + Input Text Field 2 = (Shows Instant Result in Input Text Field 3)
has answer: http://stackoverflow.com/a/26358110
has comment: http://stackoverflow.com/comment/41374639
has answer: http://stackoverflow.com/a/31338579
answer count: 3
has answer: http://stackoverflow.com/a/26358040
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/26358040
has comment: http://stackoverflow.com/comment/41374289
accepted answer: http://stackoverflow.com/a/26358110

http://stackoverflow.com/comment/41603095
has text: I tried to define the routes like this routes: {'','settings':'main' } when I try to run the application, I get an error telling "Unexpected token , "
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26402801

http://stackoverflow.com/q/26485400
has comment: http://stackoverflow.com/comment/41607229
has body: I am displaying line chart using easy dashboard java script library.But it is throwing error 401 login required.I created project in Google developer console and generated keys for it. As 401 error code explains that credentials are wrong.Tell me what is the fault. Any help will be appreciated.Thanks in advance Here is the code for this GA Dash Demo Authorize Analytics
has comment: http://stackoverflow.com/comment/41606654
type: Question
has comment: http://stackoverflow.com/comment/41606747
has comment: http://stackoverflow.com/comment/41606823
tagged with: google-analytics-api
has comment: http://stackoverflow.com/comment/41961875
tagged with: google-analytics
has comment: http://stackoverflow.com/comment/41607218
score: 0
has title: 401 login required error while displaying chart using easy dashboard javascript library
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41606540
tagged with: google-api-js-client

http://stackoverflow.com/q/26409415
has answer: http://stackoverflow.com/a/26409442
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/26409442
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26409452
tagged with: syntax-error
answer count: 2
tagged with: function
downvote count: 0
has title: Invoking a javascript function with string arguments
favorite count: 0
tagged with: arguments
accepted answer: http://stackoverflow.com/a/26409452
has body: I've recently encountered an error while trying to run a function with more than one argument. &lt;button type = "button" id = "clickmepls" onclick = killButton("clickmepls", "grave1")&gt; Click me please &lt;/button&gt; The function's definition is the following: function killButton(buttonname, graveID){ /* some code */ } When the script is run, I'm given the following error: https://i.sstatic.net/dWpvO.png It happens whenever there is more than one argument in the function - the first one is shown in the error window, the arrow always points at what (doesn't) come after. What is the reason behind this?
type: AnsweredQuestion

http://stackoverflow.com/q/26394930
has answer: http://stackoverflow.com/a/26401990
score: 0
answer count: 2
type: UnansweredQuestion
tagged with: ember.js
has title: Ember.js Render multiple views inside static HTML
has body: I'm new to Ember and I'm stuck trying to render views. The application in context is not a single page application but so far Ember has been playing nice until I started dealing with views. I'm trying to render more than one view on a single page (which is like a dashboard and has tons of static HTML and a few containers, one for each view). Sample HTML: Let's say I would like to render two lists, one inside the "left-container" div and the other inside the right container. &lt;div class="static-header&gt;&lt;/div&gt; &lt;!-- more static content goes here --&gt; &lt;div id="left-container"&gt;&lt;/div&gt; &lt;!-- more static content goes here --&gt; &lt;div id="right-container"&gt;&lt;/div&gt; ... I've tried creating different views and inserting them using the appendTo method (which is described in the Defining a View section of Ember guides) but it throws the error: Container was not found when looking up a views template. This is most likely due to manually instantiating an Ember.View. See: http://git.io/EKPpnA and I couldn't find my way using the link that it points to. Ember code: var App = Ember.Application.create({}); App.HomeViewLeft = Ember.View.extend({ templateName: 'home-left', }); var view = App.HomeViewLeft.create(); view.appendTo('#left-container'); I have also tried using a ContainerView as described in Ember api docs: App.HomeViewLeft = Ember.View.extend({ templateName: 'home-left', }); var containerView = Ember.ContainerView.create({ classNames: ['container-view'], }); containerView.pushObject(App.HomeViewLeft.create()); containerView.appendTo('left-container'); But I get the same error. How should I render each view inside the #left-container and #right-container respectively? Thanks in advance.
type: Question
has answer: http://stackoverflow.com/a/29707401
tagged with: javascript

http://stackoverflow.com/comment/41657135
type: QuestionComment
comment on: http://stackoverflow.com/q/26513621
type: Comment
has text: I didn't know you could use variables as functions `setTimeout(howmuch(0),500);`
score: 0

http://stackoverflow.com/comment/41628881
type: QuestionComment
has text: that is not json, that is a javascript variable assignment statement.
score: 0
comment on: http://stackoverflow.com/q/26498043
type: Comment

http://stackoverflow.com/a/26440048
has comment: http://stackoverflow.com/comment/41523716
upvote count: 2
score: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26440014
has body: jQuery(function(){}) // or $(function(){}) is the short for DOM ready jQuery(document).ready(function(){ }); So, it is where it belongs. Also, use of jQuery might be to avoid conflict between the usage of $ in jQuery and other libraries. So, if that is the case, I'd avoid the use of $ and instead go with jQuery
has comment: http://stackoverflow.com/comment/41523835
accepted answer of: http://stackoverflow.com/q/26440014
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41523881
type: Answer
has comment: http://stackoverflow.com/comment/41523761

http://stackoverflow.com/a/26504836
type: Answer
has comment: http://stackoverflow.com/comment/41644317
has comment: http://stackoverflow.com/comment/41644551
upvote count: 1
score: 1
has body: You have syntax issues, you need to pass the css property and value as 2 arguments or pass a object $("#info").css('font-size', fontsX +'px');
accepted answer of: http://stackoverflow.com/q/26504797
answers question: http://stackoverflow.com/q/26504797
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41645598
downvote count: 0

http://stackoverflow.com/q/26394224
has answer: http://stackoverflow.com/a/26396116
has comment: http://stackoverflow.com/comment/41440740
tagged with: javascript
tagged with: jquery
has title: Is input type="password" secure?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41440729
has comment: http://stackoverflow.com/comment/41440736
favorite count: 0
type: UnansweredQuestion
downvote count: 6
has comment: http://stackoverflow.com/comment/41440762
has comment: http://stackoverflow.com/comment/41440741
has body: Hi i tried test of password input and I think it is not safe! Why the passwords copy as plain text, and remain only stars (dots). I have two inputs, first password and second text with same class &lt;input class="pass" type="password"/&gt; &lt;input class="pass" type="text"/&gt; I tried write this js: $(".pass").keyup(function(event) { $("." + $(this).attr("class")).not(this).val($(this).val()); }); Check the JSFIDDLE What do you think?
type: Question
upvote count: 4
answer count: 2
score: -2
has answer: http://stackoverflow.com/a/26394256

http://stackoverflow.com/comment/41609849
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26487865
has text: move `function game()` out of the `$()`(dom ready) then call `$(game)` and `setInterval(game, 1000/60)`
score: 5

http://stackoverflow.com/q/26500724
tagged with: javascript
tagged with: search
answer count: 2
accepted answer: http://stackoverflow.com/a/34443980
tagged with: http://stackoverflow.com/tag/html
has title: Google Custom Search searchbox not showing
downvote count: 0
favorite count: 0
has body: I've just created a Google Custom Search for my website. There are 2 parts of code: for searchbox and for search results. I inserted the first code into the body tag, but searchbox doesn't appear on the website. What I'm doing wrong?! &lt;body&gt; &lt;div&gt; &lt;script&gt; (function() { var cx = '004556147665872853919:poyz6b7kmfw'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); &lt;/script&gt; &lt;gcse:searchbox&gt;&lt;/gcse:searchbox&gt; &lt;/div&gt;
tagged with: css
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/34443980
has answer: http://stackoverflow.com/a/26501119
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26501119

http://stackoverflow.com/q/26378509
has title: Passing php-objects to javascript
has comment: http://stackoverflow.com/comment/41412260
has comment: http://stackoverflow.com/comment/41412268
score: 0
answer count: 1
has body: I would like to know if it is possible to create a php-object and use it and its methods in my JavaScript. For example, I have the following php-script: &lt;?php class Foo { public function bar() { //do something here } } ?&gt; Then I could send an AJAX-request to the server and grab an instance of Foo: $.ajax({ type: "POST", url: "path/to/Foo/Foo.php", data: { action: "get-object" }, dataType: 'json', success : function(data){ alert("My Foo object: "+data); }, error : function(XMLHttpRequest, textStatus, errorThrown) { alert("Did not work"); } }); Of course I would have to extend Foo.php a bit so that it returns me an instance of class Foo. I tried that and it did not work, my data variable is always empty. So is there another approach to get an instance of a php-class and call methods on it in Javascript?
accepted answer: http://stackoverflow.com/a/26378568
tagged with: php
has answer: http://stackoverflow.com/a/26378568
type: AnsweredQuestion
type: Question
tagged with: javascript

http://stackoverflow.com/q/26390804
favorite count: 0
tagged with: forever
type: UnansweredQuestion
has title: Node JS: Running server all the time
has answer: http://stackoverflow.com/a/26391149
tagged with: node.js
has comment: http://stackoverflow.com/comment/41434947
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41437063
linked to: http://stackoverflow.com/q/12701259
type: Question
tagged with: javascript
duplicate of: http://stackoverflow.com/q/12701259
tagged with: express
has comment: http://stackoverflow.com/comment/41435282
score: 0
has comment: http://stackoverflow.com/comment/41434913
answer count: 1
has body: I was wondering if anyone had some insight on running a Node API app built with Express. I built a set of API end points using Express and I uploaded the Node app to my server on A Small Orange. The issue is that once I start the app through my terminal I have to keep the terminal open and my computer on in order to keep the API end points up and running. I started to experiment with the npm forever-monitor, but it keeps crashing when I run express and forever-monitor in the same app. Any insight would be appreciated. Thanks,

http://stackoverflow.com/comment/41566645
comment on: http://stackoverflow.com/q/26464272
score: 0
type: Comment
type: QuestionComment
has text: You can use [.each()](http://api.jquery.com/each/)

http://stackoverflow.com/a/26483900
upvote count: 3
has comment: http://stackoverflow.com/comment/41603122
accepted answer of: http://stackoverflow.com/q/26483855
answers question: http://stackoverflow.com/q/26483855
has body: Two problems with what you currently have: if (j&lt;3){var vval = 10000}; if (j=3){var vval = 5000}; if (j&gt;4){var vval = 2500}; Firstly, j = 3 assigns the value 3 to j. It doesn't check to see whether j is equal to 3. To fix this, change this to == or ===: if (j === 3) { var vval = 5000; } This is why your application is becoming slow, because your for loop is getting stuck in a loop as after a certain point j will always be equal to 3. Secondly, you should use else if, otherwise all three if statements will be checked even if the first one satisfied the requirement: if (j &lt; 3) { var vval = 10000 } else if (j === 3) { var vval = 5000 } else if (j &gt; 4) { var vval = 2500 } Also note that putting semicolons after the curly brackets on if statements is unnecessary, so I've removed those as well.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41603752
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/41603414

http://stackoverflow.com/comment/41471932
score: 0
type: Comment
type: QuestionComment
has text: [Fiddle](http://jsfiddle.net/), maybe?
comment on: http://stackoverflow.com/q/26411867

http://stackoverflow.com/comment/41657863
type: AnswerComment
comment on: http://stackoverflow.com/a/26504525
score: 0
has text: Sorry i cant get you, more confusing is that you cant create a fiddle for it
type: Comment

http://stackoverflow.com/q/26425345
has comment: http://stackoverflow.com/comment/41495758
accepted answer: http://stackoverflow.com/a/27010766
has body: I am trying to use the angular google maps directive with my app, but I keep getting an "undefined error" This is my app.js angular.module('app', ['cs']) .config(['GoogleMapApiProvider'.ns(), function (GoogleMapApi) { GoogleMapApi.configure({ // key: 'your api key', v: '3.17', libraries: 'weather,geometry,visualization' }); }]) .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { //routes }]) and my controller angular.module('cs.Controllers') .controller('MapController', ['$rootScope', '$scope', '$window', '$document', 'MenuService', 'GoogleMapApi'.ns(), function($rootScope, $scope, $window, $document, menuService, GoogleMapApi) { $rootScope.menuList = menuService.all(); }]); What could be the problem
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41699965
has title: .ns() undefined in google angular maps directive
has comment: http://stackoverflow.com/comment/41497892
tagged with: google-maps-api-3
possible better answer: http://stackoverflow.com/a/26429932
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26429932
has answer: http://stackoverflow.com/a/27010766
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
type: Question
linked to: http://stackoverflow.com/q/26867638

http://stackoverflow.com/comment/41446157
score: 0
type: Comment
has text: This does not answer the questions asked. It just suggests a workaround, without even saying why it would be better than the one in the question.
type: AnswerComment
comment on: http://stackoverflow.com/a/26396807

http://stackoverflow.com/a/26418244
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26417480
answers question: http://stackoverflow.com/q/26417480
has body: As per my comment above you can't create a form which can't be redirected. When a form is posted it'll always redirect to self or another page.
type: AcceptedAnswer

http://stackoverflow.com/comment/41448829
has text: Seems like you have a good grasp of the concept, so what's the issue? Just write the code for the process you've outlined...
comment on: http://stackoverflow.com/q/26399121
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41444218
type: Comment
has text: @Vivek Pradhan, I need to collect all array type property of an object.
score: 0
comment on: http://stackoverflow.com/a/26396335
type: AnswerComment

http://stackoverflow.com/a/26414127
type: Answer
has body: If I got you right, this might solve your problem. See the JSfiddle link: http://jsfiddle.net/90xn59ot/3/ JS code: // Little modifications var area = $('article').children('div.inner').children('header'), area2 = $('article &gt; .inner &gt; header'), area3 = 'article &gt; .inner &gt; header'; // Basically with the single element // If you have more than one element // -&gt; simply loop over them... // // @example // // for(var i = 0; i &lt; area.length; i++) { // $('div.main').on('click', area[i].tagName, function () { // #code goes here... // } // } $('div.main').on('click', area[0].tagName, function () { alert('Activate me only'); area[0].style.backgroundColor = getRandomColor(); area[0].style.color = getRandomColor(); }); // This one is just for fun... function getRandomColor() { var letters = '0123456789ABCDEF'.split(''); var color = '#'; for (var i = 0; i &lt; 6; i++ ) { color += letters[Math.floor(Math.random() * 16)]; } return color; }
answers question: http://stackoverflow.com/q/26412872
score: 0

http://stackoverflow.com/comment/41529030
comment on: http://stackoverflow.com/a/26416407
type: AnswerComment
score: 22
has text: Alternatively (and probably a good idea), is to wrap the `React.render` call in an onload/ready listener. Then it won't matter where you put the script tag as the node will exist.
type: Comment

http://stackoverflow.com/q/26405737
type: AnsweredQuestion
has title: Remove original element after drop
has answer: http://stackoverflow.com/a/26405919
has body: I'm using a modified version of this fiddle : JSFIDDLE I would like to know how to hide or make undraggable the original element if it has been placed on a correct box. Eg. If i drag box "I am 4" onto a box that accepts it , the box stays there . The original box should be disabled from being dragged to another box. JS CODE : &lt;script type='text/javascript'&gt; $(window).load(function(){ $(".DragItem").draggable({ revert: "invalid", start: function(){ $(this).data("origPosition",$(this).position()); }, helper: "clone" }); $(".DropItem").droppable({ accept: ".DragItem", over: hover_drop, out: out_drop, drop: function( event, ui ) { if($(this).attr("id").indexOf($(ui.draggable).attr("id")) &gt; -1) { $(this).append($(ui.helper).clone()); $(this).removeClass('DropTargetValid DropTargetInvalid'); } else { var newrrr = $(ui.helper).clone(); $(this).append(newrrr); newrrr.animate(ui.draggable.data().origPosition,"slow").fadeOut("slow"); $(this).removeClass('DropTargetValid DropTargetInvalid'); } } }); function hover_drop( event, ui ) { //console.log($(ui.draggable).position()); if ($(this).attr("id").indexOf($(ui.draggable).attr("id")) &gt; -1){ $(this).addClass('DropTargetValid'); } else { $(this).addClass('DropTargetInvalid'); } } function out_drop( event, ui ) { $(this).removeClass('DropTargetValid DropTargetInvalid'); } }); &lt;/script&gt;
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26406000
has answer: http://stackoverflow.com/a/26406000
accepted answer: http://stackoverflow.com/a/26405919
score: 0
answer count: 2
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/26505494
accepted answer: http://stackoverflow.com/a/26505688
score: 0
has comment: http://stackoverflow.com/comment/41641744
answer count: 1
has comment: http://stackoverflow.com/comment/41641801
has body: In my project I have a javascript function that runs asynchronously a query that performs an insert into a MYSQL table (InnoDB) whenever the event onscroll occurs (after the event is stopped for at least 200 msec) var delay = 200; var timeout = null; var fScroll = 0; $(window).on('scroll', function (e) { clearTimeout(timeout); timeout = setTimeout(function(){ var ypage = window.pageYOffset; var sesId = responseSID.sesID; var pDest = $(location).attr('href'); $.get( /php/regScroll.php", { P1: "E", P2: ypage, P3: sesId, P4: pDest } ); fScroll = 0; },delay); }); This event occurs many times over then, although the data that should be included are very small, the INSERT statement is called many many times per minute, and in the case of multiple concurrent users it is sometimes possible that the row is not inserted into the table. Do you have some tips to manage INSERT into InnoDB tables very close together with MySql ?? Thanks in advance
has comment: http://stackoverflow.com/comment/41641794
has comment: http://stackoverflow.com/comment/41642026
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26505688
tagged with: sql-insert
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/41641867
tagged with: innodb
has title: Mysql multiple INSERT in a very little time
tagged with: javascript
has comment: http://stackoverflow.com/comment/41642437

http://stackoverflow.com/a/26511636
answers question: http://stackoverflow.com/q/26509720
score: 0
has body: I made couple of changes to your code in JSFiddle and the pagination worked. Here is the link to the modified jsfiddle. http://jsfiddle.net/moLwmyyr/ I removed &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt; And used JSFiddle Frameworks and Extensions to include jQuery I changed the jQuery UI include to &lt;script src="https://code.jquery.com/ui/1.11.1/jquery-ui.js"&gt;&lt;/script&gt; I moved the jQuery.fn.extend({ paginateAccordion: function (options) { var currentPage = options.currentPage ?parseInt(options.currentPage, 10) : 0; var itemsPerPage = options.itemsPerPage ? parseInt(options.itemsPerPage, 10) : 5; var paginatorControl = options.paginatorControl; return new AccordionPaginator(this, currentPage, itemsPerPage, paginatorControl); } }); Above your document ready method. And changed the following line. element.accordion("activate", index); To element.accordion("option", "activate", index); The pagination works. I observed some glitch when you go to the next page and click on the section 5, it is not collapsing section 4.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26509720
type: Answer

http://stackoverflow.com/comment/41585411
type: QuestionComment
comment on: http://stackoverflow.com/q/26473952
score: 2
has text: What is the question?
type: Comment

http://stackoverflow.com/q/26470016
has title: How can I use jQuery/Javascript to hide elements that before anchor tags?
has comment: http://stackoverflow.com/comment/41577919
has answer: http://stackoverflow.com/a/26470148
linked to: http://stackoverflow.com/q/5580287
accepted answer: http://stackoverflow.com/a/26470263
has comment: http://stackoverflow.com/comment/41577897
possible better answer: http://stackoverflow.com/a/26470148
tagged with: dom
has body: So I'm currently working in Blackbaud/Convio CRM, and I have a question regarding using Javascript or jQuery to hide elements that are rendered onto the DOM, from the backend. Here is the code that is rendered from the backend, onto the DOM: &lt;div id="wrapperBlock"&gt; &lt;div class="topList"&gt;TOP COLORS&lt;/div&gt; &amp;nbsp;&amp;nbsp;1&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1025&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Orange&lt;/a&gt; &amp;nbsp;($100) &lt;br /&gt; &amp;nbsp;&amp;nbsp;2&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1022&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Black&lt;/a&gt; &amp;nbsp;($80) &lt;br /&gt; &amp;nbsp;&amp;nbsp;3&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1026&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Green&lt;/a&gt; &amp;nbsp;($75) &lt;br /&gt; &amp;nbsp;&amp;nbsp;4&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1024&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Yellow&lt;/a&gt; &amp;nbsp;($68) &lt;br /&gt; &amp;nbsp;&amp;nbsp;5&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1020&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Blue&lt;/a&gt; &amp;nbsp;($55) &lt;br /&gt; &amp;nbsp;&amp;nbsp;6&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1027&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Red&lt;/a&gt; &amp;nbsp;($43) &lt;br /&gt; &amp;nbsp;&amp;nbsp;7&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1021&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Purple&lt;/a&gt; &amp;nbsp;($30) &lt;br /&gt; &amp;nbsp;&amp;nbsp;8&amp;nbsp;-&amp;nbsp; &lt;a href="http://rcf.convio.net/site/TR?company_id=1023&amp;amp;fr_id=1341&amp;amp;pg=company"&gt;Pink&lt;/a&gt; &amp;nbsp;($47,546.81) &lt;br /&gt; &lt;/div&gt; The output onto the page looks something like this: 1 - Orange ($100) 2 - Black ($80) 3 - Green ($75) 4 - Yellow ($68) 5 - Blue ($55) 6 - Red ($43) 7 - Pu…
answer count: 2
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/26470263
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
score: 0

http://stackoverflow.com/comment/41453343
has text: looks fine - http://jsfiddle.net/arunpjohny/41h7n0f6/1/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26401801
type: QuestionComment

http://stackoverflow.com/a/26386597
score: 4
has body: For this purpose I made myself a directive couple of projects ago: angular.module('myApp') .directive('ngHtmlCompile', ["$compile", function ($compile) { return { restrict: 'A', link: function (scope, element, attrs) { scope.$watch(attrs.ngHtmlCompile, function (newValue, oldValue) { element.html(newValue); $compile(element.contents())(scope); }); } } }]); and then for example: &lt;div ng-html-compile='&lt;div ng-repeat="item in items"&gt;{{item.data}}&lt;/div&gt;'&gt;&lt;/div&gt; or even the string can be dynamic: &lt;div ng-repeat="item in items" ng-html-compile="item.template"&gt; &lt;/div&gt;
answers question: http://stackoverflow.com/q/26386470
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/26392411
has body: The Situation I have a string that I want to match the same capture group multiple times. I need to be able to get at both matches. Example Code var curly = new RegExp("{([a-z0-9]+)}", "gi"); var stringTest = "This is a {test} of my {pattern}"; var matched = curly.exec(stringTest); console.log(matched); The Problem Right now, it only shows the first match, not the second. JSFiddle Link http://jsfiddle.net/npp8jg39/
tagged with: regex
has comment: http://stackoverflow.com/comment/41437856
answer count: 4
has comment: http://stackoverflow.com/comment/41477007
possible better answer: http://stackoverflow.com/a/55983161
downvote count: 1
has title: JS: How to match one capture group multiple times in the same string?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26392494
accepted answer: http://stackoverflow.com/a/26392494
has answer: http://stackoverflow.com/a/55983161
has answer: http://stackoverflow.com/a/26392451
upvote count: 10
score: 9
type: Question
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26392440

http://stackoverflow.com/q/26411201
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26411229
favorite count: 0
has answer: http://stackoverflow.com/a/26411229
has title: Passing a string to javascript function
type: AnsweredQuestion
score: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/26411214
type: Question
upvote count: 2
answer count: 2
has body: Simple question. How do I pass a string to a javascript function and make a popup box alert containing the contents of that string? Here's what I have: The test.html.erb file. &lt;%= link_to 'Test','#', onclick: 'test(helloworld)', class: "btn btn-xs btn-primary" %&gt; Here's the test.js file: function test(name){ alert(name); } However, when I click on the "Test" link that gets generated, "helloworld" doesn't pop up. Nothing happens.
has answer: http://stackoverflow.com/a/26411214

http://stackoverflow.com/comment/41518454
type: AnswerComment
has text: @arao6 Agreed, then a Cache like NCache is a solution which spans across a web farm and there's no issue with syncing across the servers. Static approach is more of a traditional logic, Cache solution is working on similar logic, though it spans across servers
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26436983

http://stackoverflow.com/comment/41513107
comment on: http://stackoverflow.com/q/26434134
score: 2
has text: seriously, you need to at least spend couple days to read about how to code before you jump into it. It is NOT easy.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41512067
score: 0
has text: I was looking at AngularJS because it's realtime(onepage) but wasn't sure if that would be the best option to do this. But might be the only choice.
type: AnswerComment
comment on: http://stackoverflow.com/a/26433619
type: Comment

http://stackoverflow.com/a/26468869
type: Answer
accepted answer of: http://stackoverflow.com/q/26467567
answers question: http://stackoverflow.com/q/26467567
upvote count: 1
has body: var autoScrollerTimer = null; var autoScrollerTimerTwo = null; function autoChangeImage() { autoScrollerTimer = setTimeout(function(){ $("#magazin_sldwr li.active") .removeClass('active') .nextThumb() .addClass('active') .find('img') .trigger('mouseenter'); autoChangeImage(); }, 2000); } function autoChangeImageTwo() { autoScrollerTimerTwo = setTimeout(function(){ $("#magazin_sldwr2 li.active") .removeClass('active') .nextThumb() .addClass('active') .children('img') .trigger('mouseenter'); autoChangeImageTwo(); }, 3000); } $(document).ready(function() { var c; $("#magazin_sldwr li img").hover(function(){ c = $(this).attr('alt'); clearTimeout(autoScrollerTimer); $(".title").remove(); $(this).parent('li').addClass('active').siblings().removeClass('active'); $('#mainm-img').attr('src',$(this).attr('src').replace('thumb/', '')).parent().attr('href',$(this).parent().attr('href'),$("#mainm-img").parent().append(' ' + c + ' ')); }, function(){ autoChangeImage(); }); var imgSwap = []; $("#magazin_sldwr li img").each(function(){ imgUrl = this.src.replace('thumb/', ''); imgSwap.push(imgUrl); }); autoChangeImage(); $("#magazin_sldwr2 li img").hover(function(){ clearTimeout(autoScrollerTimerTwo); $(this).parent('li').addClass('active').siblings().removeClass('active'); $('#mainm-img2').attr('src',$(this).attr('src').replace('thumb/', '')); }, function(){ autoChangeImageTwo(); }); var imgSwap = []; $("#magazin_sldwr2 li img").each(function(){ imgUrl = this.src.replace('thumb/', ''); imgSwap.push(imgUrl); }); autoChangeImageTwo(); }); $.fn.nextThumb = function(){ var next = $(this).next('li'); if (next.length) { return next; } else { return $(this).parent().find('li:first'); } }; $.fn.preload = function() { this.each(function(){ $(' ')[0].src = this; }); }; body,html,div,blockquote,img,label,p,h1,h2,h3,h4,h5,h6,pre,ul,ol,li,dl,dt,dd,form,a,fieldset,input,th,td{border:0;outline:none;margin:0;padding:0;} body{height:100%;background:#fff;color:#1f1f1f;font-family:"Lucida Sans Unicod…
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/q/26358362
has comment: http://stackoverflow.com/comment/41410997
type: Question
has title: Fabric js overlay text in custom controls
has answer: http://stackoverflow.com/a/26378290
tagged with: javascript
tagged with: fabricjs
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41409424
type: UnansweredQuestion
has body: I implemented an application based on Fabric js, and I changed default controls (normal squares) with custom images and functions (as remove object, etc.), modifying fabric code. It works fine, but I want to add an overlay message explaining what does each control when you stay over the control 1 or 2 seconds. It´s possible? If the answer is yes, How could implement this feature? Thanks in advance.

http://stackoverflow.com/q/26415000
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26415044
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41477802
type: AnsweredQuestion
score: 1
has title: Detect line break in text with javascript
upvote count: 1
type: Question
has body: I'm able to set line break with javascript in an element, but I can't read them. Example: &lt;div id="text"&gt;&lt;/div&gt; Js: document.getElementById("text").innerHTML = "Hello &lt;br /&gt; World"; var x = document.getElementById("text").innerHTML; if(x == "Hello &lt;br /&gt; World") { alert('Match'); } There is no match in my case...
tagged with: javascript
has answer: http://stackoverflow.com/a/26415044
tagged with: dom

http://stackoverflow.com/q/26410570
possible better answer: http://stackoverflow.com/a/26410804
has answer: http://stackoverflow.com/a/26410804
score: 1
has comment: http://stackoverflow.com/comment/41469568
has answer: http://stackoverflow.com/a/26410697
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41469444
accepted answer: http://stackoverflow.com/a/26410697
tagged with: javascript
favorite count: 0
tagged with: node.js
has comment: http://stackoverflow.com/comment/41470127
has body: I am a newbie with nodejs. I installed globally modules zepto and jsdom : npm install jsdom -g npm install zepto -g I checked with npm list -g. These modules are installed. But when I reference these two modules in a script using require: var jsdom = require("jsdom"); var Zepto = require("zepto"); I got an error message : Error: Cannot find module 'zepto' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.&lt;anonymous&gt; (/home/user554/dev/exchange/bin/getExchangeData.js:6:13) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) I tried with only jsdom and only zepto. Only Zepto fails. What am I missing ? Thank you for your help.
upvote count: 1
has comment: http://stackoverflow.com/comment/41470448
has title: zepto module in nodejs not found
tagged with: zepto
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/41588149
type: Comment
type: QuestionComment
score: 1
has text: As a note, SO isn't a forum, so things which may be normal in a forum are not normal here... such as marking questions as solved via a tag in the title. There is already programming in place for this.
comment on: http://stackoverflow.com/q/26474191

http://stackoverflow.com/q/26446608
downvote count: 0
score: 1
tagged with: dom-events
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: Question
has body: To make my question straightforward, here's an example: http://jsfiddle.net/542afcfg/1/ document.getElementById('parent').addEventListener('click', function (e) { alert('Clicked!'); }); <g id="parent"> <g id="child1"> </g> <g id="child2"> </g> </g> If you start by clicking on any given child circle, and release on the other, Chrome decides that it makes sense to fire the click event while Firefox and Safari do not. I feel since the children are grouped by the g parent element, it should fire the click event. Anyone know what the spec says?
accepted answer: http://stackoverflow.com/a/26446834
has title: What is the behavior of click event bound on SVG group element yet triggered on child element and completed on another?
upvote count: 1
answer count: 1
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26446834

http://stackoverflow.com/comment/41388713
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/1510778/are-javascript-arrays-sparse
score: 0
comment on: http://stackoverflow.com/q/26364745

http://stackoverflow.com/comment/41620085
comment on: http://stackoverflow.com/q/26490264
score: 0
has text: I'd guess that's because Backbone uses _.isEqual to see if model attributes have changed. It just does a simple comparison, which completely fails complex objects (arrays, objects, Models, Collections). You may have to override the changedAttributes on your model to append 'type' if any of the collections's models have changed attributes of their own.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41570976
comment on: http://stackoverflow.com/a/26466411
score: 0
type: AnswerComment
type: Comment
has text: It works good but only problem is that everytime it is taking last value .I tried to call it in follwoing manner `$(function() { var test1 = myCall('AP', $('#stat1')); var test2 = myCall('BP', $('#stat2')); });` and again called in HTML as ` `

http://stackoverflow.com/q/26358784
score: 1
has body: I need to create an animation of dropping box, which supposed to bounce 10 times when it reaches a certain Y point on canvas, each time twice lower that the previous. So I have the animation of the dropping box, but I can't make the bounce work. Here are the functions that I wrote: function dropBox(y, width, height) { var img_box = new Image(); img_box.src = 'images/gift_box_small.png'; var box_y_pos = y; if(y==0) box_y_pos = y-img_box.naturalHeight; img_box.onload = function(){ ctx_overlay.save(); ctx_overlay.clearRect(0,0,width,height); ctx_overlay.drawImage(img_box, (width/2)-(img_box.naturalWidth/2), box_y_pos); ctx_overlay.restore(); } box_y_pos += 3; var box_bottom_position = box_y_pos - img_box.naturalHeight; if(box_y_pos+img_box.naturalHeight&lt;height-25) var loopTimer = setTimeout(function() {dropBox(box_y_pos, width, height)},24); else bounceBox(img_box, box_y_pos, box_y_pos, (height/2)-(img_box.naturalHeight/2), "up"); } function bounceBox(img, img_final_pos, y, midway_pos, direction){ var midway = midway_pos; var direction = direction; var img_y_pos = y; img.onload = function(){ ctx_overlay.save(); ctx_overlay.clearRect(0,0,docWidth,docHeight); ctx_overlay.drawImage(img, (docWidth/2)-(img.naturalWidth/2), img_y_pos); ctx_overlay.restore(); } for(var i = 0; i &lt; 10; i++){ if(direction=="up"){ //going up if(img_y_pos&gt;midway_){ img_y_pos -= 3; var loopTimer = setTimeout(function() {bounceBox(img, img_final_pos, img_y_pos, midway_pos, "up")},24); } else { img_y_pos += 3; midway = Math.floor(midway /= 2); if(midway%2&gt;0) midway += 1; var loopTimer = setTimeout(function() {bounceBox(img, img_final_pos, img_y_pos, midway_pos, "down")},24); } } else { //going down if(img_y_pos &lt; img_final_pos){ img_y_pos += 3; var loopTimer = setTimeout(function() {bounceBox(img, img_final_pos, img_y_pos, midway_pos, "down")},24); } } } } JSFiddle: http://jsfiddle.net/n2derqgw/3/ Why isn't it working and how can I make it work?
type: Question
has comment: http://stackoverflow.com/comment/41385227
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26363610
tagged with: canvas
has title: Creating a bouncing box animation on canvas
upvote count: 1
tagged with: html5-canvas
answer count: 1
has answer: http://stackoverflow.com/a/26363610
favorite count: 0
tagged with: animation
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/26505348
has comment: http://stackoverflow.com/comment/41670779
has comment: http://stackoverflow.com/comment/41672886
has body: arrayNew.unshift(minumum); is wrong variable minimum correct one : arrayNew.unshift(minimum);
answers question: http://stackoverflow.com/q/26505309
type: Answer
score: 0

http://stackoverflow.com/q/26478011
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: AngularJS detect end of input from http.get()
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I have a PHP script that outputs data from a database. Sample would be: [ {"id" : "1","name" : "myName1","thumb_width" : "360"}, {"id" : "2","name" : "myName2","thumb_width" : "360"}] Or something similar. I'm reading in quite a few records. Problem is Angular is reacting when it gets too few. I'm lazy loading these images. As it were, it reads in one row, displays it, then thinks it's the last so disables the lazy loading, then I get more. :-/ I can put in some tacky entry into the output, but is there a more elegant solution that's native to get? It works somewhat like this: function imagesController($scope,$http) { $http.get( site + page ) .success(function(response) { for ( var i = 0; i &lt; response.length; i++ ) { // parse responses } } $scope.loadMore = function() { // Figure out how much to load here // if we're at the end, disable lazy loading. } }; See it in action here http://onfilm.us/scroll3.html EDIT: OR shouldn't loadMore() (which is being called once the rest of response is parsed) display the consecutive rows? If you leave your console open you should be able to see it say it has 2 rows loaded, but only one visible. At least here. :)

http://stackoverflow.com/q/26507015
has answer: http://stackoverflow.com/a/26507115
favorite count: 0
tagged with: backbone.js
tagged with: backbone-model
has answer: http://stackoverflow.com/a/26507049
tagged with: backbone.js-collections
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26507049
has title: Backbone collection.where
has body: I am retrieving a model from a backbone collection. var organisation = this.collection.where({ group_id : String(elm.data('groupid')) }); this returns a result as I would expect it too. I then when to do some getting and setting on that model, but if I try and run, organisation.get('members') then I get the following error message, Uncaught TypeError: undefined is not a function I am assuming (maybe wrongly) that is because where() does not acutally return model? If that is the case then how can I cast the returned data into a model?
type: Question
accepted answer: http://stackoverflow.com/a/26507115
tagged with: javascript
answer count: 2
upvote count: 1

http://stackoverflow.com/comment/41401918
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26372194
has text: Updated code and fiddle link, try it now. Basically check `length == 0` for items NOT in `constructions`, or `length > 0` for items that ARE in `constructions`. Just realized should probably change variable name to `notFoundBuildings` ;)

http://stackoverflow.com/comment/41460557
has text: @SEan—jQuery doesn't make this easier. You can reduce the above to one line of code without jQuery, though common sense indicates 2 lines are more prudent.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26405070

http://stackoverflow.com/q/26513548
type: Question
has answer: http://stackoverflow.com/a/26513710
has comment: http://stackoverflow.com/comment/41657548
has comment: http://stackoverflow.com/comment/41657353
tagged with: javascript
has comment: http://stackoverflow.com/comment/41657588
has title: I want the validation to happen only after focus of text field
score: 0
has body: This is my code. I want to validate a form using javascript. I want to validate the particular form element after the user focuses for fulling the form. It is happening in such a way that, just loading the page is showing the cross mark-meaning that the particular form is invalid without the user entering the code. Note: I have used Bootstrap for icons- 'Tick' and 'X'. Thanks for the help. Form Elements Name: Phone: Address: Submit
has comment: http://stackoverflow.com/comment/41656948
tagged with: validation
has comment: http://stackoverflow.com/comment/41657181
answer count: 1
accepted answer: http://stackoverflow.com/a/26513710
has comment: http://stackoverflow.com/comment/41657215
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26395041
has comment: http://stackoverflow.com/comment/41442164
has title: How can you pass anonymous functions as parameters to existing functions to use later in javascript?
type: Question
possible better answer: http://stackoverflow.com/a/26395764
type: AnsweredQuestion
has body: I am trying to create a basic javascript framework that you can pass different things into, including functions for it to execute later. Right now, I'm in a more simple testing phase, but I can't quite get the function calling to work. A piece of my code is here: [My JS Fiddle][1]http://jsfiddle.net/mp243wm6/ My code has an object that holds different data, and I want to call the method later, but with data that is available at the time of creation. Here is a code snippet of the function that uses the function that is passed to the object: clickMe : function() { this.obj.click(function() { this.func(); }); } Any suggestions or things I should read are welcome.
accepted answer: http://stackoverflow.com/a/26395118
tagged with: anonymous-function
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41442218
answer count: 3
has comment: http://stackoverflow.com/comment/41442107
has answer: http://stackoverflow.com/a/26395764
has answer: http://stackoverflow.com/a/26395118
score: 0
has answer: http://stackoverflow.com/a/26395259

http://stackoverflow.com/q/26482246
has answer: http://stackoverflow.com/a/26482639
linked to: http://stackoverflow.com/q/13287490
has comment: http://stackoverflow.com/comment/41620519
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41600364
tagged with: python
tagged with: web-crawler
has answer: http://stackoverflow.com/a/26484409
type: Question
answer count: 2
tagged with: javascript
has title: Crawling a website to extract data
has body: There is a website which contains information we have paid for access to, however the only way available to access the information is through the website and there are 1400 records. So, since there is so much of it, we want to have the information in an excel spreadsheet which is manageable. However, the organization in charge of the website isn't willing to help. I can write a python script that can parse the html and extract the relevant data, however, the problem is that the site is not easily crawlable because it is an ASP site and many of the "links" are in fact triggers to javascript which loads the destination page. This means that a tool like HTTrack doesn't really work. Are there any other tools or python modules which can help me do this (bearing in mind the "javascript" links)? I'm totally new to this kind of thing, so I just have no experience of what kinds of things are available to me.
score: 0

http://stackoverflow.com/comment/41675248
has text: it worked like a charm for multiple records as well.
comment on: http://stackoverflow.com/a/26505717
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26414521
tagged with: http://stackoverflow.com/tag/html
tagged with: datatables
has answer: http://stackoverflow.com/a/26421710
has body: So I'd like to use datatables such that each "row" looks like this (or at least has this general structure): For reference here's the HTML I used to create that: joe bob pic DOB: 1/1/1970 Gender: M Phone: 111-111-1111 Anyway, how might I achieve this with datatables? It seems to me that datatables returns a single but the HTML I used to produce the above has a whole bunch of 's. I'd like to use datatables for it's ajaxified pagination and searching and for a consistent look and feel with other tables on this site.
has title: using datatables for non-table layouts
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26421710
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/41451122
type: Comment
has text: I INSERT `5.31 AM` console log `Thu Oct 16 2014 17:31:00 GMT+0530 (Sri Lanka Standard Time)` in db ` "$date": "2014-10-16T12:01:00.000Z" `
comment on: http://stackoverflow.com/a/26400111
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41383831
type: Comment
comment on: http://stackoverflow.com/q/26362917
score: 0
type: QuestionComment
has text: Hello Not working means when i click on more then page is not calling

http://stackoverflow.com/q/26441250
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: azure-storage
has title: Upload text file to Azure blob Storage returns Internal Server Error
has comment: http://stackoverflow.com/comment/42852379
has body: I want to create an application, where the user can upload a text file to the Azure Blob Storage. I was using this example, but even this can't work for me: link I modified a little bit for my thing: [DataContract] public class WorkoutItem { [JsonProperty(PropertyName = "id")] public string Id { get; set; } [JsonProperty(PropertyName = "containerName")] public string ContainerName { get; set; } [JsonProperty(PropertyName = "resourceName")] public string ResourceName { get; set; } [JsonProperty(PropertyName = "sasQueryString")] public string SasQueryString { get; set; } [JsonProperty(PropertyName = "filePath")] public string Filepath { get; set; } } I want to upload a txt file, here is the method: private async void InsertWorkoutItem(string localpath) { try { item = new WorkoutItem(); string errorString = string.Empty; IsolatedStorageFileStream fileStream = IsolatedStorageFile.GetUserStoreForApplication().OpenFile( localpath + ".txt", FileMode.Open, FileAccess.Read); if (fileStream != null) { item.ContainerName = "workoutitemfiles"; item.ResourceName = localpath + ".txt"; } await workouttable.InsertAsync(item); //exception thrown here if (!string.IsNullOrEmpty(item.SasQueryString)) { StorageCredentials cred = new StorageCredentials(item.SasQueryString); var fileUri = new Uri(item.Filepath); CloudBlobContainer container = new CloudBlobContainer(new Uri( string.Format("https://{0}/{1}", fileUri.Host, item.ContainerName)), cred); CloudBlockBlob blobFromSASCredential = container.GetBlockBlobReference(item.ResourceName); await blobFromSASCredential.UploadFromStreamAsync(fileStream); } } Exception details: {Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: Error: Internal Server Error at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.&lt;ThrowInvalidResponse&gt;d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) a…
score: 1
tagged with: windows-phone-8
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/42910798
downvote count: 0
tagged with: azure-mobile-services
tagged with: javascript
has comment: http://stackoverflow.com/comment/41785042
has comment: http://stackoverflow.com/comment/41657017
favorite count: 0

http://stackoverflow.com/q/26455177
has comment: http://stackoverflow.com/comment/41551486
score: 0
has body: How can I call a function when a XHRHttpRequest is completed or returned response seccuss. Without using jquery. xmlhttp = new XMLHttpRequest(); xmlhttp.success() this kind of a function which will be called after every request
upvote count: 1
has answer: http://stackoverflow.com/a/26455575
downvote count: 1
has title: XHRHttpRequest complete function
has comment: http://stackoverflow.com/comment/41551110
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26455575
possible better answer: http://stackoverflow.com/a/26455216
favorite count: 0
has answer: http://stackoverflow.com/a/26455216
type: Question
answer count: 2
tagged with: xmlhttprequest
linked to: http://stackoverflow.com/q/24196140

http://stackoverflow.com/comment/41423011
comment on: http://stackoverflow.com/q/26384096
type: Comment
type: QuestionComment
has text: You can use the solution Shai posted.
score: 0

http://stackoverflow.com/a/26440133
has body: The question presented is a bit vague, as it is unclear what platform you are working on, if there is any sort of UI expected or logic only, and a reference for such calculator expected to be written by you could help simplify the answer. As a general rule of thumb for when stuck with code, I would recommend beginning by structuring the project. Laying out anything that needs to work later. Will you be requiring more than a few methods/functions? If so, lay out the structure wanted. As a general example, I'd create a: ╔════════════════╦═══════════════════════════════════════════════════════════════════╗ ║ File ║ Purpose ║ ╠════════════════╬═══════════════════════════════════════════════════════════════════╣ ║ calc.html ║ Main view (if implemented as html). May have a CSS attached to it.║ ║ calcView.js ║ JS view controller. To be used for any logic related to views. ║ ║ calcMain.js ║ Main JS calculator implementation, to separate calculation logic. ║ ║ ops.html(...) ║ Optional options page, other related extras, and so on. ║ ╚════════════════╩═══════════════════════════════════════════════════════════════════╝ Begin by creating empty files, and then start by implementing everything you are certain you will need. Along the process it will be easy to figure out what else is needed. I'd recommend starting with the main JS, and actually taking the first step of writing: function mainCalculation(input){ return output; } Then fill it up. In the process try to figure out what should be separated to its own method, and what is part of this. This may lead you to something like: function parseRequest(inputRequestObject){ // TODO return outputRequestData; } function calcScore(inputRequestData){ // TODO return outputAsINT; } function generateResponseObject(intScore){ // TODO return outputObject; } function handleRequest(input){ // This is your main flow of handling a single calculation. // Try to include the minimal amount of logic possible here. var parsedInput = parseRequest(i…
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26439695
answers question: http://stackoverflow.com/q/26439695
type: AcceptedAnswer
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41525626

http://stackoverflow.com/q/26503620
has comment: http://stackoverflow.com/comment/41638791
has comment: http://stackoverflow.com/comment/41638772
has title: Synchronous Ajax requests "lock" browser
linked to: http://stackoverflow.com/q/5408406
possible better answer: http://stackoverflow.com/a/40316435
type: Question
has answer: http://stackoverflow.com/a/40316435
tagged with: browser
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26503730
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41638816
score: 0
has comment: http://stackoverflow.com/comment/41638860
has body: I have a couple of jQuery Ajax requests, which have to be synchronous, but they keep locking/freezing the browser, until the response is received. My main problem is, that until the response is received I have to display a spinning icon, but due to the freezing the spinner is not displayed and even if it miraculously is it doesn't animate. This is the event displaying the spinner and sending the request: $(document).on('click', '#open-button', function () { var input = "some text"; var wrapper = $('#wrapperWindow'); wrapper.children().animate({ opacity: 0 }, 500); wrapper.children().remove(); wrapper.append('&lt;div id="loading-spinner" style="display:none;"&gt;&lt;/div&gt;'); var spinner = $('#loading-spinner'); spinner.css({ backgroundImage: 'url("img/loading.gif")', opacity: 0 }); spinner.show(); spinner.animate({ opacity: 1 }, 500); var dataForTab = requestData(input); //&lt;-- the request if (dataForTab.length &gt; 0) { //do stuff } }); The request: function requestData(input) { var result = null; $.ajax({ async: false, type: "POST", url: "/some/url?input=" + input, dataType: "json", retryLimit: 3, success: function (json) { result = json; }, error: function (xhr, err) { console.log(xhr); console.log(err); } }); return result; } Until the request returns the received JSON data, everything stops moving. How can I fix this please?
has comment: http://stackoverflow.com/comment/41638875
linked to: http://stackoverflow.com/q/14220321
favorite count: 0
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26503730
type: AnsweredQuestion
tagged with: synchronous

http://stackoverflow.com/a/26488350
downvote count: 0
answers question: http://stackoverflow.com/q/26472797
has body: What I'd recommend you do is create an event handler on the Checkout open event that disables the PayPal button: https://stripe.com/docs/checkout#integration-custom The only downside to that is it assumes the payment method works in Checkout (i.e., that the card isn't declined). As a failsafe, you could re-enabled the PayPal button in the Checkout closed event handler if no Stripe token exists. Hope that helps! Larry PS I work on Support at Stripe.
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/26359224
tagged with: javascript
type: Question
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Datatable FixedHeader Plugin Error
tagged with: datatable
score: 2
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26376131
has answer: http://stackoverflow.com/a/64665867
has body: i am using Datatable FixedHeader Plugin. check my code. but plugin not work properly. console error occured "TypeError: $.fn.dataTable.FixedColumns is not a constructor" please give me solution. thanks $(document).ready(function() { var table=$("#example").dataTable( { "bProcessing": false, "bServerSide": false, "sort": "position", "scrollY":"300px", "scrollX":"200px", "scrollCollapse": true, "sAjaxSource": "searchatOrganisations", "aoColumns": [ { "mData": "aoId" }, { "mData": "aoCreatedby" }, { "mData": "aoCreatedon" }, { "mData": "aoModifiedby" }, { "mData": "aoModifiedon" }, { "mData": "aoName" }, { "mData": null, className: "center", defaultContent: 'Edit / Delete' } ] } ); new $.fn.dataTable.FixedColumns( table, { leftColumns: 1, rightColumns: 1 } ); } ); TypeError: $.fn.dataTable.FixedColumns is not a constructor

http://stackoverflow.com/q/26463053
type: AnsweredQuestion
score: 0
type: Question
has comment: http://stackoverflow.com/comment/41564890
tagged with: javascript
has answer: http://stackoverflow.com/a/26463211
answer count: 2
has answer: http://stackoverflow.com/a/26463229
tagged with: ajax
has body: I made a script that is being used by only AJAX calls(checks for user and password and logs the user in). The problem comes when I want to prevent the user from accessing the script directly through his browser like mywebsite.com/login.php. If I do something like if ( isset( $_SESSION['id'] ) ) header( "Location: logged.php" ); else header( "Location: index.php" ); where logged.php is for logged in users, this will execute when the AJAX calls are done, as well, so it will redirect to index when the AJAX call is made. If I remove the 'else' part, they can access it directly.
has title: Prevent access to a php script that uses AJAX
has comment: http://stackoverflow.com/comment/41564834
accepted answer: http://stackoverflow.com/a/26463211
tagged with: php
possible better answer: http://stackoverflow.com/a/26463229

http://stackoverflow.com/comment/41638157
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26503048
type: QuestionComment
has text: What do you want to display where when what is clicked?

http://stackoverflow.com/q/26502982
accepted answer: http://stackoverflow.com/a/26503220
has body: I'm trying to loop through a block of elements to determine the lowest occurring price. I have the loop working but trying to regex the price is proving difficult. Where am I going wrong with the regex? HTML &lt;div class="block"&gt; &lt;h2&gt;&lt;a href="#&gt;Title&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;&lt;em class="price"&gt;£20.00&lt;/em&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="block"&gt; &lt;h2&gt;&lt;a href="#&gt;Title&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;&lt;em class="price"&gt;£20.00&lt;/em&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="block"&gt; &lt;h2&gt;&lt;a href="#&gt;Title&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;&lt;em class="price"&gt;&lt;span class="rrp"£40.00&lt;/span&gt;£20.00&lt;/em&gt;&lt;/p&gt; &lt;/div&gt; The overall aim is to get the highest and lowest occurring prices within all of the html? Javascript / jQuery var highPrice; var lowPrice; $(".block").each(function(){ var currentPriceHtml = $(this).html(); var m; do{ //match the following prices //&lt;span class="rrp"&gt;£40.00&lt;/span&gt;&amp;nbsp;&amp;nbsp;£30.00 //£15.00 //£20.00 //£10.00 m = currentPriceHtml.exec(/^-?\$?[0-9]*\.?([0-9]{2})?%?$/); if(m){ console.log(m[1], m[2]); if(!highPrice || m[1] &gt; highPrice) highPrice = m1[1]; //set highest occurring price if(!lowPrice || m[1] &lt; lowPrice) lowPrice = m[1]; //set lowest occurring price } } while(currentPriceHtml); console.log("High Price: " + highPrice); console.log("Low Price: " + lowPrice); });
possible better answer: http://stackoverflow.com/a/26503898
upvote count: 1
has answer: http://stackoverflow.com/a/26503898
has comment: http://stackoverflow.com/comment/41637694
has comment: http://stackoverflow.com/comment/41638063
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41638001
type: Question
has answer: http://stackoverflow.com/a/26503220
answer count: 2
has comment: http://stackoverflow.com/comment/41637809
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41637768
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41639779
tagged with: regex
has comment: http://stackoverflow.com/comment/41637958
has title: Match low and highest prices in a block of HTML using jQuery each and javascript regex

http://stackoverflow.com/comment/41636657
type: QuestionComment
comment on: http://stackoverflow.com/q/26502266
has text: If this is a single series, the I would change the jqplot command to `$.jqplot ('graph-container', [data]);`
score: 0
type: Comment

http://stackoverflow.com/comment/41606828
has text: The "magic numbers" are used to extract the filename from the first element in the array (52,99), the 1000, as you correctly assumed, corresponds to the 1000 byte parts I want to download. I've already tried with a smaller file and if I look at the contents they are certainly not binary, but bytecode characters. I can post an example of a piece of that file, if that would help.
comment on: http://stackoverflow.com/q/26386354
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26438032
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26490299
has title: Saving data to parse using javaScript SDK
score: 0
answer count: 1
has body: Using parse.com and JavaScript SDK. - Section one shows a list of objects - Section two lets the user select one of those objects and add to a modal box - Section three saves the data to parse What I'm unable to work out is how I can save the section 1 item.badgename and item.category to parse. I've tried adding myBadge.set("category", badgename.toString()); to section 3, but I get a undefined error. i'm not sure how to define this before trying to save. Really need some help and an example to follow. 3 -Saves the badge details to parse var MyBadge = Parse.Object.extend("myBadges"); var FriendRequest = Parse.Object.extend("FriendRequest"); var friendRequest = new FriendRequest(); friendRequest.id = window.selectedFriendRequestId; var badgeselected = $('#badgeselect .go').attr("src"); $(document).ready(function() { $("#send").click(function() { var myBadge = new MyBadge(); var badgeselected = $('#badgeselect img').attr("src"); var BadgeSentTo = $('#selectFriend').val(); var categorySelected = $('#category').val(); var uploadercomment = $('#UploaderComment').val(); myBadge.set("BadgeName", badgeselected); //got this working using .set myBadge.set("Comment", uploadercomment); //got this working using .set myBadge.set("category", categorySelected); myBadge.set("SentTo", new Parse.User({ id: BadgeSentTo })); myBadge.set("uploadedBy", Parse.User.current()); myBadge.save(null, { success: function(results) { console.log("Done"); //location.reload(); }, error: function(contact, error) { // The save failed. alert("Error: " + error.code + " " + error.message); } }); return false; }); }); ** 1- Returns results to the page for user to select** var GlobalBadges = Parse.Object.extend("Global_Badges"); var query = new Parse.Query(GlobalBadges); query.exists("Global_Badges_img"); query.find({ success: function(results) { var friends = []; for (var i = 0; i &lt; results.length; i++) { friends.push({ imageURL: results[i].get('Global_Badges_img'), //friendRequestId: results[i].id, badg…
tagged with: parse-platform
accepted answer: http://stackoverflow.com/a/26490299

http://stackoverflow.com/q/26512069
has answer: http://stackoverflow.com/a/26512113
type: Question
has answer: http://stackoverflow.com/a/26512093
type: AnsweredQuestion
score: -1
favorite count: 0
answer count: 3
has body: I'm making a simple tool - a HTML file on local drive that's opened via file:///. I need to link a script into it: But the alert never launches (no script does). I tried different scripts. There are no errors in console. Is this normal?
has title: My script doesn't run when external script file is loaded on local drive
accepted answer: http://stackoverflow.com/a/26512093
downvote count: 1
possible better answer: http://stackoverflow.com/a/26512096
upvote count: 0
has answer: http://stackoverflow.com/a/26512096
tagged with: javascript

http://stackoverflow.com/q/26365541
has comment: http://stackoverflow.com/comment/41388721
accepted answer: http://stackoverflow.com/a/26365638
type: Question
has comment: http://stackoverflow.com/comment/41388758
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I want to make so that each 3 elements (top, middle and bottom) of my polygon changes color when you hover over it. I would normally do it with css: xxx:hover but since it involves 3 different elements that need to change at the same time, I can only assume that I need take a different approach. I assume some sort of javascript? Ideas? CODEPEN: http://codepen.io/anon/pen/shfge HTML CSS: .hex { float: left; margin-left: 3px; margin-bottom: -26px; } .hex:hover { cursor: pointer; } .hex .top { width: 0; border-bottom: 30px solid #6C6; border-left: 52px solid transparent; border-right: 52px solid transparent; } .hex .middle { width: 104px; height: 60px; background: #6C6; } .hex .bottom { width: 0; border-top: 30px solid #6C6; border-left: 52px solid transparent; border-right: 52px solid transparent; } .hex-row { clear: left; } .hex-row.even { margin-left: 53px; }
has title: How to change css on multiple elements
has answer: http://stackoverflow.com/a/26365638
tagged with: css
type: AnsweredQuestion
score: 0

http://stackoverflow.com/a/26441252
upvote count: 1
answers question: http://stackoverflow.com/q/26441001
score: 1
downvote count: 0
has body: Since the switches property only seems to contain objects with dpid properties, you don't really have to do anything special to count them. Just do this: var count = jsontext.switches.length;
type: Answer

http://stackoverflow.com/q/26444487
type: Question
tagged with: jquery-ui
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41539972
answer count: 1
has body: I apologize if the question is formulated sloppy. I'm just somewhere in the beginning of understanding jquery. I want to implement a form builder based on drag and drop. Don't know how to make a draggable object droppable after it being dropped. In my I am looking for this scenario: dragging "Auth" block, drop it, appears a div, after this I drag "Second" block and I can drop it both to "Auth" block and main droppable zone. jsfiddle.net/284mx1vn/3/
tagged with: jquery
has answer: http://stackoverflow.com/a/26449144
accepted answer: http://stackoverflow.com/a/26449144
type: AnsweredQuestion
has title: How to make draggable object droppable aftrer it being dropped?

http://stackoverflow.com/comment/41598099
type: QuestionComment
has text: It's a virtual path. Basically, the server side library process the requests that begins with "/socket.io/" and outputs the resource. The actual file is somewhere else.
comment on: http://stackoverflow.com/q/26480991
score: 0
type: Comment

http://stackoverflow.com/comment/41514474
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26413619
has text: https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#Prefer_unitless_numbers_for_line-height_values
score: 1

http://stackoverflow.com/comment/41621363
score: 0
comment on: http://stackoverflow.com/a/26493881
type: Comment
type: AnswerComment
has text: Is the file draw.txt actually in the public folder...?

http://stackoverflow.com/a/26410086
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: css animations with an infinite loop as others have said, but you need 3 cards to get each color to top the next instead of the up and down motion. .preloader { background: #ff0000; height: 100px; width: 100px; background: linear-gradient( to top, red, red 33.3333%, blue 33.3333%, blue 66.66667%, red 66.66667%, red 100% ); background-size: 100% 300%; background-position:top; } .preloader:hover { -webkit-animation: loaderLoop 2s linear infinite; -moz-animation: loaderLoop 2s linear infinite; animation: loaderLoop 2s linear infinite; } @-webkit-keyframes loaderLoop{ 0%{background-position:top;} 100%{background-position:bottom;} } @-moz-keyframes loaderLoop{ 0%{background-position:top;} 100%{background-position:bottom;} } @keyframes loaderLoop{ 0%{background-position:top;} 100%{background-position:bottom;} } &lt;div class="preloader"&gt;&lt;/div&gt;
accepted answer of: http://stackoverflow.com/q/26409643
type: Answer
answers question: http://stackoverflow.com/q/26409643
score: 2

http://stackoverflow.com/comment/41409934
has text: `var track = 3;` `var total = 3;`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26377178

http://stackoverflow.com/comment/41568547
score: 0
has text: For adequate work elements ID must be unique. Moreover, for dynamically created elemets use delegated event handlers.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26465335

http://stackoverflow.com/a/26359106
score: 1
has comment: http://stackoverflow.com/comment/41484307
upvote count: 1
has comment: http://stackoverflow.com/comment/42529453
has comment: http://stackoverflow.com/comment/41380222
has comment: http://stackoverflow.com/comment/41408215
has comment: http://stackoverflow.com/comment/41456238
answers question: http://stackoverflow.com/q/26358553
has comment: http://stackoverflow.com/comment/41455128
has comment: http://stackoverflow.com/comment/41405978
accepted answer of: http://stackoverflow.com/q/26358553
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42547632
type: Answer
has body: You are using id:'scriptdetails' in fieldset. In web pages each component or element should have an unique id. If there are elements with same id then there will be problems in rendering the elements like single element is rendered with errors or element may not be rendered. In your case as you have to repeat the field set, don't not use fixed id. Use a random generated id from server or use 'itemId' which ExtJS provides. Refer: here and here Update: Working fiddle is here Ext.onReady(function() { var store = new Ext.data.ArrayStore({ id: 0, fields: [ 'myId', 'displayText' ], data: [ [1, '1'], [2, '2'], [3, '3'], ] }); var scriptField = { xtype: 'fieldset', columnWidth: '0.5', title: 'Script Details', items: [{ xtype: 'textfield', fieldLabel: 'Script Name', hiddenName: 'scriptName' }] }; var container = new Ext.Panel({ layout: 'hbox', height: '700px', items: [{ xtype: 'panel', id: 'parentContainer', height: '700px', layout: 'form', items: [{ xtype: 'combo', editable: false, triggerAction: 'all', mode: 'local', store: store, valueField: 'myId', displayField: 'displayText', fieldLabel: 'Show Number of Items', listeners: { select: function(combo, value) { var dynamicPanel = Ext.getCmp("dynamicPanel"); dynamicPanel.removeAll(true); for (var i = 0; i &lt; combo.getValue(); i++) { scriptField.title = "Script Details " + i; dynamicPanel.add(scriptField); dynamicPanel.doLayout(); dynamicPanel.ownerCt.doLayout(); dynamicPanel.ownerCt.ownerCt.doLayout(); } } } }, { xtype: 'panel', id: 'dynamicPanel', items: [] }] }] }); container.render(Ext.getBody()); });
has comment: http://stackoverflow.com/comment/41455700

http://stackoverflow.com/q/26372133
tagged with: browser-action
linked to: http://stackoverflow.com/q/17119385
has body: I'm using two js files to accomplish a task for a chrome extension. In background.js, I have the following line of code that calls another js file: chrome.tabs.executeScript(tabId, {file: "src/bg/sidebar.js"}); When I run the extension, the script in sidebar.js appears to run, but the console does not display the log. The console does display all logs from the background.js. Does anyone know why this is happening?
duplicate of: http://stackoverflow.com/q/17119385
answer count: 1
has comment: http://stackoverflow.com/comment/41401718
tagged with: javascript
tagged with: console
has title: No console log for external script called by chrome.tabs.executeScript
has comment: http://stackoverflow.com/comment/41401462
has answer: http://stackoverflow.com/a/26372504
tagged with: google-chrome-extension
accepted answer: http://stackoverflow.com/a/26372504
type: AnsweredQuestion
score: 0
type: Question

http://stackoverflow.com/a/26447657
has comment: http://stackoverflow.com/comment/41537435
type: Answer
has body: First-class function variables are wonderful things! function f() {a; b; c; } is exactly the same thing as var f = function () {a; b; c; } This means you can redefine functions as needed. You want to wrap the function Mj to return a modified object? No problem. The fact that the responseText field is read-only is a pain, but if that's the only field you need... var Mj_backup = Mj; // Keep a copy of it, unless you want to re-implement it (which you could do) Mj = function (a, b, c, d, e) { // To wrap the old Mj function, we need its args var retval = Mj_backup(a,b,c,d,e); // Call the original function, and store its ret value var retmod; // This is the value you'll actually return. Not a true XHR, just mimics one retmod.responseText = retval.responseText; // Repeat for any other required properties return retmod; } Now, when your page code calls Mj(), it will invoke your wrapper instead (which will still call the original Mj internally, of course).
score: 1
has comment: http://stackoverflow.com/comment/41537504
upvote count: 1
answers question: http://stackoverflow.com/q/26447335
has comment: http://stackoverflow.com/comment/41537410
downvote count: 0

http://stackoverflow.com/comment/41482701
comment on: http://stackoverflow.com/q/26417772
has text: i did alert on the "password" array and got "BOL12345 ,BOL77777 ,BOL54321 ,BOL12345
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26472777
has comment: http://stackoverflow.com/comment/41585258
has comment: http://stackoverflow.com/comment/41616910
answers question: http://stackoverflow.com/q/26472048
has comment: http://stackoverflow.com/comment/41616544
has comment: http://stackoverflow.com/comment/41583609
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: You'd either use a deferred that is stored as a private field of your class, or you'd use the Promise constructor (which is preferred). private deferred : Q.Deferred&lt;DialogResult&gt;; public showDialog() : Q.Promise&lt;DialogResult&gt;{ this.deferred = Q.defer(); // create dialog return this.deferred.promise; } public void setResult(result : DialogResult){ this.deferred.resolve(result); } public showDialog() : Q.Promise&lt;DialogResult&gt;{ return new Q.Promise(function(resolve) { // create dialog setResult = resolve; // call it somewhere }) }
accepted answer of: http://stackoverflow.com/q/26472048
score: 1

http://stackoverflow.com/comment/41450290
score: 0
type: Comment
has text: It might be because tag is a bit different and it doesn't require to be closed. Did you try replacing with ? Also, just to make sure, the HTML is not inserted by jQuery, right?
type: QuestionComment
comment on: http://stackoverflow.com/q/26399940

http://stackoverflow.com/comment/41556665
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26456916
type: AnswerComment
has text: Add all your extra code (manipulations you need to do) to the end of `jquery.min.js` or put it in the new file and inject both.

http://stackoverflow.com/q/26458204
accepted answer: http://stackoverflow.com/a/26520002
has comment: http://stackoverflow.com/comment/41567373
score: 0
tagged with: firebase
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41589297
has comment: http://stackoverflow.com/comment/41584062
has comment: http://stackoverflow.com/comment/41616852
tagged with: twitter
linked to: http://stackoverflow.com/q/26390027
has comment: http://stackoverflow.com/comment/41625886
has body: Using the following javascript firebase version. &lt;script src="https://cdn.firebase.com/js/client/1.1.1/firebase.js"&gt;&lt;/script&gt; I need the access_token_secret to post on behalf of the user. However firebase doesn't seem to offer the secret access token. ref.authWithOAuthPopup('twitter', function (e, user) { if (e) { throw e } console.log(user.twitter.accessToken) console.log(user.twitter.accessTokenSecret) }) The console output. ##########-*************************************** undefined Is it possible to get the secret access token through firebase auth?
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26520002
tagged with: javascript
has comment: http://stackoverflow.com/comment/41585194
has title: firebase 1.1.1 how to get twitter secret

http://stackoverflow.com/comment/41541867
type: Comment
score: 1
has text: `*` is an extremely costly selector... perhaps it would be useful to utilize a more specific selector.
type: AnswerComment
comment on: http://stackoverflow.com/a/26450168

http://stackoverflow.com/q/26487237
tagged with: css
tagged with: font-face
tagged with: node.js
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26535999
tagged with: http
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26535999
answer count: 1
downvote count: 0
favorite count: 0
has title: Downloading .ttf files with Node
upvote count: 2
has body: I'm trying to download a .ttf file like this one using Node. I'm using mikeal/request to handle HTTP requests. The actual function looks something like this: request.get(url, function(err, res, body) { if(err) throw err; fs.writeFileSync(path, body); }); After a quick glance, it behaved exactly as expected; everything ended up in the right place and it looked more or less right. However, when I tried to load the font into a browser using the following @font-face snippet, the rule was applied, but the font wasn't. No errors, nothing failing to load or being overwritten. @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf) format('truetype'); } For a preliminary check I tried to open it with KFontView, but was met with a "Could not read font" error. I verified this error by wgeting a fresh copy of the file and doing the same. It loaded into the preview fine. This jogged my memory regarding an optional argument that could be passed to writeFile, so I checked out the encodings of the wget version and the node version. $ enca wget.ttf -L none &gt; Unrecognized Encoding $ enca node.ttf -L none &gt; Universal transformation format 8 bits; UTF-8 &gt; Mixed line terminators &gt; Surrounded by/intermixed with non-text data So, fairly obvious. wget is saving it as a binary whereas node was writing it to file as UTF-8. Quicky confirmed with a file $ file -i wget.ttf &gt; wget.ttf: application/x-font-ttf; charset=binary Quick scan of the Node docs, turns out I can do this fs.writeFileSync(path, body, 'binary'); Everything looked good, the node version was now showing up as the correct encoding. However, still having the exact same problem in the browser. Made sure that my version of Chrome supported .ttf font-faces (Version 37.0.2062.94 (64-bit). It does.) As far as I could see, the file were now the same. Diff was particularly unhelpful. $ diff wget.ttf node.…

http://stackoverflow.com/comment/41649650
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26500878
has text: @Matt why do you need the URL?

http://stackoverflow.com/comment/41573337
type: QuestionComment
comment on: http://stackoverflow.com/q/26425501
has text: @CheranShunmugavel - duplicate because they found there's no workaround for by-reference and that specific ActiveX function? I guess maybe a different question with the same answer. I was reaching, but I was hoping there was something that could be done.
score: 0
type: Comment

http://stackoverflow.com/comment/41534867
has text: Use ` ` for this purpoeses
type: QuestionComment
comment on: http://stackoverflow.com/q/26446124
score: 0
type: Comment

http://stackoverflow.com/q/26415614
score: 1
has answer: http://stackoverflow.com/a/26417802
type: Question
has comment: http://stackoverflow.com/comment/41480215
has title: Radical requirement: connect a scale to a web application
downvote count: 0
tagged with: javascript
answer count: 1
linked to: http://stackoverflow.com/q/3435561
has comment: http://stackoverflow.com/comment/76247535
tagged with: asp.net
favorite count: 0
has body: I am contemplating creating a web application that will take the reading of scale (i.e. weight measurements) and insert them to a form field. I would like to make this as fluid a process as possible for a user. Suppose the scale is connected to the computer via a serial port so that the computer can communicate with the scale. Any ideas on a good setup to achieve this? With a minimal number of clicks by the user? Ideally using a JavaScript ASP.NET setup.
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41479035

http://stackoverflow.com/q/26472079
has comment: http://stackoverflow.com/comment/41583860
has title: ng-repeat not update model with track by
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26473802
has body: I've been using checklist-model to work with an array of check-boxes with each selected one can be deleted. Everything seems to work fine until I use it inside a ng-repeat. The problem is, the deleted check-boxes still be there around when I add the track by $index along with the ng-repeat. If I remove that track by, it works fine (but in my real app I need that track by to work). Here's a plnkr, Demo To see the problem, you can follow these steps. Select any check-box you want Delete those selected ones Check the check all button to see, Now look at the one with track by, it will leave some check-box unchecked. If you check it manually, it will have the old value added to the list. This is weird. Any help or explaination will be really appreciate, thanks
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26473802
answer count: 1
tagged with: angularjs-ng-repeat
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41584630

http://stackoverflow.com/a/26509469
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41836833
has body: Quick search in our code: function isAscending(array) { return array.every(function (e, idx, arr) { return (idx === 0) ? true : arr[idx-1] &lt;= e; }); }
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26435647
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26435647
has comment: http://stackoverflow.com/comment/41652254
upvote count: 2

http://stackoverflow.com/q/26496079
downvote count: 0
score: 1
type: Question
tagged with: bloodhound
has answer: http://stackoverflow.com/a/26498746
accepted answer: http://stackoverflow.com/a/26498746
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
tagged with: typeahead.js
has body: I try to use typeahead.js with bloodhound.md and an external json data source. I thought I would follow the documentation and the examples provided on github as precisely as possible. However, I fail to achieve the desired dropdown. Can you tell me, what I am doing wrong? [edit] I moved the whole code (js and json) to jsbin, so there shouldn't be any problems with cross domain calls. Find the example code here: http://jsbin.com/vajamixubo/1/edit?html,js,output I would also be grateful for hints how to effectively debug typeahead.js calls.
upvote count: 1
has title: Use typeahead.js with bloodhound.md and an external json
answer count: 1
tagged with: jquery
favorite count: 0
type: AnsweredQuestion

http://stackoverflow.com/comment/41547442
score: 0
type: Comment
type: QuestionComment
has text: Are you using a custom test framework (`$`) or is it published somewhere? Can you link to it?
comment on: http://stackoverflow.com/q/26453170

http://stackoverflow.com/a/27583383
answers question: http://stackoverflow.com/q/26396590
type: Answer
has body: As far as I know you should put img.crossOrigin = "anonymous"; before setting the source (img.src = "&lt;%=@templates[0][1]%&gt;";). That should fix it.
score: 0

http://stackoverflow.com/q/26360046
tagged with: parallax
has comment: http://stackoverflow.com/comment/41378159
has comment: http://stackoverflow.com/comment/41378265
has comment: http://stackoverflow.com/comment/41378273
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to create a horizontal parallax site. Everything is working nicely, when I click the menu the slides move swiftly to the horizontal direction and the corresponding slide is displayed. I have an external HTML page, that has the same structure as the main site and the problem is that when I click this page's menu, it goes to the site but lands on the first slide. I want a script so that when I click on this external HTML page link, the page should land on the site, but then it should slide to the corresponding slide. Main menu link looks like this: About Us I want to click on About Us link on external page and then it should land on the main site and then the above script should run and slide should move.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41378113
tagged with: horizontal-scrolling
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26360313
has title: Call JavaScript from external link
score: 0
has comment: http://stackoverflow.com/comment/41378615
answer count: 1
has answer: http://stackoverflow.com/a/26360313
tagged with: jquery

http://stackoverflow.com/comment/41452774
has text: You need to find the index of which element?
comment on: http://stackoverflow.com/q/26401506
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41445810
comment on: http://stackoverflow.com/a/26397316
score: 0
type: Comment
type: AnswerComment
has text: It is failing here i am getting it as Undefined

http://stackoverflow.com/q/26453055
downvote count: 0
tagged with: javascript
has title: How to delete objects created with `new` in JavaScript?
has answer: http://stackoverflow.com/a/26453072
has comment: http://stackoverflow.com/comment/41550878
favorite count: 0
has body: I'm new to JavaScript and come from C++ background. This will sound silly but I can't find how to delete objects created with new in JavaScript. Here's an example: function Article (id) { this.content = db.get('article', "id:" + id); ... } var article = new Article(5); Every instance of Article allocates memory as it gets data from the database (in my case content of the article). This leads my application to quickly grow to gigabytes in size of memory usage. How do I release memory in JavaScript? I found delete but it appears to delete array and hash elements rather than Objects.
score: 2
tagged with: memory-management
has comment: http://stackoverflow.com/comment/41551182
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26453098
tagged with: new-operator
type: Question
tagged with: object
tagged with: delete-operator
has comment: http://stackoverflow.com/comment/41551170
answer count: 2

paperjs
tags question: http://stackoverflow.com/q/26455960
tag name: paperjs
type: Tag
tags question: http://stackoverflow.com/q/26485801
tags question: http://stackoverflow.com/q/26491164

http://stackoverflow.com/q/26479353
has title: How to debug? ZeroClipboard loaded no error&warning but not copying
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/18633892
upvote count: 2
has body: I've confused for this question two days. ZeroClipboard works no error & warning, but it can not copy the content. I'd check the the Ans at ZeroClipboard: swf loaded, but not working, but still not works well; I did not know how to debug it- -, The env:vagrant & LAMP & localhost ; The files and info of the chrome are shown as following: index.php: clipboard.js looks like: ZeroClipboard.config( { swfPath: "//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.swf" } ); var client = new ZeroClipboard( document.getElementById("copy-button") ); client.on( "ready", function( readyEvent ) { client.on( "aftercopy", function( event ) { event.target.blur(); alert("Copied text to clipboard: " ); } ); } ); XHR
type: Question
has answer: http://stackoverflow.com/a/26658303
has comment: http://stackoverflow.com/comment/41595050
tagged with: zeroclipboard
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41596810
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26658303

http://stackoverflow.com/a/26370354
has comment: http://stackoverflow.com/comment/41435097
has comment: http://stackoverflow.com/comment/41405312
has comment: http://stackoverflow.com/comment/41405294
has comment: http://stackoverflow.com/comment/41435796
has comment: http://stackoverflow.com/comment/41434706
upvote count: 3
has comment: http://stackoverflow.com/comment/41434985
accepted answer of: http://stackoverflow.com/q/26367312
has comment: http://stackoverflow.com/comment/41435570
answers question: http://stackoverflow.com/q/26367312
score: 3
has comment: http://stackoverflow.com/comment/41435514
type: AcceptedAnswer
downvote count: 0
has body: What I actually want to know is if there is some way to get this pixel data without actually rendering it somewhere. Natively no, there is no way to get the pixel data besides from using a canvas (technically a bitmap) to rasterize the vector data (paths) in the browser. The browsers typically use the underlying graphic core system (ie. DirectX etc.) to do the rasterization. We have no access to this through the browser (nor on top of V8/node.js unless you modify it). This sub-system will handle all the rasterizing of lines, circles, arcs and ellipses to pixels, as well as fill polygons and so forth, however not by building an array of point positions but by merely "walking" a slope (put simple of course - fill uses a different approach though based on line scanning). For lines this means the current pixel will for example only be registered temporary as relative to the previous one, for circle/ellipses a pixel is typically in addition mirrored here and there. But in essence there is no registration of absolute or relative pixel positions that can be extracted after the rasterization took place. If you are after an array with the positions of each pixel then you need to implement your own solution of some algorithm. But unless you need that for a very special reason I cannot see why you would not use the canvas which would do this much faster for you, or just work in vector space directly, rasterize them only when needed. You can use JavaScript to implement this yourself using the various line algorithms and what have you out there. See markE's excellent answer for a starter. I also did this for a Retro-Canvas a while back which you can have a look at to see the algorithms used in JavaScript. They are optimized as well. In addition to that you would need to implement a 2D matrix for rotation, scaling and translation if you want the flexibility/compatibility of the canvas. One thing you need to be aware of though is that with this approach you will eliminate anti-ali…
has comment: http://stackoverflow.com/comment/41429487
has comment: http://stackoverflow.com/comment/41402660
type: Answer

http://stackoverflow.com/comment/41590584
comment on: http://stackoverflow.com/q/26476649
score: 0
type: Comment
type: QuestionComment
has text: @MarceloRetana Read the linked duplicate; your question has been closed, so it is impossible for me to answer.

http://stackoverflow.com/q/26498177
has answer: http://stackoverflow.com/a/26498235
score: 0
has body: I have a automatically rendered HTML form which uses a index for the input fields. for quantity: &lt;input id="id_orderline_set-0-orderline_quantity" name="orderline_set-0-orderline_quantity" onkeyup="orderlineTotal()" type="number" value="120"&gt; for product price; &lt;input id="id_orderline_set-0-orderline_product_price" name="orderline_set-0-orderline_product_price" onkeyup="orderlineTotal()" type="number" value="22"&gt; for total line price; &lt;input id="id_orderline_set-0-orderline_total_price" name="orderline_set-0-orderline_total_price" tag="orderline_total_price" type="number" value="2640"&gt; For the following lines the index of the id and name are increased, only quantity example shown; &lt;input id="id_orderline_set-1-orderline_quantity" name="orderline_set-1-orderline_quantity" onkeyup="orderlineTotal()" type="number" value="55"&gt; I would like to use the following JavaScript to calculate the total line price; function orderlineTotal() { var orderlineTotalPrice = 0; var theForm = document.forms["orderform"]; var orderlineQuantityField = theForm.getElementsByName["orderline_quantity"]; var orderlineProductPriceField = theForm.getElementsByName["orderline_product_price"]; var orderlineTotalPriceField = theForm.getElementsByName["orderline_total_price"]; for (var i = 0; i &lt; orderlineQuantityField.length; i ++) { orderlineTotalPrice = orderlineQuantityField[i].value * orderlineProductPriceField[i].value; orderlineTotalPriceField[i].value = orderlineTotalPrice; } } Offcourse this wont work because the name of the elements do not match. Can i lookup the name of the element by using a partial name? If not, how should i loop through the input boxes to calculate the line total?
type: Question
has title: Javascript getElementsByName() for changing names
possible better answer: http://stackoverflow.com/a/26498215
tagged with: javascript
has answer: http://stackoverflow.com/a/26498215
accepted answer: http://stackoverflow.com/a/26498235
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/41630036
type: AnsweredQuestion

http://stackoverflow.com/comment/41471611
comment on: http://stackoverflow.com/a/26409093
score: 0
type: AnswerComment
has text: Thanks a lot. Though in the end, it is nesting two for loops; how efficient do you think this would be with, say, 10k items? Wouldn't it be better to denormalize the items and just copy everything in the savedItems array?
type: Comment

http://stackoverflow.com/comment/41486331
score: 0
has text: Hi Terry, thanks for the quick reply. I am not able to get your code to do anything. How is the GET receiving anything if there is no submit button? At the moment I have made the changes you suggested, however, the #box1 div is not being populated.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26419871

http://stackoverflow.com/comment/41548050
type: Comment
comment on: http://stackoverflow.com/a/26453366
type: AnswerComment
has text: @hindmost thanks. To be honest, I'm feeling dizzy about `>` and `<`. :)
score: 0

http://stackoverflow.com/a/26441069
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26440835
has body: You can do something like this: $(document).ready(function() { $(".container1 ul li").click(function(){ $(".container1 .active").removeClass("active"); $(this).addClass("active"); }); } and change html to something like this: Test Test1 Test2 Check it out here: JSFiddle

http://stackoverflow.com/comment/41642053
score: 2
type: Comment
type: QuestionComment
has text: Hi Josh, maybe you are right but I solved with another way. You can see the answer below. Thanks for your effort.
comment on: http://stackoverflow.com/q/26484936

http://stackoverflow.com/comment/41521202
has text: Thanks, but it's not help me.
type: Comment
comment on: http://stackoverflow.com/a/26435474
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41527738
type: QuestionComment
comment on: http://stackoverflow.com/q/26442064
type: Comment
has text: @George This is not a duplicate. That refers to looking at the object's constructor while this asking how to get the target element.
score: 0

http://stackoverflow.com/q/26448143
type: Question
has title: How to get id of a div onclick of it.?
score: -2
has body: I have three Divs like &lt; /div>.. There is a function onclick of first div.. I have to put one condition so that remaining code should not executed if it contains second Divs id
upvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26448180
favorite count: 0
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/a/26454014
has comment: http://stackoverflow.com/comment/41549439
answers question: http://stackoverflow.com/q/26453954
has comment: http://stackoverflow.com/comment/41549207
has comment: http://stackoverflow.com/comment/41549087
downvote count: 0
has comment: http://stackoverflow.com/comment/41549177
has body: I don't know what u actually mean. Do you want to make a container with 3 equals blocks in it? Or display image as 3 separate parts? If you want 3 images in them, you could set it as background and move it a little bit. For instance: .inner { background-image: url('myimage.png'); background-size: 100% 100%; } .inner:nth-of-type(1) { background-position: 0px 0px; } .inner:nth-of-type(2) { background-position: 0px -33% } .inner:nth-of-type(3) { background-position: 0px -66px } I can't tell more due to the lack of information.
type: Answer
has comment: http://stackoverflow.com/comment/41549227
has comment: http://stackoverflow.com/comment/41549156
score: 1
has comment: http://stackoverflow.com/comment/41549121
upvote count: 1
has comment: http://stackoverflow.com/comment/41548821

http://stackoverflow.com/a/26966866
answers question: http://stackoverflow.com/q/26478023
has comment: http://stackoverflow.com/comment/42504601
score: 9
has comment: http://stackoverflow.com/comment/42502462
upvote count: 9
type: Answer
has body: You can use the is-locked-open attribute in md-sidenav to control the locking open of the sidenav. This will lock the sidenav when browser width is 1000px. To have is forever unlocked, this worked for me:
downvote count: 0

http://stackoverflow.com/a/26450018
score: 0
has comment: http://stackoverflow.com/comment/41570861
type: Answer
answers question: http://stackoverflow.com/q/26449970
has body: Your code updating the elements is correct, you're just firing it too soon. Fire it in response to the button being clicked: $('body').append('&lt;input type="button" value="Fix Href Attributes" id="GG"&gt;'); $("#GG").css("position", "fixed").css("top", 18).css("left", 770).on("click", function() { $('a').each(function() { var $currentA = $(this); var dataHref = $currentA.attr('data-href'); $currentA.attr('href', dataHref); }); }); There is, of course, no reason you need to give it an ID and look it up after appending it: $('&lt;input type="button" value="Fix Href Attributes"&gt;') .css({ position: "fixed", top: 18, left: 770 }) .on("click", function() { $('a').each(function() { var $currentA = $(this); var dataHref = $currentA.attr('data-href'); $currentA.attr('href', dataHref); }); }) .appendTo(document.body);

http://stackoverflow.com/q/26489348
tagged with: rating-system
type: AnsweredQuestion
has body: I got my first star-rating up and running, however, I am missing a single-part. My HTML looks like this: Here's my Javascript: javascript: $('span.star').hover(function() { hack_id = this.dataset.hack; rating = this.dataset.rating; for (i = 1; i <= 5; i++) { if (i <= rating) { $('#' + hack_id + '-star-' + i).addClass('star-active'); } else { $('#' + hack_id + '-star-' + i).removeClass('star-active'); } } }); Now, when I hover over the star(s) it applies the class just fine and also removes the class of those stars that are not needed. My last problem though is that once the class(es) were applied and I move my mouse somewhere else, it does not undo the changes. I pretty much need some kind of: if (not hovering over any star) remove all classes set before endif I know this is a very basic task but I can not seem to get through it. Thank you all in advance!
type: Question
has answer: http://stackoverflow.com/a/26489591
has title: Reset class when "unhovering" item
tagged with: javascript
has comment: http://stackoverflow.com/comment/41612859
has comment: http://stackoverflow.com/comment/41613006
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26489591

http://stackoverflow.com/comment/41566233
has text: @DanielJ.G., can you post that as an answer, the suggestion to upgrade `Optimization`? That seems to have fixed it for me. I also had to updgrade `WebGrease` but that was painless as far as I can tell.
comment on: http://stackoverflow.com/q/26461535
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41508536
has text: Without more code, I'm unable to help you any further. Please see: http://stackoverflow.com/help/mcve
comment on: http://stackoverflow.com/a/26373281
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41379979
type: AnswerComment
type: Comment
score: 0
has text: I was hoping that there is some cross-browser solution, because other browsers are getting frozen as well, just without dialog boxes. And the CPU load on user's PC is 100% of course.
comment on: http://stackoverflow.com/a/26360987

http://stackoverflow.com/q/26492550
answer count: 1
accepted answer: http://stackoverflow.com/a/26493042
linked to: http://stackoverflow.com/q/32266101
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26493042
type: AnsweredQuestion
has body: I have the next HTML code: Select All CHS Informed Consent Form Order Sets Carboplatin Teaching Sheet Bevacizumab Teaching Sheet CHS Specialty Pharmacy Sheet Calendar Healthcare Provider Contact Form Generate Super Pack And the next jquery code: This toggle the styles $('.checkbox').checkbox({ buttonStyle: 'btn-link', buttonStyleChecked: 'btn-inverse', uncheckedClass: 'icon-check-empty', checkedClass: 'btn-inverse' }); If I want to check all boxes I use: $(".selectAll").click(function () { $('input:checkbox').not(this).prop('checked', this.checked); }); But my problem is, when I have one or more item selected and then I choose select All the checked items go unchecked. I'm using bootstrap-checkbox.js But I can not figure out how solve the problem. Any idea? Thank you.
has title: Unchecked checkbox when check all checkboxs bootstrap
type: Question
tagged with: onselect
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26390886
has comment: http://stackoverflow.com/comment/41435027
upvote count: 1
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41434978
answers question: http://stackoverflow.com/q/26390735
has body: The two pieces of code are not identical. One is a collection of objects and the other is a loop through a collection of objects. You can take an action on a collection that affect all equally or you can act individually on each object in the collection. Once you invoke the each() function you are individualizing objects in the collection. To answer your question, there is no way to reference the returned collection of objects as if you were looping and applying a different function, calculation or result to each individual item in the collection.

http://stackoverflow.com/comment/41631684
has text: You'll have to post some code to get much help.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26497461
score: 0

http://stackoverflow.com/a/26374063
has comment: http://stackoverflow.com/comment/41405293
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/41405202
score: -1
has body: The display property cannot be transitioned. Using jQuery's show and hide methods are essentially the same as just saying display: block and display: none in CSS, which, as I just mentioned, can't be transitioned. However, a property like opacity or width CAN be transitioned with CSS. You'd want to toggle a class instead of using .show and .hide though, and let CSS do the transitioning. If you're looking to simply fade in and out using jQuery, you could replace your .hide method with .fadeOut. Note: I hope this is what you were referring to :)
answers question: http://stackoverflow.com/q/26373631
downvote count: 1

http://stackoverflow.com/comment/41502630
comment on: http://stackoverflow.com/q/26428728
has text: I am getting this in console after moving var info = new Array(); [Array[0], Array[0], Array[0], Array[0], Array[0], Array[0], Array[0], Array[0], Array[0], Array[0], $family: function, $constructor: function, each: function, clone: function, clean: function…]0: Array[0]1: Array[0]2: Array[0]3: Array[0]4: Array[0]5: Array[0]6: Array[0]7: Array[0]8: Array[0]9: Array[0]length: 10__proto__: Array[0]
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26368682
accepted answer: http://stackoverflow.com/a/26368739
tagged with: javascript
tagged with: date
possible better answer: http://stackoverflow.com/a/26369346
has answer: http://stackoverflow.com/a/26369346
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26368847
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26368739
type: Question
has body: The date is not showing up in the output when I run the following code. I can't seem to figure out why the date won't show up... document.write() Example The current date and time is:
has title: Add current date using inline javascript
upvote count: 2
answer count: 3

http://stackoverflow.com/q/26394736
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26394852
has comment: http://stackoverflow.com/comment/41441708
has body: I ran this in the console to find the value of result but I am stumped as to why it is 122. I cannot figure why, nor can I figure out how bonus is used in the code blow. Could someone explain the value of bonus and how they attained the values of each variable declared at the beginning please. I think it will help me and the rest of the world understand what's going in this learning script: var hidden = mystery(3); var jumble = mystery3(hidden); var result = jumble(2); function mystery ( input ){ var secret = 4; input+=2; function mystery2 ( multiplier ) { multiplier *= input; return secret * multiplier; } return mystery2; } function mystery3 ( param ){ function mystery4 ( bonus ){ return param(6) + bonus; } return mystery4; } Thank you very much in advance! (i've reviewed many resources and can't quite figure this rather basic one out). :(
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26394873
has answer: http://stackoverflow.com/a/26394873
has comment: http://stackoverflow.com/comment/41441844
type: AnsweredQuestion
has title: Closures & JavaScript Syntax
type: Question
has answer: http://stackoverflow.com/a/26394852

http://stackoverflow.com/q/26380676
type: Question
has comment: http://stackoverflow.com/comment/41474827
has comment: http://stackoverflow.com/comment/41419358
tagged with: css
possible better answer: http://stackoverflow.com/a/26381115
score: 0
answer count: 2
tagged with: wordpress
has answer: http://stackoverflow.com/a/26381115
tagged with: php
has title: PHP Calculator for Wordpress not functioning properly
has answer: http://stackoverflow.com/a/26702919
has body: Been trying all to get my calculator working. I've coded the calculator using PHP, JS and CSS. Very basic but when the calculate button is pressed the calculation is not done. Here is my code. <?php /* Template Name: Calculator */ wp_enqueue_script('calc_js', get_bloginfo('template_url').'/library/calc.js'); wp_enqueue_style('calc_css', get_bloginfo('template_url').'/library/calc.css'); get_header(); ?> <?php while ( have_posts() ) : the_post(); ?> <article <?php post_class('clearfix') ?> id="post-<?php the_ID(); ?>"> <?php the_content(); ?> Payment Calculator Our monthly payment calculator will help you work out how much your purchase may cost with various loan amounts. Enter your figures into the top section, then click 'Calculate'. If you want to try different figures you can 'Clear' the form. Purchase price* £ Loan amount* £ LTV (Loan To Value) % Interest Only* £ * Need to also consider cost of repayment method to repay your loan. This information is for illustrative purposes only and does not contain all of the details you need to choose a loan. Yield Calculator The yield calculator will help you measure the return of an investment property by comparing rental income and property value. The yield is the amount of rent generated each year expressed as a percentage of the property value or purchase price. Monthly Rent £ Property Value £ Yield % * This calculator is based on the gross yield. It is based on the property being tenanted and receiving rent for 12 months of the year. This information is for illustration purposes only and doesn’t take into account any other costs associated with the property. <?php endwhile; ?> <?php get_footer(); ?> And This is my JS code: jQuery(document).ready(function() { jQuery('.calc .calculate').click(function() { var parent = jQuery(this).parents('.calc'); parent.find('.error').removeClass('error'); var error = false; var purchase = parent.find('.purchase'); var loan = parent.find('.loan'); var purchaseval = purchase.val(); if (…
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26702919

http://stackoverflow.com/q/26496029
favorite count: 0
tagged with: angularjs
type: Question
upvote count: 1
answer count: 1
has title: AngularJS checkboxes for array of numbers
has body: I’ve got an array of numbers that I’d like to display as a selection of check boxes that the user can then check/uncheck, and what I’d like to do is to then have another array of values created that represent the checked check boxes. So, for example, my options are: $scope.options = [500, 1250, 2500, 5000, 10000, 25000, 50000, 100000]; My second array is: $scope.selected = [1250, 2500, 5000, 10000, 25000]; I’d like to build a form that looks something like: [ ] 500 [x] 1250 [x] 2500 [x] 5000 [x] 10000 [x] 25000 [ ] 50000 [ ] 100000 And have the second array update depending on the values that are checked/unchecked in the form. I think I know how to get the form built by using ngRepeat on the first array, and setting the checked flag for the check boxes should be simple enough, but what I’m not sure on is how to get the second array updated. Is there a relatively simple way of doing this? Any help is greatly appreciated! Thanks, Dylan
has answer: http://stackoverflow.com/a/26496285
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26496285
linked to: http://stackoverflow.com/q/14514461
type: AnsweredQuestion
downvote count: 0
score: 1
duplicate of: http://stackoverflow.com/q/14514461

http://stackoverflow.com/comment/41610352
comment on: http://stackoverflow.com/q/26488043
score: 0
has text: This is handled automatically. `new Date(2014, 12, 1)` results in `Jan 1st 2015`.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41649652
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26509641
type: Comment
has text: `loop = loop ? false : true` What's wrong with `loop = !loop`?

jquery-ui
tags question: http://stackoverflow.com/q/26481545
tags question: http://stackoverflow.com/q/26421755
tags question: http://stackoverflow.com/q/26444487
tags question: http://stackoverflow.com/q/26354477
tags question: http://stackoverflow.com/q/26374218
tags question: http://stackoverflow.com/q/26454105
tags question: http://stackoverflow.com/q/26392353
tags question: http://stackoverflow.com/q/26475189
tags question: http://stackoverflow.com/q/26469777
tags question: http://stackoverflow.com/q/26488697
tags question: http://stackoverflow.com/q/26359960
tags question: http://stackoverflow.com/q/26488974
tags question: http://stackoverflow.com/q/26399396
tags question: http://stackoverflow.com/q/26501785
tags question: http://stackoverflow.com/q/26434902
tags question: http://stackoverflow.com/q/26453057
tags question: http://stackoverflow.com/q/26481447
tags question: http://stackoverflow.com/q/26392965
tags question: http://stackoverflow.com/q/26464903
tags question: http://stackoverflow.com/q/26410525
tags question: http://stackoverflow.com/q/26454251
tags question: http://stackoverflow.com/q/26378385
tags question: http://stackoverflow.com/q/26428902
tags question: http://stackoverflow.com/q/26506225
tags question: http://stackoverflow.com/q/26399979
tags question: http://stackoverflow.com/q/26371059
tags question: http://stackoverflow.com/q/26443464
tags question: http://stackoverflow.com/q/26383642
tags question: http://stackoverflow.com/q/26430019
tags question: http://stackoverflow.com/q/26404407
tags question: http://stackoverflow.com/q/26396961
tags question: http://stackoverflow.com/q/26461426
tags question: http://stackoverflow.com/q/26493928
tags question: http://stackoverflow.com/q/26398235
tags question: http://stackoverflow.com/q/26460914
tags question: http://stackoverflow.com/q/26425175
type: Tag
tags question: http://stackoverflow.com/q/26437124
tags question: http://stackoverflow.com/q/26410283
tag name: jquery-ui
tags question: http://stackoverflow.com/q/26402663
tags question: http://stackoverflow.com/q/26417309
tags question: http://stackoverflow.com/q/26364380

http://stackoverflow.com/comment/41562538
type: Comment
has text: Dear, I am working on php, sqlite and yii framework, running application on localhost, but the network connection is not present but the only option is tablets internal gps and i have to get longitude and latitude. so tell me according to my type of programming environment.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26461513

http://stackoverflow.com/comment/41437618
type: Comment
score: 1
has text: It works both in Chrome's console and in node.js REPL machine. ) Have no means to try other browserless JS implementations, but won't be surprised if they follow the same approach. Yet the OP is right, it seems to be missing from ES (5, at least).
comment on: http://stackoverflow.com/a/26392283
type: AnswerComment

http://stackoverflow.com/q/26462658
type: Question
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/26462761
tagged with: javascript
tagged with: jquery
has title: Infinity Ajax Request When Drop Change in Knockout MVC
score: 0
answer count: 1
tagged with: ajax
has body: I am using Knockout MVC in my project. I try to pass the viewModel to when Drop Down changing . but when I try this method call several times and the alert "ok" invoke continuesley. Can any one please help me on this?? $(function () { $('#rmch').change(function () { $.ajax({ url: '@Url.Action("DropChange", "Home")', type: 'POST', data: ko.mapping.toJSON(viewModel), dataType: "json", contentType: "application/json; charset=utf-8", success: function (data) { if (data.redirect) { location.href = resolveUrl(data.url); } else { //ko.applyBindings(viewModel, document.getElementById("p_scentsFH")); alert("Ok"); ko.mapping.fromJS(data, viewModel); } }, error: function (error) { alert("There was an error posting the data to the server: " + error.responseText); }, }); }); }); My Json Method public JsonResult DropChange(HotelModel hotelmod) { //hmodel.RoomModel = new List<RoomModel>(); //for (int i = 1; i <= hmodel.NoOfRooms; i++) //{ // hmodel.RoomModel.Add(new RoomModel { adultsDrp = ListItems.GetList(1, 6), childDrop = ListItems.GetList(0, 5) }); // //hmodel.RoomModel.Add(new RoomModel { }); //} var jjj = JsonConvert.SerializeObject(hotelmod); return Json(hotelmod); } My View Search and Book Hotels We're bringing you a new level of comfort. Where Your Destination @ko.Html.TextBox(m => m.Destination, new { @class = "input-text full-width", @placeholder = "Any destination, country, city code" }) @ko.Html.Hidden(new { @Id = "DesCode" }).Value(m => m.DesCode) When Check In @ko.Html.TextBox(m => m.CheckInDate, new { @class = "input-text full-width" }) Check Out @ko.Html.TextBox(m => m.CheckOutDate, new { @class = "input-text full-width" }) ROOMS @ko.Html.DropDownList(m => m.RoomList, new { @class = "full-width jkl", @id = "rmch" }, "Text", "Value").Value(m => m.NoOfRooms) @using (var rmModel = ko.Foreach(m => m.RoomModel)) { Room 1 ADULTS @rmModel.Html.DropDownList(m => m.adultsDrp, new { @class = "full-width" },"Text","Value").Value(m=>m.adultscount) KIDS @rmModel.Html.DropDown…
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26462761
tagged with: knockout.js

http://stackoverflow.com/a/26447092
type: Answer
has body: Ok, It seems like it was (KIND OF) a loading order issue after all. I switched the enqueue order in my child themes functions.php and put the straight javascript first and the jQuery second like so: &lt;?php function straight_scripts_enqueue_here() { wp_enqueue_script( 'custom2', get_stylesheet_directory_uri() . '/js/custom2.js', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'straight_scripts_enqueue_here' ); function jQuery_enqueue_here() { wp_enqueue_script( 'custom', get_stylesheet_directory_uri() . '/js/custom.js', array( 'jquery' ) ); } add_action( 'wp_enqueue_scripts', 'jQuery_enqueue_here' ); I hope this helps someone who is building a wordpress site with the ecwid plugin and trying to fix the search widget. . . This is still kind of reinventing the wheel because it's still not using the placeholder attribute. but at least the default value solution from custom2.js is working smoothly now. I'm still not sure why .attr('placeholder', 'Search') doesn't work, but the site is functioning properly from a user experience standpoint, so I guess I'll let this slide and hope to understand it better after a semester of JavaScript at the local College. . .
answers question: http://stackoverflow.com/q/26446527
score: 0

http://stackoverflow.com/comment/41429188
type: QuestionComment
has text: Can you show us the JavaScript you're attempting to use so far, and point out where it's not working as intended?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26387637

http://stackoverflow.com/a/26452078
has body: Try regular expression: var m = "@username This is just a test string".match(/@(.+?)\b/); console.log(m); // ["@username", "username"]
upvote count: 4
has comment: http://stackoverflow.com/comment/41545527
downvote count: 0
answers question: http://stackoverflow.com/q/26452054
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/41545467

http://stackoverflow.com/comment/41410590
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26377676
has text: Just be aware that this will clear out any HTML tags within the paragraph, that is, all existing formatting and structure.
score: 0

http://stackoverflow.com/comment/41435182
score: 0
type: Comment
has text: I tried removing attribute clickDisabled=disable and it is not calling SearchDetails function. http://jsfiddle.net/ak9gsy0h/1/
comment on: http://stackoverflow.com/a/26390793
type: AnswerComment

http://stackoverflow.com/comment/41511136
type: Comment
comment on: http://stackoverflow.com/q/26433061
has text: @brso05, the staging server is using port 80 by default, so it can't be a port issue.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41463408
comment on: http://stackoverflow.com/q/26407307
type: QuestionComment
type: Comment
has text: Your code has a syntax error. `foo` shouldn't close with `})`. Check your console for errors because your code works otherwise.
score: 1

http://stackoverflow.com/a/26478665
type: Answer
has comment: http://stackoverflow.com/comment/41598104
answers question: http://stackoverflow.com/q/26478428
has body: If you want 'inventory item' as tooltip specify the size of total options add size="4" in your fiddle Item 1 Item 2 Item 3 Item 4
score: 0
has comment: http://stackoverflow.com/comment/41597415
has comment: http://stackoverflow.com/comment/41595984

http://stackoverflow.com/comment/41496085
comment on: http://stackoverflow.com/q/26425321
has text: there is no `form` defined in demo and no `validate()` method either. Where are you getting this code from?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26452896
possible better answer: http://stackoverflow.com/a/26452916
tagged with: nextsibling
type: AnsweredQuestion
type: Question
tagged with: split
tagged with: javascript
has title: Performing split on node returned by nextSibling returns TypeError undefined is not a function
score: 0
answer count: 2
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/26452916
has body: I am trying to grab a piece of text next to an element that I can select with its class and then perform a split(" ") on it, but I get a TypeError: undefined is not a function. I think this is because it is not a string, so when I try to convert it to a string first it returns "[object Text]" html: Hinata [1:28:10] When I perform document.getElementsByClassName("planetIcon planet tooltip js_hideTipOnMobile")[0].nextSibling it returns "Hinata [1:28:10]", but performing split() on it does not work. What am I missing here?
has answer: http://stackoverflow.com/a/26452929
accepted answer: http://stackoverflow.com/a/26452929

http://stackoverflow.com/a/26399256
has comment: http://stackoverflow.com/comment/41449522
has comment: http://stackoverflow.com/comment/41449061
has comment: http://stackoverflow.com/comment/41449282
downvote count: 3
has comment: http://stackoverflow.com/comment/41449432
score: -3
type: Answer
has body: var array = [obj1, obj2, obj3, objN]; for(i = 0, i &lt; array.length; i++){ for(j = i + 1; j &lt; array.length; j++){ if(array[i].key == array[j].key){ // Your logic whatever you want to do here. } } }
has comment: http://stackoverflow.com/comment/41449139
upvote count: 0
has comment: http://stackoverflow.com/comment/41449190
answers question: http://stackoverflow.com/q/26399121
has comment: http://stackoverflow.com/comment/41449361
has comment: http://stackoverflow.com/comment/41449249

http://stackoverflow.com/comment/41620244
type: Comment
has text: Thanks, but I don't want to change the navbar's colors. I'm trying to change the sidebar's colors.
score: 0
comment on: http://stackoverflow.com/a/26493262
type: AnswerComment

http://stackoverflow.com/comment/41660995
has text: @msturdy Edited and added: pastebin.com/xGvQMuvp Sorry I forgot it was only set view-able by members and sadly no I don't have access the the page itself or I'd know how to grab this easily by adding an id to that specific td... Here's all the code for the page I simply copied from using inspect element. If you scroll to the bottom where it has October 2014 and then 150, I wanna get the 150. It's the 11th table, 14th tr, 2nd td.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26478006
type: Comment

http://stackoverflow.com/comment/41667323
type: AnswerComment
has text: Hm. I'm not sure why the flex attribute isn't working in this case However, if you leave `index.html` you can set the styles in `my-app.html`: ... Or just: `core-header-panel: 100vh`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26513993

http://stackoverflow.com/a/26365074
type: Answer
has body: // declaration should go above loop. lateralus has suggested in comment var array=[]; for (i = 0; i &lt; intersects[0].object.geometry.vertices.length; i++) { console.log(i);// print 7 times var dist=euclideanDistance(intersects[0].object.geometry.vertices[i], intersects[0].point); map = {v:intersects[0].object.geometry.vertices[i], d:dist}; array.push(map); } console.log(array); //only contains one last element
answers question: http://stackoverflow.com/q/26364930
score: 0

http://stackoverflow.com/a/26501558
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/41637367
downvote count: 0
score: 5
answers question: http://stackoverflow.com/q/26501529
type: AcceptedAnswer
has body: That's because you pass to css method an object containing property property. In this case it's better to pass two arguments to css method: function changeProperty(mine , property , value){ $(mine).css(property, value); } However, if you want to pass an object, you can dynamically build it: function changeProperty(mine , property , value){ var obj = {}; obj[property] = value; $(mine).css(obj); } Another improvement is to use this value inside of the function (that is the same with mine in this case): function changeProperty(property , value){ $(this).css(...); } Then in HTML you will have changeProperty.call(this, "font", "Arial"). .css( propertyName, value ) Set one or more CSS properties for the set of matched elements. propertyName: A CSS property name. Type: String value: A value to set for the property. Type: String or Number
accepted answer of: http://stackoverflow.com/q/26501529
has comment: http://stackoverflow.com/comment/41637407

http://stackoverflow.com/a/26483294
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26483210
answers question: http://stackoverflow.com/q/26483210
type: AcceptedAnswer
downvote count: 0
has body: Try this: Click the light bulb to turn on/off the light.
type: Answer

http://stackoverflow.com/a/26426350
has comment: http://stackoverflow.com/comment/41501978
has comment: http://stackoverflow.com/comment/41501276
type: Answer
score: 5
answers question: http://stackoverflow.com/q/26417359
accepted answer of: http://stackoverflow.com/q/26417359
upvote count: 5
has comment: http://stackoverflow.com/comment/41502985
type: AcceptedAnswer
downvote count: 0
has body: By running code in console, do you mean that you run it with Node.js? But 'prompt' (as well as 'alert', etc.) can't be used in server-side scripts executed by Node.js. You can only prompt the user with client-side javascript, i.e. running in the browser via a tag in the rendered HTML, not the Javascript API engine running on the server.
has comment: http://stackoverflow.com/comment/41505517

responsive-design
tags question: http://stackoverflow.com/q/26420197
tags question: http://stackoverflow.com/q/26500601
tags question: http://stackoverflow.com/q/26454572
tags question: http://stackoverflow.com/q/26374434
tags question: http://stackoverflow.com/q/26372016
tags question: http://stackoverflow.com/q/26402366
tags question: http://stackoverflow.com/q/26457215
tags question: http://stackoverflow.com/q/26477733
tags question: http://stackoverflow.com/q/26414647
tags question: http://stackoverflow.com/q/26409078
tags question: http://stackoverflow.com/q/26389066
tags question: http://stackoverflow.com/q/26476257
tags question: http://stackoverflow.com/q/26494196
tags question: http://stackoverflow.com/q/26429321
tag name: responsive-design
type: Tag

http://stackoverflow.com/comment/41555064
comment on: http://stackoverflow.com/a/26456275
score: 0
type: AnswerComment
type: Comment
has text: @Dave fair point. As I said everyone's use case is different, Meteor is a good framework anyhow, all the best :)

http://stackoverflow.com/q/26393860
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/41440144
has title: javascript confirm(cancel) still submits form when using return false?
has body: i am using the following code: &lt;form method='POST' action='post.php' style='margin-bottom:0px;'&gt; &lt;input type='image' name='close_x' src='imgs/button.png' onclick='confirmClose()'&gt; &lt;/form&gt; function confirmClose() { if (confirm('Are you sure you wish to close?')) { return true; } else { return false; } } however, when you click cancel in the confirm box, it still submits the form. Surely the return false should stop this from happening? Any idea why? Thanks.
tagged with: function
has answer: http://stackoverflow.com/a/26394094
tagged with: javascript

http://stackoverflow.com/q/26510118
type: Question
tagged with: javascript
has title: Angularjs expression in ng-click not working in android
has comment: http://stackoverflow.com/comment/41651335
answer count: 3
favorite count: 0
tagged with: cordova
possible better answer: http://stackoverflow.com/a/26510716
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/26510716
tagged with: android
has answer: http://stackoverflow.com/a/26511044
type: AnsweredQuestion
tagged with: angularjs-ng-click
accepted answer: http://stackoverflow.com/a/26511044
score: 1
has answer: http://stackoverflow.com/a/28175907
downvote count: 1
has body: I am developing an android application using angularjs and ionic framework. It includes a one touch calling feature, ie a user can make the call on touching a number. I used tel in html5 but my bad luck its not working for me. Here is the code. //this won't work {{hotels.phone_no1}} //this will work {{hotels.phone_no1}} When the number is directly given it will work fine, but expression in tel not working.

http://stackoverflow.com/comment/41436983
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26391977
type: Comment
has text: It was that ! Thanks you :)

http://stackoverflow.com/q/26445592
accepted answer: http://stackoverflow.com/a/26445629
tagged with: php
tagged with: pdo
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41533834
tagged with: mysql
type: Question
has title: PHP PDO insert statement not going through
tagged with: javascript
tagged with: jquery
has body: I have a web application that I am building where a user is able to create a new project. I have been dealing with this for a couple days and I am totally stumped! I have a "New Project" button and when you click it, it calls a newProject function (and passes through the id for the folder the new project will be in. But that does not matter.) This is what that javascript function looks like. function newProject(parentFolder) { //this is here because the data type stored in the database is varchar and if the value is 'none' then there the project being created will bi in no folder. if(parentFolder != 'none') { //convert to nonstring var PF = parentFolder; }else { var PF = 'none'; } //create the new project $.post('../../php/new_project.php', { parentFolder: PF, name: 'New Project' }, function(data) { alert(data); }); } The connection to the new_project.php file is fine and all the variables pass through. Here is the new_project.php file session_start(); if(isset($_SESSION['username'])){ $username = $_SESSION['username']; if(isset($_SESSION['name'])){ $name = $_SESSION['name']; } } if(isset($_POST['name'])) { $parentFolder = $_POST['parentFolder']; $name = $_POST['name']; $date = date('Y/m/d'); $openId; for ($i=0;$i&lt;10;++$i) $openId.= ($r=mt_rand(0,35))&lt;26?chr(ord('a')+$r):chr(ord('0')+$r-26); $conn = new PDO('mysql:host=localhost;dbname=projects', "******", "*******"); $sql = "INSERT INTO projects (id, ProjectName, creatorOfProject, public, lastEdited, openId, deleted, parentfolder, favorite) VALUES (:id, :ProjectName, :creatorOfProject, :public, :lastEdited, :openId, :deleted, :parentfolder, :favorite)"; $query = $conn -&gt; prepare($sql); $query -&gt; execute(array( ":id" =&gt; '', ":ProjectName" =&gt; $name, ":creatorOfProject" =&gt; $username, ":puclic" =&gt; '', ":lastEdited" =&gt; $date, ":openId" =&gt; $openId, ":deleted" =&gt; '', ":parentfolder" =&gt; $parentFolder, ":favorite" =&gt; '' )); }else { echo 'something went wront'; } Because I am alerting t…
has answer: http://stackoverflow.com/a/26445629
score: 0
answer count: 1

http://stackoverflow.com/a/26441918
upvote count: 2
has comment: http://stackoverflow.com/comment/41527202
has comment: http://stackoverflow.com/comment/41527368
has comment: http://stackoverflow.com/comment/41527233
has comment: http://stackoverflow.com/comment/41527331
has comment: http://stackoverflow.com/comment/41527440
has comment: http://stackoverflow.com/comment/41527159
has body: The problem is that the replace will not replaceAll automatically. You have to use global regex for this. eg instead of writing string.replace("search","replace") write: string.replace(/search/g,"replace") The /g flags means searching globally, eg replaceAll In your case, I would write the a array as an array of regexes instead: var a = [ /a\.m\./g, /p\.m/g, /u\.k\./g ]; However, you need to escape special characters, like . Your code should than be: &lt;script&gt; function myFunction() { var a = [ /a\.m\./g, /p\.m/g, /u\.k\./g ]; var b = ["its_morning","its_noon","unKnown_thing"]; var str = document.getElementById("textBox1").value; for (var k = 0; k &lt; a.length; k++) { str = str.replace(a[k], b[k]); }; document.getElementById('textBox2').value = str; } &lt;/script&gt;
answers question: http://stackoverflow.com/q/26441886
downvote count: 0
has comment: http://stackoverflow.com/comment/41527111
has comment: http://stackoverflow.com/comment/41527139
has comment: http://stackoverflow.com/comment/41527293
type: Answer
has comment: http://stackoverflow.com/comment/41527178
score: 2

http://stackoverflow.com/q/26369112
tagged with: javascript
score: -1
tagged with: forms
has comment: http://stackoverflow.com/comment/41395478
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41395830
tagged with: jquery
favorite count: 0
has title: Making jquery function to work across multiple forms. (Making Jquery DRY)
has body: I've created a simple js function called from a button-onclick to do something straight forward, submit the data 'selected' and open a new tab. This was a single use case, worked fine for this one case. But NOW, as I'm scripting out more and more widgets within my feature, (tabs presenting different tools, within the same DOM). I'm finding way harder to keep the DRY. I want to set up the forms to have same general inputs, get which form it is by the form id, serialize and let the controller deal with the rest. Knowing the form id will allow some exceptions to some forms, if needed. Each attempt has me banging my head on my desk. Why are no forms being executed? And if I get one form working, why isn't the other? [Similar code sample with '.change'] How do I get this ideal code to work across all the forms OldCode: JS function doaction(){ alert("I work perfectly"); } HTML Ideal Code: jQuery //$('form.results').submit(function(e){ //DIDNT WORK $('.rbutton').click(function(e){ // NOT WORKING EITHER alert("This alert doesnt exist"); var form_id = e.target.id; // gather data // submit data via ajax // update the dom by adding another tab/widget. }); HTML
has answer: http://stackoverflow.com/a/26471894
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41395661
has comment: http://stackoverflow.com/comment/41395762
downvote count: 1
has comment: http://stackoverflow.com/comment/41395585
type: Question
has comment: http://stackoverflow.com/comment/41395457

http://stackoverflow.com/comment/41633178
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26500511
has text: No, but you can encapsulate the value in an object, and modify it as a property of the object.
score: 1

http://stackoverflow.com/a/26466335
has body: try to call the function onclick="log('testing')" like this it might work
has comment: http://stackoverflow.com/comment/41570788
type: Answer
has comment: http://stackoverflow.com/comment/41570435
has comment: http://stackoverflow.com/comment/41570751
upvote count: 0
answers question: http://stackoverflow.com/q/26466250
downvote count: 2
score: -2
has comment: http://stackoverflow.com/comment/41570571
has comment: http://stackoverflow.com/comment/41570465

http://stackoverflow.com/q/26357989
has comment: http://stackoverflow.com/comment/41374435
downvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26358042
linked to: http://stackoverflow.com/q/201323
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41374800
tagged with: regex
has comment: http://stackoverflow.com/comment/41374713
score: -5
has title: Regex for Email Address along with name format
has body: For email address I am using regex as var emailRegex = /^([\w-.]+@([\w-]+.)+[\w-]{2,4})?$/ What is regex for LastName FirstName &lt;lastName.firstName@gmail.com&gt;
type: Question
duplicate of: http://stackoverflow.com/q/201323

http://stackoverflow.com/q/26415100
has answer: http://stackoverflow.com/a/27592922
tagged with: http://stackoverflow.com/tag/html
has body: I have put together a plain javascript/css image slider, started out as just a learning exercise but am now looking to apply it in the real world. The problem is that the animation is choppy on my desktop (which is a v. high spec gaming rig) - and even worse on a mobile (to the degree it's not really an animation anymore) You can see it in action here: www.chrishowie.co.uk/sands/ jsfiddle isolates much of the pertinent code - it's not a "this doesn't work" issue, so hopefully the fiddle gives enough to help optimize it. http://jsfiddle.net/9aozrxy8/5/ In summary: I have a DIV with 4 images in a row, each image is 100% the width of the page. I use javascript to translateX (I have tried translate3d as heard this uses GPU, but didnt make much diff) and I set CSS transitions to ease-in the transform. I also thought that potentially I am just trying to do too much on this site - but then I look at some other sites doing a heck of a lot more and it's smooth as silk. So I guess I'm missing something. function slideRight() { if (sliding) { return false }; window.sliding = true; el = document.getElementById("slider"); cst = getComputedStyle(el); transformst = cst.transform || cst.webkitTransform || cst.mozTransform; widthst = cst.width; widthst = widthst.replace("px", ""); // computed width of slider (7680px) slidewidth = widthst / 4; transformst = transformst.replace("matrix(", ""); transformst = transformst.replace(")", ""); transformst = transformst.split(","); transformst = transformst[4]; // returns current transform in px without unit (px) if (!transformst) { transformst = 0; } var activebtn = "sldr" + Math.round((Number(transformst) / (-1 * slidewidth))); document.getElementById(activebtn).classList.remove("sliderbuttonactive"); if (activebtn != "sldr3") { document.getElementById("slider" + Math.round((2 + Number(transformst) / (-1 * slidewidth)))).style.visibility = "visible"; document.getElementById("slider" + Math.round((2 + Number(transformst) / (-1 * slidewidth))…
has comment: http://stackoverflow.com/comment/43383914
favorite count: 0
type: UnansweredQuestion
score: 6
tagged with: css
upvote count: 6
has comment: http://stackoverflow.com/comment/41488149
has title: Image slider is choppy
has comment: http://stackoverflow.com/comment/41478007
has comment: http://stackoverflow.com/comment/41488034
type: Question
tagged with: transform
has comment: http://stackoverflow.com/comment/41478978
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/45372971
has comment: http://stackoverflow.com/comment/45415885

http://stackoverflow.com/q/26358153
tagged with: pagination
tagged with: javascript
has comment: http://stackoverflow.com/comment/41380371
has comment: http://stackoverflow.com/comment/41379013
score: 0
answer count: 2
has body: I'm new with ajax and php. I had created a page where it loads the data using ajax. The data is shown using pagination. The thing is, I can't figure out on how to make the results search loading back to birds.php. birds.php Searching load_data.php //this is the page to load the data to birds.php <?php if(isset($_POST['page'])) { $page = $_POST['page']; $cur_page = $page; $page -= 1; $per_page = 2; $previous_btn = true; $next_btn = true; $first_btn = true; $last_btn = true; $start = $page * $per_page; include 'connect.php'; // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); if(isset($_POST['search'])){ $search = $_POST['search']; $searchPar = ''; if(!empty($search)){ $searchPar = "WHERE (`species` LIKE '%".$search."%') OR (`location` LIKE '%".$search."%')"; } $query = "SELECT * from birds $searchPar LIMIT $start, $per_page"; $result1 = mysql_query($query) or die('MySql Error' . mysql_error()); $msg = ""; if(mysql_num_rows($result1) > 0){ while($result = mysql_fetch_array($result1)){ $msg .= " "; } $msg = " " . $msg . " "; // Content for Data $query_pag_num = "SELECT COUNT(*) AS count FROM birds WHERE (`species` LIKE '%".$search."%') Or (`location` LIKE '%".$search."%')"; $result_pag_num = mysql_query($query_pag_num); $row = mysql_fetch_array($result_pag_num); $count = $row['count']; $no_of_paginations = ceil($count / $per_page); if ($cur_page >= 5) { $start_loop = $cur_page - 2; if ($no_of_paginations > $cur_page + 2) $end_loop = $cur_page + 2; else if ($cur_page <= $no_of_paginations && $cur_page > $no_of_paginations - 4) { $start_loop = $no_of_paginations - 4; $end_loop = $no_of_paginations; } else { $end_loop = $no_of_paginations; } } else { $start_loop = 1; if ($no_of_paginations > 5) $end_loop = 5; else $end_loop = $no_of_paginations; } $msg .= " "; // FOR ENABLING THE FIRST BUTTON if ($first_btn && $cur_page > 1) { $msg .= " First "; } else if…
has comment: http://stackoverflow.com/comment/41377070
has comment: http://stackoverflow.com/comment/41378505
has comment: http://stackoverflow.com/comment/41378338
has comment: http://stackoverflow.com/comment/41378274
tagged with: ajax
has comment: http://stackoverflow.com/comment/41377649
has comment: http://stackoverflow.com/comment/41374830
has comment: http://stackoverflow.com/comment/41377467
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26358510
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41375477
has comment: http://stackoverflow.com/comment/41380562
has answer: http://stackoverflow.com/a/26361164
has title: Load data after search function using ajax in one php page
type: Question
has comment: http://stackoverflow.com/comment/41379819
has comment: http://stackoverflow.com/comment/41379852
has comment: http://stackoverflow.com/comment/41375782
has comment: http://stackoverflow.com/comment/41379381

http://stackoverflow.com/comment/41477400
comment on: http://stackoverflow.com/q/26413772
score: 0
has text: use a canvas element and blit in the new image? (you may have to manage image maps yourself, though). Is there a reason you don't want a hidden div you can fade in?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26482480
score: 6
upvote count: 6
accepted answer: http://stackoverflow.com/a/28800088
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44270905
type: Question
tagged with: ios
tagged with: javascript
has title: Cordova detect cold start from Push Notification
has body: I have a cordova app (codova (3.4.0) running on iOS and soon also on Android. Push notifications are implemented and working. I'm having troubles detecting when the app was started through a push notification and redirecting the application to the right page. Note: This doesn't concern starting the app from a push notification when the app is running in the background. Only when the app is completely closed! I now have the following workflow: Regular startup: Wait for cordova.js to fire the ondeviceready event. In the ondeviceready event redirect to the startup view of my app ( via window.location.hash) Cold app startup from push notification: Wait for cordova.js to fire the ondeviceready event. In the ondeviceready event redirect to the startup view of my app (via window.location.hash) Plugin kicks in and triggers a javascript function in my app called notificationreceived In notificationreceived function redirect to a view based on the push notification As you can see the cold app startup scenario going to the startup view, which is unnecessary and causes the user to wait for the first view to load, only to be redirected again. The problem is that when deviceready fires, my javascript code isn't aware of the coming push notification yet, so i'm looking for a way around this. Is there a way to maybe pass extra parameters to the deviceready cordova event? Or does anybody have another idea or solution to tackle this problem?
has answer: http://stackoverflow.com/a/28800088
answer count: 2
possible better answer: http://stackoverflow.com/a/27690922
tagged with: phonegap-pushplugin
tagged with: push-notification
has answer: http://stackoverflow.com/a/27690922
downvote count: 0
favorite count: 0
tagged with: cordova
has comment: http://stackoverflow.com/comment/45873949

http://stackoverflow.com/comment/41414082
score: 0
has text: `IDs` are unique, so if your selector is pointing to an element's `id`, it will return just one element. What's wrong with that?
comment on: http://stackoverflow.com/q/26379463
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41610944
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26488447
score: 2
has text: It means that you are sending requests again and again. It has nothing to do with `xmlHttp.abort();`. Status 200 means that request has successfully completed, at this point `abort()` makes no sense (and effect). You probably have some sort of interval that you are not clearing.

http://stackoverflow.com/q/26427146
upvote count: 0
has title: document.getElementsByTagName() returns wrong element
has body: I'm quite new to HTML, JavaScript and XML (in the context of the previous two) so have that in mind. I have the following XML document: <?xml version="1.0" encoding="UTF-8"?> Doe <firstname>John 5.0 2.3 2.0 1.0 5.0 3.0 ... ... I'll try to explain what the structure is as short as possible: The top element is "university" and it contains a single child "students". "students" on the other hand can contain multiple "student" elements, each with a unique student identification "sid" as attribute, "lastname" element, "firstname" element and an element "courses" which contains all courses (each represented by the "course" element" the student has attended. A "course" element has also a unique identification, which either represents a single course (example above: MB111,MB112) or a module (example above: MB100, MB110). Another element that "course" contains is the "grade" element, which can be two type - "simple" and "complex". Multiple attempts are available and each attempt is evaluated with a grade (example above: for MB100 we have two attempts). The simple grade is used for a module consisting of a single course (example above: MB100). The complex grade on the other hand is the arithmetic mean of all simple grades of each course a module consists of taking the highest grade of all attempts for a single course (example above: the MB110 has a grade = 2.0, which is the arithmetic mean of 1.0 and 3.0 for each of the courses it consists of with 3.0 being the attempts with a highest grade for the course MB112). That said I want to create an HTML page and generate a table using JavaScript with all students in it. Currently I'm trying to display the "sid" attribute of each "student" element plus his/her first and last name. My page source code looks as follows: My pretty page For some reason I get a very weird output: +--------------------------------------------------------------------------------------------------------------------------------------+ | null | 5.0 -----------…
has comment: http://stackoverflow.com/comment/41499209
has comment: http://stackoverflow.com/comment/41499506
type: Question
has comment: http://stackoverflow.com/comment/41499324
score: -1
has comment: http://stackoverflow.com/comment/41499424
has comment: http://stackoverflow.com/comment/41499316
tagged with: html-table
tagged with: getelementsbytagname
downvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/26427301
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41499494
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26427301
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion

http://stackoverflow.com/q/26411340
tagged with: javascript
upvote count: 3
answer count: 1
has title: Dynamically Updating Bootstrap Popover With AJAX results
tagged with: jquery
favorite count: 0
has body: I have read through many of the questions regarding using AJAX results to update Bootstrap popover content but can't seem to piece together a solution that will work for my situation. I apologize if I missed something. I have a series of input boxes in a form in a Modal dialog. When a certain text box (the #tool box) is filled out and another text box (the #chamber box) comes into focus I send an AJAX call to identify applicable values for the chamber and wish for them to show in the popover. Using the code below I am able to accomplish this, but only on the first try. After that, the content remains the same (i.e., is not replaced with the new chamber info). Note that I am also putting the AJAX results into autocomplete for the input and that changes to the new values every time, just the popover remains the same. The complexity of the app doesn't lend itself to a jFiddle, below are the applicable snipits HTML: Chamber Chamber in focus: $("#chamber").focus(function() { var parent = $('#tool').val(); if (parent != '') { $.ajax({ type: 'POST', url: 'getChamberDropdown.php', data: {parent: parent}, dataType: 'json', async: false, success: function (chamberResult) { var chamberHint; if(chamberResult.length > 0) { chamberHint = JSON.stringify(chamberResult); } else { chamberHint = "No chambers."; } $(function () { $('.chamberType').autocomplete({ source: chamberResult }); }); $('#chamberPopup').popover({ placement: "right", html: true, title: "Applicable Chambers", content: chamberHint }); } }); $('#chamberPopup').popover('show'); } }) Chamber out of focus: $("#chamber").focusout(function() { $('#chamberPopup').popover('hide'); }) Any advice or assistance would be appreciated.
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26411510
type: AnsweredQuestion
downvote count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26411510
type: Question
score: 3

http://stackoverflow.com/comment/41548038
score: 0
type: Comment
has text: Delegate the event listening to the `table`, check the `e.target` within a handler function, and if it is a button, do something.
type: QuestionComment
comment on: http://stackoverflow.com/q/26453612

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/26448919
type: Tag

http://stackoverflow.com/q/26357482
has answer: http://stackoverflow.com/a/26361809
has title: detecting mouseout event in IE8
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/41373561
type: Question
score: 3
has body: I've run into a small problem while detecting when user leaves the window in IE8. I am aware that addEventListener method is supported only in IE9+ versions so I came up with this solution: function popUp() { console.log("i'm leaving") } if (window.addEventListener) { window.addEventListener("mouseout", popUp); } else { window.attachEvent("mouseout", popUp); } It works properly in all major browsers, but still fails in IE8. I hoped that using jQuery will solve the problem: $(window).mouseout(function(){ popUp() }) but, due to this information, neither mouseover nor mouseout events work on the window in IE8. So the question is, how can I make it work in this quite obsolete, but unfortunately still popular browser? Any help would be really appreciated
tagged with: mouseout
has comment: http://stackoverflow.com/comment/41373939
favorite count: 0
linked to: http://stackoverflow.com/q/9769868
answer count: 2
tagged with: internet-explorer-8
upvote count: 3
has answer: http://stackoverflow.com/a/26357528
tagged with: mouseleave

http://stackoverflow.com/comment/41576477
comment on: http://stackoverflow.com/a/26468901
type: AnswerComment
has text: Thanks for answering so fast! If I understood correctly,I have to place the JavaScript on a separate file (e.g. lazy.js) and link it to the html file via " , right? Thanks again!
score: 0
type: Comment

http://stackoverflow.com/comment/41657289
type: QuestionComment
has text: @MikeWillis yes. it's already loading your page from the server, adding another 83 kb (for 2.1.1 minified) will not be a noticeable load on your server. I don't know a ton about how scripts are loaded via the `src` attribute, but the browser will have to make a separate request to retrieve it, instead of it being wrapped in one response from your server.
comment on: http://stackoverflow.com/q/26513574
score: 0
type: Comment

http://stackoverflow.com/comment/41380566
type: Comment
type: QuestionComment
has text: It seems like you're not passing a function as the second parameter to directive() as maybe you should. You're passing an array, like when you want Angular to inject stuff into your directive, but you do not inject anything. If nothing else, the array brackets are not necessary.
comment on: http://stackoverflow.com/q/26361263
score: 0

http://stackoverflow.com/a/26489342
answers question: http://stackoverflow.com/q/26462493
score: 0
type: AcceptedAnswer
has body: Its done I used ajax I am pasting the ajax code if any body needs help. &lt;script type="text/javascript"&gt; var message = "@ViewBag.success"; if(message == "success") { $("#hidden_div").text("Thank You! Your message has been recieved."); } $("#submit").submit(function () { var url = "ContactUsSurfaceController/Contact"; // the script where you handle the form input. $.ajax({ type: "POST", url: url, data: $("#submit").serialize(), // serializes the form's elements. success: function (message) { alert(message); // show response from the php script. } }); return false; // avoid to execute the actual submit of the form. }); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/26462493
type: Answer

http://stackoverflow.com/q/26487051
tagged with: unit-testing
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26487273
has title: How to test an Angular controller with a function that makes an AJAX call without mocking the AJAX call?
tagged with: karma-jasmine
has comment: http://stackoverflow.com/comment/41640394
linked to: http://stackoverflow.com/q/31975928
has body: I have a function in a controller that calls a service which in turn calls another service, which makes the AJAX call and returns the promise. To put it simply: MainController call = function(){ //Handle the promise here, update some configs and stuff someService.call().then(success, failure); } SomeService return { call: function(){ return SomeOtherService.call(); } } SomeOtherService return { call: function(){ return $http.get(someUrl); } } How do I test the main controller's call function without actually making the AJAX call? I will obviously be testing the services separately. Update: So I made the changes as per the answer below, and this is what I get: angular.module('myApp') .controller('LoginCtrl', ['$scope', '$location', 'AuthService', '$state', function ($scope, $location, AuthService, $state) { $scope.user = {}; $scope.login = function(user) { $scope.user = user; //This login function in turn calls the 'authenticate' from another service 'Ajax' and the promise is handled here. AuthService.login($scope.user) .then(function() { $scope.loginStatus = { message : 'Login successful', alertClass : 'success' }; $state.go('app.dashboard'); }, function() { $scope.loginStatus = { message : 'Unauthorized access.', alertClass : 'danger' }; }); }; $scope.closeAlert = function() { $scope.loginStatus = false; }; }]); PhantomJS 1.9.7 (Linux) Controller: LoginCtrl should call login FAILED TypeError: 'undefined' is not an object (evaluating 'AuthService.login($scope.user) .then') at /home/rutwickg/Projects/workspace/myProject/app/scripts/controllers/login.js:15 at /home/rutwickg/Projects/workspace/myProject/test/spec/controllers/login.js:34 at /home/rutwickg/Projects/workspace/myProject/node_modules/karma-jasmine/lib/boot.js:117 at /home/rutwickg/Projects/workspace/myProject/node_modules/karma-jasmine/lib/adapter.js:171 at http://localhost:8080/karma.js:189 at http://localhost:8080/context.html:145 This is how my current code looks like: 'use strict'; describe('Controller:…
answer count: 1
downvote count: 0
tagged with: jasmine
has comment: http://stackoverflow.com/comment/41638844
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26487273
upvote count: 3
has comment: http://stackoverflow.com/comment/41638869

http://stackoverflow.com/comment/41544178
score: 6
comment on: http://stackoverflow.com/q/26451440
has text: Simply adding that function to your code, if nothing calls it, absolutely will not cause a "too much recursion" error.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26379831
has answer: http://stackoverflow.com/a/26380002
tagged with: javascript
has comment: http://stackoverflow.com/comment/41414675
has comment: http://stackoverflow.com/comment/41414756
has answer: http://stackoverflow.com/a/26380146
upvote count: 1
tagged with: jquery
favorite count: 0
has body: Assume above is a list of users' post, and I want to identify type of post of them. To select the image or video type is easy, for example the video, just select like $('.wrapper .vid'). But there is a problem when I want to select plaintext type of post, because the class text also appear in vid and image type of post.
answer count: 5
has answer: http://stackoverflow.com/a/26379940
accepted answer: http://stackoverflow.com/a/26379897
type: AnsweredQuestion
has title: Having issue with DOM selection in jquery
has answer: http://stackoverflow.com/a/26379919
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26379897
type: Question
has comment: http://stackoverflow.com/comment/41414854
possible better answer: http://stackoverflow.com/a/26380002

http://stackoverflow.com/a/26429531
type: Answer
has comment: http://stackoverflow.com/comment/41504354
answers question: http://stackoverflow.com/q/26427356
score: 2
downvote count: 0
upvote count: 2
has body: You can add a flag to monitor if tree update is in progress: var fixTreeInProgress = false; module.exports = { identity: 'Role', attributes: { //.. }, afterCreate: function(rec, cb) { if (!fixTreeInProgress) { fixTree(); } cb(); }, afterUpdate: function(rec, cb) { if (!fixTreeInProgress) { fixTree(); } cb(); }, } function fixTree() { /* code here */ fixTreeInProgress = true; //passing callback to clear out flag when update is complete Role.update(criteria, updatedRecords, function fixTreeUpdateCallback() { fixTreeInProgress = false; }); // &lt;--- do not trigger afterUpdate /* and code here */ } But keep in mind: if data will be updated in another request while Role.update is in progress, it will make your data inconsistent: Consider such scenario: App receives data update request. Controller updates data, lifecycle callback is called fixTreeInProgress var is false, so we launch fixTree(), and set fixTreeInProgress to true App receives one more data update request. Controller updates data, lifecycle callback is called, fixTreeInProgress var is true, so we don't launch fixTree() Role.update() is finished, fixTreeInProgress set to false In this case we'll have tree updated with old version of data. You need to use some kind of task queue (and, optionally, some kind of debounce function) to handle such situations.

http://stackoverflow.com/q/26513343
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41669907
has comment: http://stackoverflow.com/comment/41657043
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: CreateObjectURL for local file system
favorite count: 0
has body: Why is there a "No Function was found" error? block head script. function convert_local_file() { var URL = window.URL || window.webkitURL , file = this.file; var value = window.webkitURL.createObjectURL("file:///home/sanika/NodeJS/Projects/project1/routes/../videosTrans/Node.js tutorial for beginners - an introduction to Node.js with Express2.js.mp4"); return value; } block content video(id="videolink" width="400" height="320" type="video/mp4" controls) script. document.getElementById('videolink').src = convert_local_file(); IMAGE:
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41656693
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41658019
type: Question
has comment: http://stackoverflow.com/comment/44682982
has answer: http://stackoverflow.com/a/49906729

http://stackoverflow.com/comment/41421059
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26382950
has text: @In Code Veritas, thanks for your precious time the thing what i am doing is that i have to create a new svg for a new div in ur link it suggest to update or remove previous svg. but in my case i want redraw same at other div.
score: 0

http://stackoverflow.com/comment/41453943
type: Comment
type: QuestionComment
score: 2
has text: if you don't want to wrap, you can't achieve it
comment on: http://stackoverflow.com/q/26402214

http://stackoverflow.com/a/26372977
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26372468
has body: To give the scroller div focus, you just need to give the scroller container (tablesorter-scroller-table) a tabindex. Try this code (demo): $(function () { $('table').tablesorter({ theme: 'blue', widthFixed: true, showProcessing: true, widgets: ["zebra", "filter", "scroller"], widgetOptions: { scroller_height: 200, scroller_upAfterSort: false, scroller_jumpToHeader: false }, sortList: [[1, 0],[2, 0]], initialized: function(){ // give scroller a tabindex to allow focusing $('.tablesorter-scroller-table').attr('tabindex', 1); } }); $(document).on('keydown', function(){ // keyboard pageup/down now always works in scroll window $('.tablesorter-scroller-table').focus(); }); });
has comment: http://stackoverflow.com/comment/41422476
has comment: http://stackoverflow.com/comment/41423296
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26372468

http://stackoverflow.com/q/26411867
has comment: http://stackoverflow.com/comment/41471821
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41471720
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26412040
accepted answer: http://stackoverflow.com/a/26412040
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Prevent Mysterious String-to-Number Conversion of Color Data
has comment: http://stackoverflow.com/comment/41471932
has body: HTML: &lt;form method="post" action=""&gt; &lt;select name="fancySelect" class="makeMeFancy"&gt; &lt;option value="0" selected="selected" data-skip="1"&gt;Email Color Scheme&lt;/option&gt; &lt;option value="81" data-color1="993300" data-color2="000000" data-html-text="Brown on Black"&gt;Brown on Black&lt;/option&gt; &lt;option value="77" data-color1="663366" data-color2="000000" data-html-text="Purple on Black"&gt;Purple on Black&lt;/option&gt; &lt;option value="129" data-color1="00ccff" data-color2="000000" data-html-text="Teal on Black"&gt;Teal on Black&lt;/option&gt; &lt;option value="75" data-color1="666666" data-color2="000000" data-html-text="Dark Gray on Black"&gt;Dark Gray on Black&lt;/option&gt; &lt;option value="85" data-color1="999999" data-color2="000000" data-html-text="Gray on Black"&gt;Gray on Black&lt;/option&gt; &lt;option value="81" data-color1="993300" data-color2="000000" data-html-text="Brown on Black"&gt;Brown on Black&lt;/option&gt; &lt;option value="77" data-color1="663366" data-color2="000000" data-html-text="Purple on Black"&gt;Purple on Black&lt;/option&gt; &lt;option value="129" data-color1="00ccff" data-color2="000000" data-html-text="Teal on Black"&gt;Teal on Black&lt;/option&gt; &lt;option value="75" data-color1="666666" data-color2="000000" data-html-text="Dark Gray on Black"&gt;Dark Gray on Black&lt;/option&gt; &lt;option value="85" data-color1="999999" data-color2="000000" data-html-text="Gray on Black"&gt;Gray on Black&lt;/option&gt; &lt;option value="81" data-color1="993300" data-color2="000000" data-html-text="Brown on Black"&gt;Brown on Black&lt;/option&gt; &lt;option value="77" data-color1="663366" data-color2="000000" data-html-text="Purple on Black"&gt;Purple on Black&lt;/option&gt; &lt;option value="129" data-color1="00ccff" data-color2="000000" data-html-text="Teal on Black"&gt;Teal on Black&lt;/option&gt; &lt;option value="75" data-color1="666666" data-color2="000000" data-html-text="Dark Gray on Black"&gt;Dark Gray on Bla…
has comment: http://stackoverflow.com/comment/41471716

http://stackoverflow.com/comment/41611670
comment on: http://stackoverflow.com/a/26476625
score: 0
type: Comment
type: AnswerComment
has text: I have two methods in my answer. Which one did you try?

http://stackoverflow.com/a/26364488
has comment: http://stackoverflow.com/comment/41427321
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26362675
answers question: http://stackoverflow.com/q/26362675
has body: var targetFolder = Folder.selectDialog("Select a folder"); if (targetFolder !== null) { var insideFolder = new Folder(targetFolder.fsName + "/myNewFolder"); insideFolder.create(); } See this question
score: 0

http://stackoverflow.com/a/26675680
score: 0
type: Answer
has body: I have the same problem. To solve it, I compared with an old version of "cordova.js" and removed lines 1187 to 1196 and 1316 to 1325. These lines are "else{}" portion of the function "replaceNavigator()". It works now for my app.
answers question: http://stackoverflow.com/q/26465832

http://stackoverflow.com/comment/41570168
has text: Ah ok; I now see an "error" in the response. Telling me ; Notice: Undefined variable: selected_image in images.php on line 126 No image selected I do use this variable there. But I have no idea why it's giving me this.
comment on: http://stackoverflow.com/q/26465712
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41982479
has text: @RustyToms I see, Thanks. Changed to "only if".
type: AnswerComment
comment on: http://stackoverflow.com/a/26577169
type: Comment
score: 1

http://stackoverflow.com/comment/41496842
score: 0
type: Comment
has text: @Sam, You could prefix/suffix a campaign variable to the request url in an advanced filter if you need one, but I don't get why you aren't just using a page goal with a regex, ie "login.*demo" would be my goal and I would normally just segment on the different sources.
type: AnswerComment
comment on: http://stackoverflow.com/a/26424568

http://stackoverflow.com/comment/41603601
comment on: http://stackoverflow.com/q/26484332
score: 0
has text: It's better to target specific elements, for example *this* div, or *that* table.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41596159
has text: Thank you. This would open the alert, and the closing would be automatic like you said. But there are 2 problems here: 1. The alert-danger or alert-success can't be applied. and 2. Once we close, the element will be removed from dom, and not appear again, if the user re-submits the form
type: Comment
comment on: http://stackoverflow.com/a/26474169
score: 0
type: AnswerComment

properties
tags question: http://stackoverflow.com/q/26461965
type: Tag
tag name: properties
tags question: http://stackoverflow.com/q/26416921
tags question: http://stackoverflow.com/q/26513323
tags question: http://stackoverflow.com/q/26422022
tags question: http://stackoverflow.com/q/26354345
tags question: http://stackoverflow.com/q/26428072
tags question: http://stackoverflow.com/q/26421417
tags question: http://stackoverflow.com/q/26474584

http://stackoverflow.com/a/26380999
has comment: http://stackoverflow.com/comment/41416967
accepted answer of: http://stackoverflow.com/q/26380980
answers question: http://stackoverflow.com/q/26380980
has comment: http://stackoverflow.com/comment/41417038
type: Answer
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/41417302
type: AcceptedAnswer
has body: You can use jquery attribute selector of the format attr("id") var id = $('#accordion .in').parent().attr("id");
downvote count: 0

http://stackoverflow.com/comment/41632374
score: 0
type: Comment
type: QuestionComment
has text: @Pierce McGeough , I had same issue, Check `My question` http://stackoverflow.com/questions/23323929/ck-editor-validates-2nd-time Or mail me `nutandevjoshi@gmail.com` . Thanks
comment on: http://stackoverflow.com/q/26485316

http://stackoverflow.com/comment/41398797
score: 0
type: Comment
type: QuestionComment
has text: @henser: Transition for the bottom or for the height. Press on the red area and it will expended.
comment on: http://stackoverflow.com/q/26370665

http://stackoverflow.com/q/26377583
type: Question
has comment: http://stackoverflow.com/comment/41410921
tagged with: javascript
has body: Suppose you have this for your HTML: I have some content that is good to read However you would like to add a span tag after a certain amount of characters, lets say 26 characters, which would be right after the word "that". The result would look like this: I have some content that is good to read It has to be after a certain amount of characters, because the paragraph will change from time to time.
has answer: http://stackoverflow.com/a/26377995
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26377995
favorite count: 0
has answer: http://stackoverflow.com/a/26377673
has title: Add a span tag inside p after certain amount of characters
has answer: http://stackoverflow.com/a/26377676
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26377673
answer count: 4
has answer: http://stackoverflow.com/a/26377672
type: AnsweredQuestion
upvote count: 2
score: 1
downvote count: 1

http://stackoverflow.com/q/26373347
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41403567
has title: HTML JavaScript Encoder and C# Decoder
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41403389
has comment: http://stackoverflow.com/comment/41403276
has answer: http://stackoverflow.com/a/26373518
accepted answer: http://stackoverflow.com/a/26373518
has comment: http://stackoverflow.com/comment/41403356
type: Question
tagged with: c#
tagged with: encoding
has body: I would like to implement HTML encoder in JavaScript like this. And implement the corresponding decoder like this. Any encoder/decoder would work. Those were just examples. My ultimate goal is to transfer HTML markup via a HiddenField and then use that transferred HTML on the destination. Without encoding/decoding, the page breaks. That's why I would like to encode in JavaScript and decode in C#.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41403326
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/26492248
type: Answer
has body: your postExecution approach might be the right one but you can't create a new DataTable over that div. It has already been created. If you inspect the this object during the postExecution execution, one of the fields (can't remember which) gives you access to your DataTable object (the var table on your example).
score: 0
answers question: http://stackoverflow.com/q/26469586

http://stackoverflow.com/q/26468268
has body: i have been trying to implement this code to make a sort of graph where the user clicks on the canvas to create a node and then can again click on any two nodes to have an edge drawn between them and also be able to enter a weight associated to that edge. i cant understand why the path function is not responding. probably there could be a syntax error in the statement pathE1.setAttribute("d", "M coord1 , coord2 L coord3 , coord4"); but then i cant figure out what would be the right way.here is my code: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;svg id="canvas" height="1260" width="1260"&gt; &lt;/svg&gt; &lt;script src="jquery-1.11.1.min.js"&gt; &lt;/script&gt; &lt;script&gt; var check; var circles = []; $(document).ready(function() { $("#canvas").bind("mousedown", function(e) { var coords = getCoords(e); var result = inCircle(coords.x, coords.y); if (typeof result === "number") { check = result + 1; } else { draw(coords.x, coords.y); } }); $("#canvas").bind("mouseup", function(e) { if (!check) { console.log('hey'); return; } var coords = getCoords(e); var result = inCircle(coords.x, coords.y); console.log(result); if (typeof result === "number") { //alert('node up'); drawConnection(check - 1, result); } check = 0; }); function getCoords(e) { var x = e.clientX; var y = e.clientY; //alert('x:' +x+ ' y:' +y); return { x: x, y: y }; } function inCircle(x, y) { for (var i = 0; i &lt; circles.length; i++) { if (distance(x, y, circles[i].x, circles[i].y) &lt;= 20) { return i; } } } function draw(x, y) { circles.push({ x: x, y: y }); var circle1 = document.createElementNS("http://www.w3.org/2000/svg", "circle"); circle1.setAttribute("cx", x); circle1.setAttribute("cy", y); circle1.setAttribute("r", 20); circle1.style.fill = 'blue'; circle1.style.stroke = 'blue'; circle1.style.strokeWidth = '5'; $('#canvas').append(circle1); } }); function distance(x, y, cx, cy) { return Math.sqrt((cx - x) * (cx - x) + (y - cy) * (y - cy)); } function drawConnection(circ1, circ2) { var dist = pr…
has answer: http://stackoverflow.com/a/26468404
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26468404
type: Question
has title: the path function of svg is not responding
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/comment/41498282
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26426601
score: 0
has text: above jQuery code is going to run after evrything - DOM loaded completely .

http://stackoverflow.com/q/26389338
has comment: http://stackoverflow.com/comment/41432789
favorite count: 0
has body: I have a div (.panel) that, when clicked, it expands, and when clicked again, it shrinks. Instead of clicking (.panel) How can i click an outside div (.open) in order to expand and shrink the original div (.panel) instead of using (.panel) as the trigger? I ask because I want to use an exterior icon as the trigger. http://jsfiddle.net/lycrest15/z2p0r5s9/ open Coffee Tea Milk var next_move = "expand"; $(document).ready(function () { $(".panel").click(function () { console.log(next_move); var css = {}; if (next_move == "expand") { css = { width: '210px', height: '170px' }; next_move = "shrink"; } else { css = { width: '30px', height: '20px' }; console.log('hi'); next_move = "expand"; } $(this).animate(css, 200); }); }); .panel { width: 30px; height: 21px; overflow: hidden; color:white; background-color: grey; } .panel ul { margin-left:10%; color:white; } .mores { width: 210px; height: 170px; overflow: hidden; } .open { width: 50px; hieght:50px; }
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26389474
answer count: 6
has answer: http://stackoverflow.com/a/26389474
has answer: http://stackoverflow.com/a/26389502
upvote count: 1
has answer: http://stackoverflow.com/a/26389442
has answer: http://stackoverflow.com/a/26389447
has answer: http://stackoverflow.com/a/26389619
has title: How can i use an outside div to toggle expand and shrink on another Div onClick?
has comment: http://stackoverflow.com/comment/41432125
has answer: http://stackoverflow.com/a/26389543
tagged with: slidetoggle
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26389442
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery

http://stackoverflow.com/a/26469225
answers question: http://stackoverflow.com/q/26469031
has body: This works. Need webkit for Chrome/Safair I believe. Pretty sure you can't animate from min-height either as min-height is not a height. CSS transitions only work from set value to set value. function init() { var d = document.getElementsByClassName('col')[0]; d.className = d.className + " col-animate"; } .col { width: 20px; height: 1px; transition: all 0.5s ease-out 0s; -webkit-transition: all 0.5s ease-out 0s; background-color: red; } .col-animate { height: 50px; } &lt;body onload="init()" &gt; &lt;div class="col" &gt;&lt;/div&gt; &lt;/body&gt;
accepted answer of: http://stackoverflow.com/q/26469031
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/41638106
has text: @AsadAliKanwal Loop is there in the code snippet given in the question. The issue was to check all/uncheck all functionality. Answer of which I have provided.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26503018
type: AnswerComment

http://stackoverflow.com/comment/41405510
comment on: http://stackoverflow.com/q/26374556
has text: @Phil So very true. If only all instructors lived in the real world, lol.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26473005
has body: Game.prototype.totalScore = function() { total = 0; for(i = 0; i &lt; this.scorecard.length; i++) { total +=this.scorecard[i].rollOne + this.scorecard[0].rollTwo; } return total; };
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26472853

http://stackoverflow.com/a/26509493
has body: Oh yeah, collectionViews don't have onShow methods. Trigger exactly. But collectionViews should have an onRender function that gets called after the children load. Try adding this line here this.listenTo(window.messagesView, "collection:rendered", self.scrollChat);
score: 0
answers question: http://stackoverflow.com/q/26507960
type: Answer
has comment: http://stackoverflow.com/comment/41649456
has comment: http://stackoverflow.com/comment/41649410

http://stackoverflow.com/comment/41524818
type: AnswerComment
has text: I don't know should they? We have no idea what those ids point to, what setting them to `""` might cause side effect wise or anything about "other code" that may or may not be correct. Learn to use `jsFiddle.net` if you want help.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26440601

http://stackoverflow.com/comment/41521817
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63277/discussion-between-user3138436-and-thefourtheye).
comment on: http://stackoverflow.com/a/26437407
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41512998
has text: you are looping JSON wrong, JSON is not an array so it doesnt have .length property. I´ll edit my post adding some code
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26433811

http://stackoverflow.com/a/26466489
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26438392
has body: here i have solve my issue.thank u guys. var getDocument = content.document; var composeDecrypt = $(getDocument).find('div[class^="ii gt"]'); var originalContent = composeDecrypt[0].children[0].innerHTML;

http://stackoverflow.com/q/26422243
has comment: http://stackoverflow.com/comment/41490140
tagged with: http://stackoverflow.com/tag/html
has body: In PHP I've got a button with: onclick="myFunction(&amp;value1, $value2, $value3)" JavaScript: function myFunction(atr1, atr2, atr3) { document.getElementById('form_input1').value = atr1; document.getElementById('form_input2').value = atr2; document.getElementById('form_input3').value = atr3; document.getElementById('popup_form').style.display = "block"; } But the values are not set. This works fine when I use function without attributes and set value: function myFunction() { document.getElementById('form_input1').value = "8"; document.getElementById('form_input2').value = "abc"; document.getElementById('form_input3').value = "56"; document.getElementById('popup_form').style.display = "block"; } How should I change my function to set form values from attributes given in php?
has comment: http://stackoverflow.com/comment/41490051
favorite count: 0
score: -1
type: Question
has comment: http://stackoverflow.com/comment/41491336
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/41490141
tagged with: forms
has comment: http://stackoverflow.com/comment/41490044
has comment: http://stackoverflow.com/comment/41490105
has answer: http://stackoverflow.com/a/26422340
downvote count: 1
tagged with: function
upvote count: 0
accepted answer: http://stackoverflow.com/a/26422340
tagged with: javascript
has title: Setting html form values using js function with multiple attributes
type: AnsweredQuestion

http://stackoverflow.com/comment/41588184
score: 0
comment on: http://stackoverflow.com/a/26474954
type: AnswerComment
type: Comment
has text: Which part be more specific, what did I said that offend you? Thanks god stackoverflow have many moderators so rise a flag for my comment.

http://stackoverflow.com/comment/41477260
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26414485
score: 2
has text: This has the smell of an [XY problem](http://meta.stackexchange.com/a/66378/241526). Why do you need to retry your tests? (Ok, there's a "requirement that demands" it but why the requirement?) Even the documentation for mocha-retry (which has quite a few typos by the way; doesn't inspire confidence) has a paragraph about how your tests should work consistently.

http://stackoverflow.com/comment/41609682
type: QuestionComment
score: 0
has text: Okay that could work but it has to change with the button click, not as the textfield value changes. I'll see if I can get that to work!
comment on: http://stackoverflow.com/q/26487530
type: Comment

http://stackoverflow.com/a/32207731
has body: Unfortunately, that's not quite how things work. beforeModel isn't simply called before model is set, and afterModel afterward. They are just hooks that are called in that sequence (beforeModel -&gt; model -&gt; afterModel) as part of the lifecycle of a route. Unfortunately, I haven't found a good way to unit tests Routes. If you have specific beforeModel logic that you need to test, then maybe you can just call beforeModel directly? I have found that Route logic is best tested through acceptance-style tests, since you then have the Route being invoked in the same way it will be when the application is actually running.
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26383590
score: 1

http://stackoverflow.com/q/26439217
has answer: http://stackoverflow.com/a/27199279
tagged with: google-maps-api-3
score: 0
answer count: 2
has title: Adding new places in google maps
tagged with: google-maps
tagged with: web
has answer: http://stackoverflow.com/a/26439286
type: UnansweredQuestion
type: Question
tagged with: javascript
has body: I am using Google javascript api Currently. I would like to add new places like add small villages in the map, these small village does not appear in google map even when I am highest zoom. I know villages Lat/Lang and would like to add them when someone zoom in map (placed in my website). I can use Marker to accomplish similar, But it is not same as having places by default appear on map. I tried searching stackoverflow and elsehere on net, But could not find any references. If someone can please sugggest on it

http://stackoverflow.com/a/26423773
has comment: http://stackoverflow.com/comment/41492762
type: Answer
has body: Basically what these articles are checking is that if there is no ajax call happening from client side to server side even after writing the ajax ( $.ajax) code then javascript is disabled . It is an indirect way of checking .
answers question: http://stackoverflow.com/q/26423567
has comment: http://stackoverflow.com/comment/41493108
score: 0

http://stackoverflow.com/q/26391427
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41437017
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41436311
tagged with: wordpress
type: Question
tagged with: javascript
tagged with: jquery
has body: In advance, JS isn't my strong suit. I have an external .js file containing the initializing info for Smoove.JS. This file is being used in a WordPress plugin. I inserted some PHP to allow for filtering the parameters passed into the jQuery. The original file (smoove-init.js) was renamed to smoove-init.php. Everything looks good when I view the page source but nothing is actually happening. However, the script worked fine before converting to PHP. I'd really appreciate some advice. Thanks! UPDATE: Big thanks to @brasofilo for his tip. For anyone interested, the final code I used to get this working is: /** * Outputs filtered selectors to the Smoove.js script. * * Assigns default values to $args and checks to see if they're being filtered. * Adds the default/filtered selectors to a JS variable and outputs to wp_head. * Applies the .smoove() to the variable. * * @param array $args Array of selectors to which .smoove() applies. * @param string $selectors The string value of the $args array separated by commas. */ add_action( 'wp_head', 'run_smoove', 0 ); function run_smoove() { $args = array( 'img' ); if ( has_filter( 'filter_smoove_args' ) ) { $args = apply_filters( 'filter_smoove_args', $args ); } $selectors = implode( ', ', $args ); ?&gt; &lt;script type="text/javascript"&gt; var my_smoove = '&lt;?php echo $selectors; ?&gt;'; &lt;/script&gt; &lt;?php } smoove-init.js jQuery(window).load(function () { jQuery( my_smoove ).smoove({ offset : '10%', moveX : '-200px', moveY : '0', }); });
has title: Using PHP in External jQuery Script
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26391739
accepted answer: http://stackoverflow.com/a/26391739
has comment: http://stackoverflow.com/comment/41436132
favorite count: 0
tagged with: php

http://stackoverflow.com/q/26364497
score: 1
type: Question
downvote count: 0
tagged with: javascript
has title: What is the purpose of classnames in angle brackets in definitions?
has answer: http://stackoverflow.com/a/26377626
has body: In another question here on Stack Overflow (this one) I have seen this piece of code: Ext.define("App.view.leaders.MyViewName", { extend: 'App.view.basePopup', xtype: 'MyViewName', config: &lt;Ext.form.IPanel&gt;{ scrollable: 'vertical', items: [ { xtype: 'fieldset', title: 'Add New Auto Asset', instructions: '&lt;hr class="separate" /&gt;', items: [ &lt;Ext.field.ISelect&gt;{ xtype: 'selectfield', label: 'Borrower Position', store: 'BorrowerPositionSelectorStore', }, &lt;Ext.field.ISelect&gt;{ xtype: 'selectfield', label: 'Asset Type', store: 'AssetTypeSelectorStore', }, { xtype: 'textfield', name: '', label: 'Description' }, { xtype: 'numberfield', name: '', label: 'Value' } ] } ] } }); What is the purpose of the &lt;Ext.form.IPanel&gt;, &lt;Ext.form.ISelect&gt; tags before the components definitions? Can you point me to any documentation on that?
tagged with: extjs
tagged with: sencha-touch-2
answer count: 1
favorite count: 0
tagged with: sencha-touch
accepted answer: http://stackoverflow.com/a/26377626
linked to: http://stackoverflow.com/q/26353155
upvote count: 1
tagged with: typescript
type: AnsweredQuestion

http://stackoverflow.com/comment/41468467
type: Comment
comment on: http://stackoverflow.com/a/26409875
score: 0
type: AnswerComment
has text: Excellent point, not sure how I wasn't aware of that function.

http://stackoverflow.com/a/26383948
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26383705
downvote count: 0
has body: Simply set its value, and the selected attribute will be automatically handled: $('div').find('select').val(XXX); A better way would be to work with DOM elements instead of raw HTML: var select = $(document.createElement('select')).append( new Option(1, 1), new Option(2, 2), new Option("third", 3) // first arg is the text, second is the value ); var selectedValue = "2"; // your variable select.val(selectedValue); $('div').empty().append(select); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div&gt;&lt;/div&gt;
type: Answer

http://stackoverflow.com/a/26394048
has body: Use a class for the duplicated element instead of an "id" value. The "id" value needs to be unique, and that clearly won't be the case if you're cloning the elements. &lt;div class="square" &gt;&lt;/div&gt; for the HTML and // Color-Slider $( "#red_slider, #green_slider, #blue_slider" ).slider( { orientation: "horizontal", range: "min", max: 255, slide: changeColor, change: changeColor }); // Slider Setup: Green $( "#red_slider" ).slider( "value", 0 ); $( "#green_slider" ).slider( "value", 255 ); $( "#blue_slider" ).slider( "value", 0 ); function changeColor() { red_slider = $( "#red_slider" ).slider( "value" ), green_slider = $( "#green_slider" ).slider( "value" ), blue_slider = $( "#blue_slider" ).slider( "value" ); // CSS Manipulation $(".square").css("background-color", "rgba(" + red_slider + "," + green_slider + "," + blue_slider + ")"); } // dublicate squares var square = $('.square'); for(var i = 1; i &lt;= 2; i++) { square.clone().insertAfter(square); } for the JavaScript and .square { width: 100px; height: 100px; background-color: rgb(255, 0, 0); /*red*/ margin: 10px; float: left; } for the CSS. Forked fixed fiddle.
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41451085
answers question: http://stackoverflow.com/q/26393980
downvote count: 0

http://stackoverflow.com/a/26436682
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26436670
upvote count: 3
type: Answer
has body: From jQuery .on()'s documentation: Deprecated in jQuery 1.8, removed in 1.9: The name "hover" used as a shorthand for the string "mouseenter mouseleave". It attaches a single event handler for those two events, and the handler must examine event.type to determine whether the event is mouseenter or mouseleave. Do not confuse the "hover" pseudo-event-name with the .hover() method, which accepts one or two functions. You could pass an object to the on method: $("#x").on({ mouseenter: function() { // ... }, mouseleave: function() { // ... } }); And if you want to delegate the events: $('#aStaticParentOfX').on({ mouseenter: function() { // ... }, mouseleave: function() { // ... } }, "#x");

http://stackoverflow.com/a/26383523
has comment: http://stackoverflow.com/comment/41423875
answers question: http://stackoverflow.com/q/26383256
score: 2
has body: See http://jsfiddle.net/DLLVw/483/ When you pass dynamicVar to the autocomplete, it uses the value of dynamicVar at the time when you called autoComplete. So it's always false, ragardless of the state, since dynamicVar doesn't change when you change the check box. If you want to pass dynamic values you need to use: $('#x').autocomplete({ //source:'myURL.php?supplier='+dynamicVar source: function(request, response) { $.ajax({ url: "myURL.php", data: { term : request.term, supplier : $('#y').is(':checked') } }); } });
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26383256
has comment: http://stackoverflow.com/comment/41424580
has comment: http://stackoverflow.com/comment/41424040
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41424823
type: Answer

http://stackoverflow.com/comment/41653738
type: AnswerComment
has text: Thanks friend, I regret posting here for mistakes like these. Now I feel like an idiot.
type: Comment
comment on: http://stackoverflow.com/a/26511660
score: 0

http://stackoverflow.com/q/26422036
has body: I would like to cache data from remote database locally to use it in my javascript application. I do not need any excesses such as SQL requests to local data, so I decide just to store database records in array of objects in the following way: &lt;script type="text/javascript"&gt; var json0 = '{"1" : {"fname": "fname1", "sname": "sname1"}, "2" : {"fname": "fname2", "sname": "sname2"}}'; var json1 = '{"2" : {"data": "11/05/2014", "time": "11:30:18", "person": "data0[1]"}, "6" : {"data": "24/06/2014", "time": "16:11:05", "person": "data0[2]"}, "8" : {"data": "11/10/2014", "time": "12:15:27", "person": "data0[1]"}}'; var data0 = JSON.parse(json0); var data1 = JSON.parse(json1, function (k, v) { try { return eval(v); } catch (e) { return v; } }); console.log(data1); &lt;/script&gt; The question is about the memory usage. If the objects in array data1 will store the reference to the objects from data0 in the property "person" or they will store the copy of these objects?
score: 0
has title: Using json to store remote database locally
has comment: http://stackoverflow.com/comment/41489815
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26422408
accepted answer: http://stackoverflow.com/a/26422408
linked to: http://stackoverflow.com/q/86513
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/26445378
has comment: http://stackoverflow.com/comment/41534663
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41533630
has comment: http://stackoverflow.com/comment/41534680
has comment: http://stackoverflow.com/comment/41534092
has comment: http://stackoverflow.com/comment/41534116
answers question: http://stackoverflow.com/q/26445344
type: Answer
has comment: http://stackoverflow.com/comment/41534619
accepted answer of: http://stackoverflow.com/q/26445344
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41534031
has comment: http://stackoverflow.com/comment/41534727
has comment: http://stackoverflow.com/comment/41534809
has comment: http://stackoverflow.com/comment/41533865
has comment: http://stackoverflow.com/comment/41534024
has body: Hide the image to begin with; style="display:none; or a css class with this rule is fine. Then wait for DOM and all graphics (images) to load, then show the image: HTML &lt;div id="playbutton"&gt; &lt;img style="width: 200px; height: 200px; border: 0;display:none;" src="http://iconshots.com/wp-content/uploads/2010/01/final1.jpg"&gt; &lt;/div&gt; JS $(window).load(function() { $('#playbutton img').show(); });
has comment: http://stackoverflow.com/comment/41534691
upvote count: 2

http://stackoverflow.com/comment/41576497
comment on: http://stackoverflow.com/a/26469192
type: AnswerComment
has text: Thanks for your reply.I tried this but it is not working. cat_id is not changing.It is still receiving null value. If cat_id is changed then only change function will get triggered.I don't know how to do this......
type: Comment
score: 0

http://stackoverflow.com/q/26433358
tagged with: php
score: 0
answer count: 3
tagged with: mysql
has comment: http://stackoverflow.com/comment/41511443
has answer: http://stackoverflow.com/a/26433412
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26433419
tagged with: email
has answer: http://stackoverflow.com/a/26433537
type: Question
has title: PHP sending selected variables in a email to user
has body: I would like to send the selected objects to a email address. here is a demo: http://jsfiddle.net/62g3s8sz/ I know a email can be send with PHP and i have tried many ways but all unsuccessful. The email needs to correspond with the items selected. So if Cooler Master K-380 is selected with AMD FM2 A6-6400K Dual Core 3,9GHz i need it to list these items Case : Cooler Master K-380 : price Processor: AMD FM2 A6-6400K Dual Core 3,9GHz : price And then send it to the email address that the person is logged in with. i know that $loggedInUser->email will display the email address. If anyone knows how to send all this information within a email to the logged in person that would be great. HTML: &lt;script type="text/javascript" src="js/formcalc.js"&gt;&lt;/script&gt; &lt;form method="POST" name="contactform" action="contact-form.php" id="computerform"&gt; &lt;div&gt; &lt;div class="cont_order"&gt; &lt;fieldset&gt; &lt;legend&gt;&lt;/legend&gt; &lt;label&gt;Case&lt;/label&gt; &lt;br&gt; &lt;label class='radiolabel'&gt; &lt;input checked="checked" type="radio" name="selectedcase" value="2001" onclick="calculateTotal()" /&gt;Cooler Master K-350 - ($10)&lt;/label&gt; &lt;br/&gt; &lt;label class='radiolabel'&gt; &lt;input type="radio" name="selectedcase" value="2002" onclick="calculateTotal()" /&gt;Cooler Master K-380 - ($20)&lt;/label&gt; &lt;br/&gt; &lt;br/&gt; &lt;label&gt;Processor&lt;/label&gt; &lt;br&gt; &lt;label class='radiolabel'&gt; &lt;input checked="checked" type="radio" name="selectedprocessor" value="3001" onclick="calculateTotal()" /&gt;AMD FM2 A4-5300 Dual Core 3,4GHz - ($10)&lt;/label&gt; &lt;br/&gt; &lt;label class='radiolabel'&gt; &lt;input type="radio" name="selectedprocessor" value="3002" onclick="calculateTotal()" /&gt;AMD FM2 A6-6400K Dual Core 3,9GHz - ($20)&lt;/label&gt; &lt;br/&gt; &lt;br/&gt; &lt;label&gt;Totale price&lt;/label&gt; &lt;div class="total"&gt; &lt;div id="case"&gt;&lt;/div&gt; &lt;div id="totalPrice"&gt;&lt;/div&gt; &lt;/div&gt; &lt;br&gt…
has comment: http://stackoverflow.com/comment/41531498

http://stackoverflow.com/q/26450471
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26450513
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: jquery split html in several .append
has body: Iam doing some tests with jquery and jQWidgets and tabs. I will create the html-structure for the tabs with jquery .append in loops, but i got error message about structur in jQwidget. And the problem was how i was appending the html. This example it just to simulate whats happening in my loops. If i add the html like this $('#jqxTabs').append(' test testar '); Then its working, but if i add the html in several steps then i got error from jQwidget $('#jqxTabs').append(' '); $('#jqxTabs').append(' test testar '); $('#jqxTabs').append(' '); $('#jqxTabs').append(' '); Maybe this is some basic jquery limitation?
accepted answer: http://stackoverflow.com/a/26450513

http://stackoverflow.com/a/26585678
has body: Yes you can trick a a webpage to download on your locals by Java code. You can not Download HTMl Static content by Java Script. JavaScript is not providing you to create a files as Java Provides. import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; public class HttpDownloadUtility { private static final int BUFFER_SIZE = 4096; /** * Downloads a file from a URL * @param fileURL HTTP URL of the file to be downloaded * @param saveDir path of the directory to save the file * @throws IOException */ public static void downloadFile(String fileURL, String saveDir) throws IOException { URL url = new URL(fileURL); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); int responseCode = httpConn.getResponseCode(); // always check HTTP response code first if (responseCode == HttpURLConnection.HTTP_OK) { String fileName = ""; String disposition = httpConn.getHeaderField("Content-Disposition"); String contentType = httpConn.getContentType(); int contentLength = httpConn.getContentLength(); if (disposition != null) { // extracts file name from header field int index = disposition.indexOf("filename="); if (index &gt; 0) { fileName = disposition.substring(index + 10, disposition.length() - 1); } } else { // extracts file name from URL fileName = fileURL.substring(fileURL.lastIndexOf("/") + 1, fileURL.length()); } System.out.println("Content-Type = " + contentType); System.out.println("Content-Disposition = " + disposition); System.out.println("Content-Length = " + contentLength); System.out.println("fileName = " + fileName); // opens input stream from the HTTP connection InputStream inputStream = httpConn.getInputStream(); String saveFilePath = saveDir + File.separator + fileName; // opens an output stream to save into file FileOutputStream outputStream = new FileOutputStream(saveFilePath); int bytesRead = -1; byte[] buffer = new byte[BUFFER_SIZE]; while …
has comment: http://stackoverflow.com/comment/41807841
type: Answer
accepted answer of: http://stackoverflow.com/q/26454916
upvote count: 2
has comment: http://stackoverflow.com/comment/41791393
score: 2
has comment: http://stackoverflow.com/comment/41787010
has comment: http://stackoverflow.com/comment/41815588
answers question: http://stackoverflow.com/q/26454916
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41483210
type: AnswerComment
comment on: http://stackoverflow.com/a/26404278
score: 0
type: Comment
has text: Thanks carsten, I want all country name should appear in the hindi language.

http://stackoverflow.com/a/26476524
score: 0
type: Answer
has body: You could likewise give each of the other containers an ID like "footer" and "navbar", and utilize the same code you did above. var dashboard_body = document.getElementById('body'); var dashboard_navbar = document.getElementById('navbar'); var dashboard_footer = document.getElementById('footer'); The above is pretty repetitive though, but should get you what you need. You could save those objects into an array and later loop through the array, which will save you a few lines of code. For the sake of completeness (and personal preference) I will say that this is much easier accomplished in jQuery if you're not opposed to using it. If so, it would be as easy as: if (this.checked) { $(".your-class-name").addClass("navigating"); } else { $(".your-class-name").removeClass("navigating"); } In the above jQuery example, your-class-name would be replaced by a CSS class name that you could apply to elements which would be affected by the navigation class. Remember that you can use multiple class names separated by spaces (which you may already know), like: class="my-class cool-class navigating"
answers question: http://stackoverflow.com/q/26476422
has comment: http://stackoverflow.com/comment/41590471

http://stackoverflow.com/q/26512449
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have a little question. Does localStorage get wiped off once the user clears the bowser history? If yes, then is there a way that I can save a URL as a string on the mobile device somewhere which always stays there even if the user or any other application forces the browser history to be cleared. And I can go get that string(URL) whenever I need it for my mobile app. The thing is I want to save URL of a restful service which fetches updates to the mobile client. I want that whenever a user launches my mobile app for the first time only he should manually key-in that URL (that will be provided by me) to get the updates and then some how I use some JavaScript API to save that URL on mobile device(which user is never ever able to delete even if the browser history is deleted anyway)so that on every subsequent launch the user needs not to key-in that URL again for the updates and if the updates exit mobile app should automatically be able to get that saved URL and contact the service to fetch the updates. Thanks.
upvote count: 2
type: UnansweredQuestion
tagged with: local-storage
downvote count: 1
has title: Does localStorage in Javascript get wiped off after clearing browser history
has comment: http://stackoverflow.com/comment/41655044
has answer: http://stackoverflow.com/a/26512635
has comment: http://stackoverflow.com/comment/41655109
score: 1
type: Question
tagged with: mobile
answer count: 1

algorithm
tags question: http://stackoverflow.com/q/26492356
tags question: http://stackoverflow.com/q/26355705
tag name: algorithm
tags question: http://stackoverflow.com/q/26430584
tags question: http://stackoverflow.com/q/26397876
tags question: http://stackoverflow.com/q/26406405
tags question: http://stackoverflow.com/q/26374093
tags question: http://stackoverflow.com/q/26446072
tags question: http://stackoverflow.com/q/26506429
type: Tag
tags question: http://stackoverflow.com/q/26502895
tags question: http://stackoverflow.com/q/26382711
tags question: http://stackoverflow.com/q/26371817
tags question: http://stackoverflow.com/q/26460884

http://stackoverflow.com/q/26444027
tagged with: live-sdk
answer count: 1
tagged with: asp.net-web-api
tagged with: javascript
has title: Getting Live SDK Access Token from Web API Controller
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26444174
tagged with: oauth
type: Question
tagged with: asp.net-mvc
accepted answer: http://stackoverflow.com/a/26444174
has body: I have the following method in the back end, and I want to get the access id for user who logged in via live sdk: public class AccountController : ApiController { [HttpGet] [Route("Account/Authenticate/LiveUser")] public void AuthenticateLiveUser() { //TODO: Inspect the request query to get the access token } } On the front end I have the following code: &lt;script type="text/javascript"&gt; WL.init({ client_id: '00000000XXXXXXXX', redirect_uri: 'http://XXXXXXXXXXXXX.us/Account/Authenticate/LiveUser', scope: 'wl.signin', response_type: 'token' }); WL.ui({ name: "signin", element: "signin" }); &lt;/script&gt; I was able to open the live sign on page, signed in and the live server responded with the following message (as seen from fiddler): HTTP/1.1 302 Found Cache-Control: no-cache Pragma: no-cache Content-Length: 0 Content-Type: text/html; charset=utf-8 Expires: Sat, 18 Oct 2014 19:52:24 GMT Location: http://XXXXXXXXXXXXX.us/Account/Authenticate/LiveUser#access_token=&lt;&lt;ACCESS_TOKEN&gt;&gt;&amp;token_type=bearer&amp;expires_in=3600&amp;scope=wl.signin%20wl.basic%20wl.emails&amp;state=redirect_type%3dauth%26display%3dpage%26request_ts%3d1413662001911%26response_method%3durl%26secure_cookie%3dfalse&amp;user_id=&lt;&lt;USER_ID&gt;&gt; Server: Microsoft-IIS/7.5 P3P: CP="DSP CUR OTPi IND OTRi ONL FIN" NOTE: The redirect above forwards the user to the correct address, and it includes the access token and user id, censored in the above code. However the request that goes to my server is as follow, note the absence of Access Token and User Id GET http://XXXXXXXXXXXXX.us/Account/Authenticate/LiveUser HTTP/1.1 Accept: text/html, application/xhtml+xml, */* Accept-Language: en-US,en;q=0.8,ja;q=0.6,zh-Hant-HK;q=0.4,zh-Hant;q=0.2 User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0) Accept-Encoding: gzip, deflate Host: nsyncservices.us DNT: 1 Connection: Keep-Alive Going back full circle, I am debugging my AuthenticateLiveUser service handler, but ther…
score: 0

http://stackoverflow.com/comment/41414439
type: Comment
type: QuestionComment
has text: How is `getLink` connected to to `inputs`?
score: 1
comment on: http://stackoverflow.com/q/26379660

width
tags question: http://stackoverflow.com/q/26443865
tags question: http://stackoverflow.com/q/26478369
tag name: width
type: Tag
tags question: http://stackoverflow.com/q/26392165
tags question: http://stackoverflow.com/q/26424869
tags question: http://stackoverflow.com/q/26430188

http://stackoverflow.com/a/26459647
has body: http://codepen.io/anon/pen/JmLsB $(function () { $(".inline-dropdown-menu").click(function (e) { $(".inline-dropdown-menu-list").hide(); // to hide other drop down $(this).find(".inline-dropdown-menu-list:first").toggle(); e.preventDefault(); // Stop navigation }); }); // to hide drop down if you click other than inline-dropdown-menu class $(document).click(function (e) { var container = $(".inline-dropdown-menu"); if (!container.is(e.target) &amp;&amp; container.has(e.target).length === 0) { $(".inline-dropdown-menu-list").hide(); } });
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/26459226
downvote count: 0
type: AcceptedAnswer
score: 4
accepted answer of: http://stackoverflow.com/q/26459226

http://stackoverflow.com/a/26439304
answers question: http://stackoverflow.com/q/26439227
has body: if what you want is to dynamically specify you're url: 'notif_accept.php' for the AJAX call, add a method to Notification's prototype: Notification.prototype.bind_click = function (url) { this.onclick = function() { $.ajax({ url: url, type: 'GET', data: 'id=' + alert_name, success: function(output) { alert('success, server says '+output); }, error: function() { alert('something went wrong'); } }); } } n = new Notification("Alert!",{ icon: "alert.png", body: variable }); n.bind_click('notif_accept.php');
score: 1
accepted answer of: http://stackoverflow.com/q/26439227
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41466396
score: 0
type: Comment
has text: The second option does sound a lot better, however i want to send it to three random users(i left this out to keep it simple) so if i used the beforeSave function in regards to this would i need to assign the original message to one random recipient and then duplicate two more copies of the message for the other two recipients? thanks
type: AnswerComment
comment on: http://stackoverflow.com/a/26405174

http://stackoverflow.com/q/26481600
has answer: http://stackoverflow.com/a/26481687
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26481713
has answer: http://stackoverflow.com/a/26481951
score: 0
has comment: http://stackoverflow.com/comment/41599083
possible better answer: http://stackoverflow.com/a/26481713
has answer: http://stackoverflow.com/a/26481631
has comment: http://stackoverflow.com/comment/41599076
has title: on ng-click parameter not passed correctly
tagged with: angularjs
has body: I am passing a binded parameter to a function on ng-click like this: Un-follow This is causing the error below: Error: [$parse:syntax] Syntax Error: Token 'follwing.ID' is unexpected, expecting [:] at column 12 of the expression [unfollow({{follwing.ID}})] starting at [follwing.ID}})]. http://errors.angularjs.org/1.2.10/$parse/syntax?p0=follwing.ID&p1=is%20unexpected%2C%20expecting%20%5B%3A%5D&p2=12&p3=unfollow(%7B%7Bfollwing.ID%7D%7D)&p4=follwing.ID%7D%7D) at http://localhost/mb-www2015/js/angular.v1.2.10.js:78:12 at Parser.throwError (http://localhost/mb-www2015/js/angular.v1.2.10.js:9884:11) at Parser.consume (http://localhost/mb-www2015/js/angular.v1.2.10.js:9921:12) And when I add single quotations around {{follwing.ID}} like: Un-follow It passes the string {{follwing.ID}} as is, instead of its value. Also need to change text and the calling function from unfollow to follow. How can I access the anchor tag clicked, from unfollow function ? Thanks for any help.
has comment: http://stackoverflow.com/comment/41598992
answer count: 4
type: AnsweredQuestion
tagged with: angularjs-ng-click
has comment: http://stackoverflow.com/comment/41598964
has comment: http://stackoverflow.com/comment/41598898
accepted answer: http://stackoverflow.com/a/26481631

http://stackoverflow.com/a/26439714
answers question: http://stackoverflow.com/q/26439658
type: Answer
has comment: http://stackoverflow.com/comment/41523107
score: 0
has body: The second set of parentheses consumes that part of the string for the regex. What that means is that the remaining string e*2 does not match because that e is not preceded by the non-alphanumeric character. You can use a lookahead instead which does not consume. "2*e*e*2".replace(/([^a-zA-Z])e(?=[^a-zA-Z])/g, "$12.718281828459045")

http://stackoverflow.com/comment/41453664
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26400570
has text: Can you provide a simple live example, such as a jsfiddle?
score: 0

http://stackoverflow.com/comment/41431222
comment on: http://stackoverflow.com/a/26374503
type: AnswerComment
score: 0
type: Comment
has text: Fair enough, I should search more. Thanks @MarcRochkind

http://stackoverflow.com/q/26386847
score: 1
has comment: http://stackoverflow.com/comment/41427616
type: Question
has title: Node.js: relationship of events.EventEmitter.call(this) and Obj.prototype.__proto__ = events.EventEmitter.prototype;
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26386909
linked to: http://stackoverflow.com/q/20201017
has comment: http://stackoverflow.com/comment/41427608
has body: I'm learning Node.js and have some confusion about customized EventEmitter. Here's the code: var events = require("events"); function MyEmitter (name){ this.name = name; // events.EventEmitter.call(this); this.emitEvent = function(){ this.emit("Event1"); } } //MyEmitter.prototype.__proto__ = events.EventEmitter.prototype; MyEmitter.prototype = events.EventEmitter.prototype; function foo(){ console.log("callback: " + this.name); } var obj = new MyEmitter("MyEmitter"); obj.on("Event1", foo); obj.emitEvent(); There's two similar lines to inherit from EventEmitter; //MyEmitter.prototype.__proto__ = events.EventEmitter.prototype; MyEmitter.prototype = events.EventEmitter.prototype; It seems both of these two expressions will work. And I saw "The proto property is deprecated" from here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto Besides, if I comment out the // events.EventEmitter.call(this); The code will also work. I heard that call() is used as a constructor of EventEmitter, //MyEmitter.prototype.__proto__ = events.EventEmitter.prototype; and this line is used to copy all of the EventEmitter properties to the Door object. So why do we have to copy the properties twice? Could anyone tell me what's the difference between these expression?
tagged with: function-prototypes
linked to: http://stackoverflow.com/q/10393869
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41427732
tagged with: node.js

http://stackoverflow.com/comment/41414079
has text: Also, if I may: Is it advisable to create an object with `new` call to a function constructor or use an ordinary function which returns an object {}-structure as in your second example?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26374805

http://stackoverflow.com/q/26465212
has comment: http://stackoverflow.com/comment/41568406
type: UnansweredQuestion
answer count: 0
downvote count: 0
score: 1
type: Question
has title: chart n d3js without posting data on google analytics server
has body: I want to create some interactive charts for one of my web application using d3.js but on analyzing found that the d3.js puts data on google analytics server and I want to know that how we can stop the data being flown to third party server like Google and still implement the chart.
tagged with: javascript
upvote count: 1
favorite count: 0

http://stackoverflow.com/comment/41406773
type: Comment
type: QuestionComment
score: 1
has text: can you show the file to be loaded? are there options with tags?
comment on: http://stackoverflow.com/q/26375319

http://stackoverflow.com/comment/41564500
has text: thanks for the clarification. I'm just getting started with JS and will look into promises shortly.
type: AnswerComment
comment on: http://stackoverflow.com/a/26460626
score: 0
type: Comment

http://stackoverflow.com/a/58285360
has body: I had a similar issue but had not specified the "region" (aka country code) and had sent over a 'destination' which was a place in the US, as well as a set of long/lat coords. Adding the expected country fixed the issue.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26453387

http://stackoverflow.com/a/26432317
downvote count: 0
answers question: http://stackoverflow.com/q/26428855
has body: Here is the animation with the correct easing and using only css (better performances). @-webkit-keyframes loader { 0% { left: 0%; } 100% { left: 100%; } } @keyframes loader { 0% { left: 0%; } 100% { left: 100%; } } .holder { position:relative; width:400px; height: 10px; } .cube { position: absolute; width: 10px; height: 10px; left: 0; background-color: #48a548; -webkit-animation: loader 3s cubic-bezier(0.030, 0.615, 0.995, 0.415) infinite; animation: loader 3s cubic-bezier(0.030, 0.615, 0.995, 0.415) infinite; } .cube:nth-of-type(1) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; } .cube:nth-of-type(2) { -webkit-animation-delay: 0.40s; animation-delay: 0.40s; } .cube:nth-of-type(3) { -webkit-animation-delay: 0.6s; animation-delay: 0.6s; } .cube:nth-of-type(4) { -webkit-animation-delay: 0.8s; animation-delay: 0.8s; } .cube:nth-of-type(5) { -webkit-animation-delay: 1.0s; animation-delay: 1.0s; }
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26428855
score: 2
type: AcceptedAnswer

http://stackoverflow.com/q/26471807
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion
tagged with: css
has title: Writing XML file with HTML
has comment: http://stackoverflow.com/comment/41588330
type: Question
has answer: http://stackoverflow.com/a/26472930
has comment: http://stackoverflow.com/comment/41581170
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41581279
score: 0
has comment: http://stackoverflow.com/comment/41582051
has body: I am trying to use a XML file, and write out the information on my website using HTML. This if for a school project, and the teacher spesifically told us to use XML and HTML. My HTML already contains code, pictures, text etc, and this works perfectly. So i tried to put the XML code inside a tag, and write it out. The XML file is just a table with some information about my favourite basketballball players. I have searched through the internet for a couple of days now, and I couldnt find any information about this topic. I visited the W3Schools site and I tried using the information given there. The problem is when I use what they have done there, try to expand it, and make it work with my own tags, it wont work, at all! For example, when i have two tags in the XML file, and try to write that out, it works. Then i try to add just one more tag, and the whole thing just shuts down. The only that appears is a little black square. Here is my XML code: <?xml version="1.0" encoding="UTF-8"?> Steve Nash Santa Clara La Lakers Ricky Rubio Did not attend Minnesota Timberwolves Michael Jordan North Carolina Chicago Bulls And here is my HTML code, with just the XML stuff:
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/41557911
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26459059
score: 0
has text: @ScaryWombat Many obvious reasons. Main one being scrapers that just iterate over parm and grab all data on the site without loading any pages

http://stackoverflow.com/q/26481820
answer count: 2
has comment: http://stackoverflow.com/comment/41599286
tagged with: validation
tagged with: javascript
tagged with: jquery
has title: Customizing a password strength validator plugin
possible better answer: http://stackoverflow.com/a/26482156
tagged with: jquery-plugins
score: 0
has comment: http://stackoverflow.com/comment/41599942
has answer: http://stackoverflow.com/a/26482538
has comment: http://stackoverflow.com/comment/41599383
has comment: http://stackoverflow.com/comment/41599486
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26482538
has body: I am using a plugin called pStrength.jquery.js and for some reason its not submitting the form I have, or it is submitting the form even if it is not supposed to (when I changed the code) The code i am using is: $(document).ready(function () { $('#myForm').submit(function () { return false; }); $('#myElement1, #myElement2').pStrength({ 'changeBackground': false, 'onPasswordStrengthChanged': function (passwordStrength, strengthPercentage) { if ($(this).val()) { $.fn.pStrength('changeBackground', this, passwordStrength); } else { $.fn.pStrength('resetStyle', this); } $('#' + $(this).data('display')).html('Your password strength is ' + strengthPercentage + '%'); }, 'onValidatePassword': function (strengthPercentage) { $('#' + $(this).data('display')).html( $('#' + $(this).data('display')).html() + ' Great, now you can continue to change your password!'); $('#myForm').submit(function () { return true; }); } }); }); Someone has told me that I should use booleans and inside the validation checks, set it to true or false. The problem is that i have no idea how to do this Is there anyone that could help me and show me the code to do this? Thank you in advance
type: Question
has answer: http://stackoverflow.com/a/26482156
has comment: http://stackoverflow.com/comment/41600004

file
type: Tag
tag name: file
tags question: http://stackoverflow.com/q/26502455
tags question: http://stackoverflow.com/q/26457316
tags question: http://stackoverflow.com/q/26479917
tags question: http://stackoverflow.com/q/26437189
tags question: http://stackoverflow.com/q/26386520
tags question: http://stackoverflow.com/q/26396468
tags question: http://stackoverflow.com/q/26386354
tags question: http://stackoverflow.com/q/26385758
tags question: http://stackoverflow.com/q/26418547

http://stackoverflow.com/comment/41602494
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26481617
type: AnswerComment
has text: Your Lucky Numbers are:

http://stackoverflow.com/a/26411532
score: -1
accepted answer of: http://stackoverflow.com/q/26411248
answers question: http://stackoverflow.com/q/26411248
type: AcceptedAnswer
type: Answer
downvote count: 1
upvote count: 0
has body: okay so thanks to @TSV who pointed out i was using "data-roll" not "data-role" that actually fixed my problem completely :)

http://stackoverflow.com/a/26446731
has body: First thing to understand about comparing objects is that two objects with identical keys and values are not equal because they are not the same object. var x = {foo: 'bar'}; var y = {foo: 'bar'}; console.log(x === y); // false Keep this in mind when you are trying to compare two arrays of objects. With that said, a Firebase array is just like a regular Javascript array except for some utility methods like $add, $remove, $save. If you wanted to get create a copy of the firebase array without the utility methods, you could use something like the following. var regularArray = []; for (var i = 0; i &lt; firebaseArray.length; i++) { regularArray.push(firebaseArray[i]); } However, this doesn't doesn't really get you much closer to computing the difference of two arrays. The following might help though. An efficient way to get the difference between two arrays of objects?
has comment: http://stackoverflow.com/comment/41536757
score: 3
has comment: http://stackoverflow.com/comment/41549267
accepted answer of: http://stackoverflow.com/q/26446347
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26446347
upvote count: 3
type: Answer

http://stackoverflow.com/q/26502266
has body: i have a php backend $query = "SELECT value FROM changes WHERE stock_id={$id}"; $results = mysql_query($query, $connection); while ($row = mysql_fetch_array($results)) { $values[]=$row['value']; } echo json_encode($values); and this is my javascript $.ajax({ url: 'data.php', data: {id: stock}, type: 'get', success: function(data) { $.jqplot ('graph-container', data); } }); the console shows no data specified error Note: im using a one dimentional array ie, i expect array like [25,15,3656,65]
score: 0
has comment: http://stackoverflow.com/comment/41636492
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41636657
has comment: http://stackoverflow.com/comment/41636253
tagged with: php
has answer: http://stackoverflow.com/a/26502536
has comment: http://stackoverflow.com/comment/41636390
type: UnansweredQuestion
has title: Plot jqplot graph from json data
has comment: http://stackoverflow.com/comment/41636306
has comment: http://stackoverflow.com/comment/41636465
has comment: http://stackoverflow.com/comment/41636400
tagged with: jqplot
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/41551864
has text: Are your getJSON functions working properly? (are they returning the correct data?) What error are you getting?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26455405
type: QuestionComment

http://stackoverflow.com/q/26491019
answer count: 1
has comment: http://stackoverflow.com/comment/41616261
tagged with: javascript
upvote count: 1
has title: Why is my simple JavaScript numbers, and delete only, checker not working?
has body: I have a very simple piece of JavaScript that is not working 100%, and I can't figure out why. &lt;input type="text" onKeyPress="return numbersOnly(event);" /&gt; function numbersOnly(event){ // Return "true" for all numbers and the delete (a.k.a., backspace) key. return ((event.charCode &gt;= 48 &amp;&amp; event.charCode &lt;= 57) || event.charCode == 8) ? true : false; } It will let me input just the numbers exactly like I want, but it won't pick up the delete (a.k.a., backspace) key. EDIT: The weird thing is this works for me in IE 9 but not Firefox.
linked to: http://stackoverflow.com/q/4843472
favorite count: 0
has comment: http://stackoverflow.com/comment/41615971
downvote count: 0
has comment: http://stackoverflow.com/comment/41615952
has comment: http://stackoverflow.com/comment/41616295
has answer: http://stackoverflow.com/a/26491573
accepted answer: http://stackoverflow.com/a/26491573
type: AnsweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/41543139
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26448584
type: AnswerComment
has text: document.getElementsByClassName( 'container' )[0]

http://stackoverflow.com/comment/41603654
type: QuestionComment
comment on: http://stackoverflow.com/q/26484332
has text: What's the objection to using DOM-manipulation or jQuery? Something like `$('*[width]').width()`?
score: 0
type: Comment

http://stackoverflow.com/q/26439221
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41522711
has title: Why does the button in this greasemonkey script not work on all sites?
has body: So, I'm writing a script to help keep track of who I've trick or treated on one of my game sites. I added a button to clear localStorage but the button is unclickable on that site, while it works fine on other sites. Works HERE Doesn't work HERE On the default dark layout... Isolated problem script: var box = document.createElement( 'div' ); box.id = 'mySelectBox'; GM_addStyle( ' #mySelectBox { ' + ' background: white; ' + ' border: 2px solid red; ' + ' padding: 4px; ' + //' position: absolute; ' + ' position: fixed; ' + ' top: 8px; left: 8px; ' + ' max-width: 400px; ' + ' } ' ); document.body.appendChild( box ); box.innerHTML = ''; var searchButton = document.createElement( 'div' ); searchButton.className = 'mySearchButton'; searchButton.textContent = 'Open'; GM_addStyle( ' .mySearchButton { ' + ' background: #aaa; ' + ' border: 1px solid #777; ' + ' padding: 1px; ' + ' margin-left: 8px; ' + ' float: right; ' + ' cursor: pointer; ' + ' } ' ); box.insertBefore( searchButton, box.nextSibling ); searchButton.addEventListener ('click', countit); localStorage.setItem('test', '5'); alert(localStorage.getItem('test')); function countit () { localStorage.clear(); alert(localStorage.getItem('test')) } Why doesn't it work on the second site? Could the site have made it impossible to create your own buttons or something? Update: OK, I discovered the problem but no clue how to fix it... If you go to the second link and scroll down the page you'll notice my button disappears under the login sidebar... the button will only work at the very bottom of the page under the copyright notice. NEW Question: How do I find and bypass whatever is overlaying my button?
has comment: http://stackoverflow.com/comment/41523384
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41522673
tagged with: greasemonkey
answer count: 0
has comment: http://stackoverflow.com/comment/41522445
has comment: http://stackoverflow.com/comment/41523230

http://stackoverflow.com/comment/41658429
type: Comment
type: QuestionComment
has text: @MikeWillis Makes sense then but this way i guess this is the defer attribute which is used on modern browsers which support both type attributes. Try just using async (even `Async attribute makes no guarantees about execution order`) just for testing purpose.
comment on: http://stackoverflow.com/q/26513574
score: 0

http://stackoverflow.com/q/26443797
linked to: http://stackoverflow.com/q/3233219
answer count: 2
has title: HTML-Element bring to front with "z-index" or "append"?
has body: HTML document has some HTML-Elements such as div, p, img, ... Most of them are dynamically created ( if helpful css: "position:absolute;"). Every time after OnClick the element has to come to the front of other elements. I mean: element.parentNode.appendChild(element); or element.parent().append(element); or // E.g. with css as follows: $('#ObjId').css('z-index', HighestIndx+1 ); I prefer the use of appendChild, due to the css style z-index won't be inserted into the element. But I don't know whether the choice of appendChild vs z-index would be better. My question: What is better to use z-index or append/appendChild ? Thanks.
tagged with: jquery
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26444635
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/9780349
has answer: http://stackoverflow.com/a/26444040
score: 1
downvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/26362743
has comment: http://stackoverflow.com/comment/41385943
accepted answer of: http://stackoverflow.com/q/26362699
has comment: http://stackoverflow.com/comment/41383206
answers question: http://stackoverflow.com/q/26362699
score: 2
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41384078
has body: You could add a click handler for the child elements that uses stopPropagationto prevent the click event bubbling to parent elements: $('#sidebar &gt; li li').click(function(e){ e.stopPropagation(); }); Further reading: MDN docs for Event.

http://stackoverflow.com/comment/41418321
comment on: http://stackoverflow.com/a/26381544
score: 0
type: AnswerComment
has text: Out of curiosity, why would you suggest not using the arguments object?
type: Comment

http://stackoverflow.com/a/26389425
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26389405
type: AcceptedAnswer
has body: Use addEventListener, which can handle multiple handlers for the same event: test_element.addEventListener('click', function(){ alert('one'); }, false); test_element.addEventListener('click', function(){ alert('two'); }, false); The onclick property (aka inline) only supports a single handler.
answers question: http://stackoverflow.com/q/26389405
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/41509621
type: QuestionComment
comment on: http://stackoverflow.com/q/26431999
has text: They're graphic design students, not com-sci. Getting demonstrable results is of more value than knowing bare JS.
score: 0
type: Comment

http://stackoverflow.com/a/26454133
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41549113
has body: Each time you do document.getElementById("values").innerHTML = "..."; you will replace the html inside the div with ID 'values' So calling it multiple times with different values doesn't make sense. You would either call it once and setting the whole innerHTML at once, like this document.getElementById("values").innerHTML = " ....etc... "; If you would call innerHTML sequentially you would do it as follows (which is just how to append any string in javascript), but in the comments below I just learned this should not be done like this: document.getElementById("values").innerHTML += " "; document.getElementById("values").innerHTML += " "+localStorage.getItem(temp_km)+" "; document.getElementById("values").innerHTML += " "+localStorage.getItem(temp_f)+" "; document.getElementById("values").innerHTML += " ";
score: 0
answers question: http://stackoverflow.com/q/26454049
has comment: http://stackoverflow.com/comment/41549183
type: Answer

http://stackoverflow.com/a/35028811
answers question: http://stackoverflow.com/q/26458108
has body: What I have is: var height = $(window).scrollTop(); console.log("current height " + height); $('#calendar').fullCalendar( 'removeEvents'); $('#calendar').fullCalendar( 'addEventSource', e); $('#calendar').fullCalendar( 'addEventSource', holiday); $('#calendar').fullCalendar( 'refetchEvents'); window.scrollTo(0,height); console.log("scroll to " + height); and it works for me
score: 0
type: Answer

http://stackoverflow.com/a/26418483
downvote count: 0
type: Answer
has body: You can use phpGrid or jqGrid for ajax grid. it's easy to use.
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26417992

http://stackoverflow.com/comment/41455836
comment on: http://stackoverflow.com/a/26403278
score: 0
has text: Thank you, for great example. I am sure I will use it in the future but in this case I can't modify html
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26500242
tagged with: express
has title: How to get image data created by Bootstrap File Input plugin
has body: I've got the following div that does the work of selecting and showing the selected image, changing the image and cancelling it. All of it is done by the Bootstrap File Input plugin. Select image Change Remove Now this Bootstrap File Input plugin create the following img element, which holds the data for the image. I need that data so I could send that using AngularJS to my node server and save that image inside a folder on my server. Could somebody help me with getting the dynamically generated data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAAA3=... image data by Bootstrap File Input using AngularJS?
answer count: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/28355935
has answer: http://stackoverflow.com/a/41357613
type: Question
tagged with: bootstrap-file-upload
tagged with: javascript
has comment: http://stackoverflow.com/comment/47565699

http://stackoverflow.com/a/26454162
answers question: http://stackoverflow.com/q/26453703
has comment: http://stackoverflow.com/comment/41555326
type: Answer
has comment: http://stackoverflow.com/comment/41554891
has comment: http://stackoverflow.com/comment/41556352
score: 0
has body: Use a ViewFlipper. You will need to add ImageViews with required bitmaps and start flipping the view. The images should be in your res/drawables dir, PNG or JPEG but ofcourse they'll be loaded as bitmaps. They don't need to be of the same size, use the SCALE TYPE property of the ImageView to adjust their appearance.

http://stackoverflow.com/q/26375884
favorite count: 0
has body: I'm creating a drawing/guess game in node &amp; socket. Simply said: I have a class Room, Game (which extends Room) and a class Round (10 per game). Each round a user is assigned as the drawer, the guessers have 45 seconds to guess the word. Upon the first guess if the timer is higher than 20 seconds, the timer is reduced to 20 seconds. I'm not certainly sure but this is how I started: class Round: function Round(id, game){ var ROUNDTIME = 45, timer = new Date(); this.id = id; this.game = game; this.endTime = timer.setSeconds(timer.getSeconds() + ROUNDTIME); ... } class Game: function Game(){ this.MAX_ROUNDS = 10; this.rounds = []; this.currentRound = null; ... } Game.prototype.start = function(){ this.nextRound; } Game.prototype.nextRound = function(){ if(this.rounds.length &lt;= this.MAX_ROUNDS){ this.currentRound = new Round(this.rounds.length + 1, this); ... } else { this.endGame(); } } Game.prototype.endGame = function(){ ... } Afterwards I have a Round function which checks for the answer each time an answer/message is submitted. Upon first answer I reduce the endTime till 20 seconds left. So have 2 questions: Is this a correct/good practive approach? How should I implement it further into the application itself? (setInterval of 1 second with emit? or Simply emit when the endDate is reached? or another way?)
has answer: http://stackoverflow.com/a/26376330
tagged with: socket.io-1.0
tagged with: node.js
type: AnsweredQuestion
upvote count: 1
tagged with: socket.io
type: Question
accepted answer: http://stackoverflow.com/a/26376330
tagged with: javascript
has title: node socket io timer implementation
answer count: 1
downvote count: 0
score: 1

http://stackoverflow.com/comment/41516860
type: Comment
type: QuestionComment
has text: whether `$(".like>a").click(function() {` is done in a loop?
comment on: http://stackoverflow.com/q/26436090
score: 0

http://stackoverflow.com/q/26374507
tagged with: css
has title: Website loading issue with jquery?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26374555
upvote count: 1
has body: I have a website http://www.rockdesign.com/ Just today that the website has loading issue. It takes like 1 minutes for the website to load properly, however, if I click on stop loading, the website load perfectly. Does anyone know what issue it might be ? Thank you so much !!!
type: Question
has comment: http://stackoverflow.com/comment/41405366
has answer: http://stackoverflow.com/a/26374565
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26374555
answer count: 2
possible better answer: http://stackoverflow.com/a/26374565
downvote count: 0
tagged with: web
score: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26406686
has body: This has nothing to do with Django templates, or external files. HTML pages are not magic; browsers simply interpret them in order. If a script is included at the top of a document, it can't immediately act on elements in the DOM, because the DOM is not yet loaded. That is why jQuery includes a method for delaying execution until the DOM is ready: $(document).ready(function() { ... code here ... }); See the jQuery documentation.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26404414

http://stackoverflow.com/q/26359510
tagged with: flickr
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: How to sort by relevance in the Flickr API?
has answer: http://stackoverflow.com/a/26365980
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26594791
tagged with: javascript
answer count: 2
has body: I have the following function which utilizes the flickr API, however I wish to be able to sort the image order by relevance. Where can I specify this? Would it be in this function or the function that first stores available images(querying a search term for more than one api) in an array. function printFlickrImages(){ $("#output").append(" Flickr " +availableImages["flickr"]["numImages"]+" images found from " +availableImages["flickr"]["url_pattern"]+" "); for (var i in availableImages["flickr"]["images"]){ var url_comps = availableImages["flickr"]["images"][i].split("/"); var photo_id = url_comps[url_comps.length-2]; $.getJSON(flickr_url+photo_id, function(data) { console.log(data); if(data.stat == "ok" && data.photo.usage.candownload == 1){ var flickr_image_url = "http://farm"+data.photo.farm +".staticflickr.com/"+data.photo.server +"/"+data.photo.id+"_"+data.photo.secret+"_z.jpg"; console.log(flickr_image_url); $("#output").append(" "); }else{ console.log("Image protected."); } }); } }//close printFlickr Images

http://stackoverflow.com/comment/41481137
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26416925
has text: You are calling the function `validaNovaMarcacao()` several times. Each time you call it, you're adding an extra form submission. Do away with the function or show the rest of your code.
score: 0

http://stackoverflow.com/a/26474338
type: Answer
score: 0
has body: I figured out the issue after some researching and help. Here is what was updated in my code to trigger this on mobile devices correctly after some updating of my CSS as well: function is_touch_device() { return (('ontouchstart' in window) || (navigator.MaxTouchPoints &gt; 0) || (navigator.msMaxTouchPoints &gt; 0)); } if(is_touch_device()) { $('.bg').on('click', function(){ $(this).toggleClass('activate'); $(this).find('ul').slideToggle(); return false; }); }
answers question: http://stackoverflow.com/q/26453151

http://stackoverflow.com/comment/41611222
comment on: http://stackoverflow.com/q/26487865
type: QuestionComment
score: 0
has text: @Igor i just used that to add my player to the canvas
type: Comment

http://stackoverflow.com/comment/41650900
score: 0
comment on: http://stackoverflow.com/q/26509625
has text: Sorry for the mistake. Can you please help me to solve my problem. I will be grateful.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41433794
comment on: http://stackoverflow.com/q/26390149
score: 1
has text: what exactly are you trying to accomplish here?I am little confused here because, if you want the whole div to be clickable then why have a button inside? Am I missing something here or understand the question correctly?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41478910
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26402876
has text: @BlekZ yes you can do that, just the same on javascript, just create a function onclick to whatever button it is. the important thing is that xmlhttprequest, you can't just outright put the `iva()` function of PHP inside that javascript, you need to use that xmlhttprequest.
score: 0

http://stackoverflow.com/q/26456087
has title: Forcing dimensions on a content editable div?
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26456139
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 3
upvote count: 3
type: Question
tagged with: javascript
has body: How could one force a content editable div to behave like a text box? That is, it has a fixed horizontal width but expands infinitely vertically? Here's a jsfiddle, and below is a copy of the code in the fiddle: http://jsfiddle.net/seoj7cgq/ JS Bin this is the text

http://stackoverflow.com/q/26360663
favorite count: 0
has comment: http://stackoverflow.com/comment/41379283
has comment: http://stackoverflow.com/comment/41379389
has title: Issue regarding adding variables in Javascript
has comment: http://stackoverflow.com/comment/41379307
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/10873942
downvote count: 1
has answer: http://stackoverflow.com/a/26360743
has body: recently started to study Javascript and having an issue with adding two variables together function btn_click() { var money = parseInt(document.getElementById("money").value); var dollar = parseInt(3.67 * money); var xfer = parseInt(0); var total = parseFloat(dollar + xfer); var dollar = dollar.toFixed(2); if (isNaN(money)) { alert("Please enter a valid amount!"); } else { if (money &gt; 15000) { xfer = 0; document.writeln("Amount in dirhams: " + dollar +" AED&lt;br&gt;"); document.writeln("Transfer charges: " + xfer +" AED&lt;br&gt;"); document.writeln("Total: &lt;span style='font-weight:bold'&gt;" +total+" AED&lt;br&gt;"); } else { xfer = 25; document.writeln("Amount in dirhams: " + dollar +" AED&lt;br&gt;"); document.writeln("Transfer charges: " + xfer +" AED&lt;br&gt;"); document.writeln("&lt;span style='font-weight:bold'&gt; Total: "+ total + " AED&lt;br&gt;&lt;/span&gt;"); } } } basically, my last line in the "ELSE" sections document.writeln("Total: &lt;span style='font-weight:bold'&gt;" +total+" AED&lt;br&gt;"); does not work, when I click on my button, everything gets calculated but the last line, the last line will only display my variable "dollar". Lets say for example I input 100 and clicked the button, my first line would be 367.00 AED and my second line would be 25 AED but my last line would say 367 AED, it did not sum the first two lines. Sorry if I seem unclear, if you need more information i'd be happy to give it Thank you guys
type: Question
has answer: http://stackoverflow.com/a/26360790
score: -1
has comment: http://stackoverflow.com/comment/41379320
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/41379294
has comment: http://stackoverflow.com/comment/41379302
tagged with: javascript

http://stackoverflow.com/a/26375055
score: 0
type: Answer
has body: Thanks again to Mike's help we found the fastest way to do this. I put this function togather, takes 0.28msg on average: function getValOnCubicBezier_givenXorY(options) { /* options = { cubicBezier: {xs:[x1, x2, x3, x4], ys:[y1, y2, y3, y4]}; x: NUMBER //this is the known x, if provide this must not provide y, a number for x will be returned y: NUMBER //this is the known y, if provide this must not provide x, a number for y will be returned } */ if ('x' in options &amp;&amp; 'y' in options) { throw new Error('cannot provide known x and known y'); } if (!('x' in options) &amp;&amp; !('y' in options)) { throw new Error('must provide EITHER a known x OR a known y'); } var x1 = options.cubicBezier.xs[0]; var x2 = options.cubicBezier.xs[1]; var x3 = options.cubicBezier.xs[2]; var x4 = options.cubicBezier.xs[3]; var y1 = options.cubicBezier.ys[0]; var y2 = options.cubicBezier.ys[1]; var y3 = options.cubicBezier.ys[2]; var y4 = options.cubicBezier.ys[3]; var LUT = { x: [], y: [] } for(var i=0; i&lt;100; i++) { var t = i/100; LUT.x.push( (1-t)*(1-t)*(1-t)*x1 + 3*(1-t)*(1-t)*t*x2 + 3*(1-t)*t*t*x3 + t*t*t*x4 ); LUT.y.push( (1-t)*(1-t)*(1-t)*y1 + 3*(1-t)*(1-t)*t*y2 + 3*(1-t)*t*t*y3 + t*t*t*y4 ); } if ('x' in options) { var knw = 'x'; //known var unk = 'y'; //unknown } else { var knw = 'y'; //known var unk = 'x'; //unknown } for (var i=1; i&lt;100; i++) { if (options[knw] &gt;= LUT[knw][i] &amp;&amp; options[knw] &lt;= LUT[knw][i+1]) { var linearInterpolationValue = options[knw] - LUT[knw][i]; return LUT[unk][i] + linearInterpolationValue; } } } var ease = { //cubic-bezier(0.25, 0.1, 0.25, 1.0) xs: [0, .25, .25, 1], ys: [0, .1, 1, 1] }; var linear = { xs: [0, 0, 1, 1], ys: [0, 0, 1, 1] }; //console.time('calc'); var x = getValOnCubicBezier_givenXorY({y:.5, cubicBezier:linear}); //console.timeEnd('calc'); //console.log('x:', x);
answers question: http://stackoverflow.com/q/26373607

http://stackoverflow.com/q/26365954
tagged with: pinterest
type: Question
score: 0
has answer: http://stackoverflow.com/a/29692621
accepted answer: http://stackoverflow.com/a/29692621
answer count: 1
has title: Pinterest and bootstrap tabs
tagged with: javascript
has body: So, I'm using Tabs but for some reason when I put pinterest Inside a tab content it doesn't show up. JsFiffle here Outside them works fine but won't load inside the tabs. .
type: AnsweredQuestion
tagged with: twitter-bootstrap-3

http://stackoverflow.com/comment/41414672
type: QuestionComment
has text: @DaanHeskes I want it to happen on load, but don't know the command
comment on: http://stackoverflow.com/q/26379784
score: 0
type: Comment

http://stackoverflow.com/q/26409321
has answer: http://stackoverflow.com/a/26409426
answer count: 3
tagged with: function
tagged with: arrays
downvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26409426
has answer: http://stackoverflow.com/a/26411363
has body: I have a function that is repeated a few times, and I believe it is possible to simplify and send variables from an array. var i = masterdata.timing.split(','); var index = 0; for (index = 0; index &lt; i.length; ++index) { $("#timing_" + i[index].trim()).prop('checked', true); } var i = masterdata.concern.split(','); var index = 0; for (index = 0; index &lt; i.length; ++index) { $("#concern_" + i[index].trim()).prop('checked', true); } var i = masterdata.steps.split(','); var index = 0; for (index = 0; index &lt; i.length; ++index) { $("#steps_" + i[index].trim()).prop('checked', true); } Maybe just change the categories into a variable and send the catergories from an array? var chkgroup = [ 'timing, concern, steps' ]
accepted answer: http://stackoverflow.com/a/26409391
upvote count: 6
type: AnsweredQuestion
score: 6
tagged with: loops
type: Question
has title: Simplify my function (loop, array)?
tagged with: javascript
has answer: http://stackoverflow.com/a/26409391

http://stackoverflow.com/comment/41574843
score: 0
comment on: http://stackoverflow.com/q/26468023
type: QuestionComment
type: Comment
has text: @Sasa : Another link in case you couldn't access the above one : http://www.web.edrnet.com/ordering/lightbox/lightbox.aspx?pguid=8a33e0d2-d7a9-4f0a-8418-e82c0e8bade7&lsessguid=2eb16165-c554-46d7-a7bd-ee94cb2da2c7

http://stackoverflow.com/comment/41682050
score: 0
type: Comment
has text: finally i got the solution here it is:var canvas_Context=canvas.getContext("2d"); var img = document.getElementById("StaticView"); canvas.width = 1150; canvas.height = 850; canvas_Context.drawImage(img,0,0); //Sodium canvas_Context.clearRect(934,362,76,49); canvas.style.visibility = "hidden"; var dataUrl = canvas.toDataURL(); window.open(dataUrl, "toDataURL() image", "width=600, height=200"); Window.document.write(" This is 'myWindow' ");
comment on: http://stackoverflow.com/q/26490917
type: QuestionComment

http://stackoverflow.com/q/26497968
has title: How to get the value mapping of a Chrome local storage result through an argument?
type: Question
score: 0
has answer: http://stackoverflow.com/a/26502505
accepted answer: http://stackoverflow.com/a/26502505
answer count: 1
tagged with: javascript
tagged with: google-chrome-extension
has body: I have a function: // Get the value out of Chrome local storage chrome.storage.local.get(sourcePath, function(result) { // Test the result alert(JSON.stringify(result.sourcePath)); }); And a call to check it: chrome.storage.local.set({'userAcceptanceAgreement': true}); Right now, I would like to know how to get my function, when called with the above argument, to pass that value into the result.sourcePath alert. As is, it shows result with the correct storage value of {'userAcceptanceAgreement': true}, but result.sourcePath comes up as undefined because it isn't trying to locate the key:value pair for the argument, but for a literal sourcePath.
tagged with: google-chrome
type: AnsweredQuestion

http://stackoverflow.com/a/26421129
answers question: http://stackoverflow.com/q/26421056
type: Answer
upvote count: 1
has body: Not 100% sure if this is what you're asking, but something like this JsFiddle You can make your element a block element (instead of an inline span element) and add padding with css on the :focus selector // css div:focus {padding-left: 10px;} // html test lorem ipsum/div> The div which currently has the focus will have the above CSS style applied to it. You can change the div:focus selector to a class, something like: .my-class:focus {padding-left: 10px;} And then add that class to your elements
score: 1
downvote count: 0

http://stackoverflow.com/a/26422225
has comment: http://stackoverflow.com/comment/41490084
type: Answer
has body: You can just apply the same logic to your [class*="col-"] selector as you have to your other selector: $('[class*="col-"]').contents().unwrap();
score: 1
accepted answer of: http://stackoverflow.com/q/26422148
answers question: http://stackoverflow.com/q/26422148
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41431146
type: QuestionComment
type: Comment
has text: Use [AngularJS](https://docs.angularjs.org/api/ng/filter/filter)
comment on: http://stackoverflow.com/q/26386735
score: 0

http://stackoverflow.com/a/26436755
has body: try this.. $("#x").on("mouseover", function () { //wrire your code here }); if you populated elements through javascript,use the following. It is replacement for deprecated jQuery.live. $("body").on("mouseover","#x", function () { //wrire your code here }); see this js fiddle http://jsfiddle.net/3aq48p5m/3/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26436670

http://stackoverflow.com/q/26501634
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26501739
favorite count: 0
has answer: http://stackoverflow.com/a/26501740
has comment: http://stackoverflow.com/comment/41635194
has answer: http://stackoverflow.com/a/26501657
has comment: http://stackoverflow.com/comment/41635175
type: UnansweredQuestion
score: -4
has body: How can i get id of list item onclick of anchor. I want to display id of list item via Javascript alert. Here is my source:
type: Question
has comment: http://stackoverflow.com/comment/41635145
downvote count: 4
answer count: 3
upvote count: 0
has title: How can i get id ofparent onclick of child

http://stackoverflow.com/comment/41495134
comment on: http://stackoverflow.com/q/26424869
type: Comment
type: QuestionComment
has text: These two don't work together: `position: absolute;` and `display: inline;`
score: 1

http://stackoverflow.com/comment/41502485
score: 0
has text: http://stackoverflow.com/questions/2662778/what-is-the-difference-between-these-jquery-ready-functions
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26428734

http://stackoverflow.com/comment/41379481
type: QuestionComment
has text: Ok, but do not know how to put the records from users field in the correct cell.
comment on: http://stackoverflow.com/q/26354315
score: 0
type: Comment

http://stackoverflow.com/q/26482563
answer count: 1
accepted answer: http://stackoverflow.com/a/26485415
favorite count: 0
has body: When creating an object to use JS in an OO manner, is there any difference within a JS engine between (with the exception of being able to define a constructor: var Uploader = Uploader || {}; and var Uploader = function() { } and function Uploader() { } Especially when later, you wish to do something along the lines of Uploader.DOM = { Create: function(file) { } }; Is it all down to personal preference? Or is there a real difference?
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/26485415
downvote count: 1
type: Question
has title: Difference between creating javascript objects
tagged with: javascript
score: 2

http://stackoverflow.com/a/26579501
type: Answer
accepted answer of: http://stackoverflow.com/q/26429731
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26429731
has body: Well there are a few problems with your current structure. When your callback route is called, with a possibility of N objects in it, you're triggering your socket event and retrieving all the last photos of your geography each time. So let's say you will have 3 new objects, you will call 3 times the same thing to get the same data, which is a bit loss when you have the power of the sockets. You can also have problems if you try to get the object data from the client-side and PUTing it to your server, since all your clients may receive the socket and you could end-up with duplicates, not to mention that this is a lot of traffic for not much, and this will burn your quota API limit, which is also not safe on the client-side since everyone can see your key. To me, a good way to get something working (even if I don't really know what your :stadium_id param stands for) is to get the info you want directly on the server side in your callback using the request module. You should only get the pictures, because you can retrieve a lot of things like users, tags or videos that you may don't want to get. So you will have to listen for the image objects, and nothing else. You could have something like this: var request = require('request'); var CLIENT_ID = 'yourId'; function newImage(data) { io.sockets.emit('newImage', data); } app.post('/callback', function (req, res) { //loop in all the new objects req.body.forEach(function (data) { if (data.type !== 'image') { return ; } //BTW I think you should try with the id property instead of object_id request('https://api.instagram.com/v1/media/' + data.object_id + '?access_token=' + CLIENT_ID, function (error, response, body) { if (error) { return ; } //Here we have one JSON object with all the info about the image var image = JSON.parse(body); //Save the new object to your DB. (replace the STADIUM_ID) Stadium.findByIdAndUpdate(STADIUM_ID, { $push: {'photos': { img: image.images.standard_resolution.url, link: image.link, username: ima…

http://stackoverflow.com/a/26378566
score: 1
answers question: http://stackoverflow.com/q/26378520
has comment: http://stackoverflow.com/comment/41414097
upvote count: 1
type: Answer
has body: USE JQUERY var index = 1; $("table#czytelnicy tr td").each(function(){ $(this).attr('id', 'B_1_'+index+''); index++; });
downvote count: 0
has comment: http://stackoverflow.com/comment/41414876
has comment: http://stackoverflow.com/comment/41414812
has comment: http://stackoverflow.com/comment/41415126

http://stackoverflow.com/q/26371521
tagged with: sprite
type: Question
accepted answer: http://stackoverflow.com/a/27210548
tagged with: game-engine
tagged with: javascript
has body: I want to create a typing game, so my sprites need to be generated in run time, with "labels". a String become a sprite to be typed. Anyone knows how to do this?
downvote count: 0
answer count: 1
tagged with: string
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/27210548
type: AnsweredQuestion
score: 1
has title: How to create Sprites with label in Quintus.js?

http://stackoverflow.com/a/26463650
answers question: http://stackoverflow.com/q/26461951
score: 0
has comment: http://stackoverflow.com/comment/41575702
type: Answer
has body: The problem is with $(this) reference, so try to use $('#container'), and will work. See the example: var $container = $('#container'); $container.highcharts({ series: [{ name: 'Tokyo', data: $container.data('values') }] }); http://jsfiddle.net/77bx2q3t/

http://stackoverflow.com/q/26413726
has title: javascript self invoking closure's alternative usage
favorite count: 0
possible better answer: http://stackoverflow.com/a/26413817
has comment: http://stackoverflow.com/comment/41476402
type: AnsweredQuestion
has body: I need a way to rewrite a javascript variable which I have written. Here is what I have: var TEST = new function() { var a = 'a'; var b = 'b'; this.c = 'c'; this.getC = function() { return this.c; } }; I am not very comfortable with the new keyword in front of the function(which even jslint/jshint do not like much). I do not want key:value pair notation, which can be achieved with this code: var TEST = function() { return { a : 'a', b : 'b', c : 'c', getC : function() { return this.c; } } }(); Please suggest any better way, other than the key:value pair notations. Fiddle link depicting the above problem.
upvote count: 2
score: 1
has comment: http://stackoverflow.com/comment/41475943
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26413817
has answer: http://stackoverflow.com/a/26413865
accepted answer: http://stackoverflow.com/a/26413865
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/41475485

http://stackoverflow.com/comment/41592630
score: 0
type: Comment
type: QuestionComment
has text: Possible duplicate? Compare dates with JavaScript http://stackoverflow.com/questions/492994/compare-dates-with-javascript
comment on: http://stackoverflow.com/q/26477875

http://stackoverflow.com/comment/41511891
type: Comment
comment on: http://stackoverflow.com/a/26433206
score: 0
type: AnswerComment
has text: Was this what you used as a direct inline style, Billy? And it made the change?

http://stackoverflow.com/comment/41574396
has text: Do you want to hide Cat 2 to be hide, if any of the subcat 2 selected? Or you want the whole `id="cat"` to hide?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26468300

http://stackoverflow.com/comment/41646078
score: 9
type: Comment
comment on: http://stackoverflow.com/q/26507772
type: QuestionComment
has text: The [error event](https://developer.mozilla.org/en-US/docs/Web/Events/error) does not bubble so you can't use it for delegated handlers

http://stackoverflow.com/comment/41523860
type: Comment
type: QuestionComment
has text: where is your second route??? And you don't need to have routes for static javascript files!!!
comment on: http://stackoverflow.com/q/26440123
score: 0

http://stackoverflow.com/a/26380181
type: AcceptedAnswer
score: 1
type: Answer
upvote count: 1
has body: The way to deactivate the 'enter -> submit': $("#formID").submit(function() { return false; }); The way to call a function when press key ENTER in a input type: $("#InputID").keyup(function (e) { if (e.keyCode == 13) { redraw(); } });
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26379821
answers question: http://stackoverflow.com/q/26379821

http://stackoverflow.com/comment/41559433
score: 0
has text: i tried in simple example it's not showing when i put like this my project i am getting MM
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26459300

http://stackoverflow.com/comment/42096550
score: 0
comment on: http://stackoverflow.com/q/26505250
type: Comment
has text: >> `universal hack for all Opera versions` ? why would you need it ? opera Presto and opera Blink are quite different, so to speak.
type: QuestionComment

http://stackoverflow.com/comment/41389493
type: QuestionComment
has text: I added all the relevant files that I thought I would need. The error message was "undefined, not a function".
comment on: http://stackoverflow.com/q/26365903
score: 0
type: Comment

http://stackoverflow.com/comment/41627214
score: 0
type: Comment
has text: Hey thank you for your feedback I tried it but still it didnt work :(
type: AnswerComment
comment on: http://stackoverflow.com/a/26490766

http://stackoverflow.com/comment/41375159
has text: It's the first time I implement an httphandler... Is there any way to do this? @Mohamadshiralizadeh
comment on: http://stackoverflow.com/q/26358295
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41501748
comment on: http://stackoverflow.com/q/26427841
type: QuestionComment
score: 1
has text: Even Karthik says so in his answer.
type: Comment

http://stackoverflow.com/q/26354846
has comment: http://stackoverflow.com/comment/41370059
tagged with: javascript
has answer: http://stackoverflow.com/a/26355221
has title: How to invoke javascript function from href for multiple links within a table
score: 0
has body: I have a table that contains a column with multiple filenames. The filenames are actually links with some of them pointing to a URL and some of them pointing to a local file. I can successfully download a local file and point to a url in a new window when clicked upon independently. However, when I try to do this dynamically by passing in the filename via the js function within the href, I encounter an Uncaught SyntaxError: Unexpected token :. This does not seem to be a problem when I just call the js function without any parameter, however, then all the links just point to the last filename in column. I can see at the bottom of my browser javascript:openLink(filename) with the proper filename, but then the error happens. This is my code: function searchAjax(){ var $table = $("#tableGrid").tablesorter(), $tbody = $table.children("tbody"); $.ajax({ dataType: 'json', url: 'table_results', type: 'GET', data: $('#filterForm').serialize(), success: function(data) { $("#tableGrid").find("tr:gt(0)").remove(); $.each(data, function(index, result) { function openLink(value){ var link = value; if(link.indexOf("http") > -1 ){ window.open(link, "_blank"); } else{ location.href="/projectv1?fileName="+link; } }; $tbody.append( " " + " " + result.regionCode + " " + " " + result.nationCode + " " + " " + 'link "' + " "); }); $("#tableGrid").trigger("update"); } }); };
answer count: 1
has comment: http://stackoverflow.com/comment/41369672
has comment: http://stackoverflow.com/comment/41369374
accepted answer: http://stackoverflow.com/a/26355221
has comment: http://stackoverflow.com/comment/41370086
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41369042
has comment: http://stackoverflow.com/comment/41369732
has comment: http://stackoverflow.com/comment/41369707
type: Question
tagged with: href
tagged with: location-href

http://stackoverflow.com/comment/41585317
score: 0
type: AnswerComment
has text: Thanks for the answer and post user3087839 , it works :)
type: Comment
comment on: http://stackoverflow.com/a/26473577

http://stackoverflow.com/a/26356792
has comment: http://stackoverflow.com/comment/41372673
has body: Pipe (|) operator is the OR function. Can you try this? url = url.replace(/([-|_]+)/g, '-');
score: -1
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41374411
answers question: http://stackoverflow.com/q/26356782
type: Answer
has comment: http://stackoverflow.com/comment/41373541

http://stackoverflow.com/comment/41423687
comment on: http://stackoverflow.com/q/26384566
type: Comment
type: QuestionComment
has text: Added pen (at bottom)
score: 0

http://stackoverflow.com/q/26367277
has answer: http://stackoverflow.com/a/26379620
tagged with: angularjs
upvote count: 2
score: 2
type: AnsweredQuestion
has body: I'm trying to enable ng-change event for this custom Angular.js directive angucomplete This is how I declare the directive in my html file: <angucomplete id="Angucomplete1" placeholder="Type 3 letters to start" pause="100" selectedobject="selectedCountry" localdata="datasearch" ng-model="modelCountry" searchfields="name" titlefield="name" minlength="3" inputclass="form-control form-control-small" matchclass="highlight" /> I tried putting ng-change="myFunction()" here which is part of the controller but its not firing at all. Furthermore, I've tried putting ng-change attribute in the actual directive code as well, but it doesn't work as well: template: ' ' Any idea how I can fire event when the actual input value is changed in the textbox?
tagged with: angularjs-scope
accepted answer: http://stackoverflow.com/a/26379620
type: Question
tagged with: angularjs-directive
tagged with: angularjs-service
answer count: 1
downvote count: 0
tagged with: javascript
has title: angucomplete fire event when value is selected in Angular.js
favorite count: 0

http://stackoverflow.com/q/26481709
tagged with: javascript
type: AnsweredQuestion
tagged with: google-chrome-extension
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26523683
type: Question
answer count: 1
has title: Why gapi.auth.authorize with "immediate: false" doesn't close popup and fire callback?
tagged with: authentication
upvote count: 1
tagged with: google-oauth
has body: I'm working on some chrome-extension. The Google Developer Console is configured and using gapi eventually works, but I've got problem with, let's say, UX. So here is scenario I'm trying to acheive: Try to authenticate with Google Chrome logged in user. If fail, try to authenticate via gapi.auth.authorize with immediate: true. If fail, try to authenticate via gapi.auth.authorize with immediate: false. And this kind of works. I get the popup which asks for permission, I click Accept, but then popus goes blank, title is set to "Connecting..." (doesn't close) and callback function is never fired. I know access is granted because when I click accept and reload the page, it can authorize using immediate:true and my extension works perfectly. I check few issues, topics and questions asking different queries in google searching for the answer and I found this sollutions: setTimeout(checkAuth, 1) - tried, no success. I deduced that immediate:false cannot be called right after immediate:true, so I give it a try and tried to authenticate with immediate:false as first. Same results. I tried adding gapi.auth.init, and checkingAuth in it's callback (also using setTimeout). So here is bit of code (background.js). Sorry it looks like spaghetti, I'm beginner in JS. function respond(interactive, sendResponse) { xhrWithAuth('GET', 'https://www.googleapis.com/gmail/v1/users/me/profile', interactive, // false onUserMailFetched, sendResponse); function xhrWithAuth(method, url, interactive, callback, sendResponse) { var access_token; var retry = true; getToken(); // 1. trying to use Chrome user function getToken() { chrome.identity.getAuthToken({ interactive: interactive }, function (token) { if (chrome.runtime.lastError) { // 2. here lastError is User is not signed in. Calling onUserMailFetched callback(chrome.runtime.lastError, null, null, sendResponse); } access_token = token; requestStart(); }); } // I guess not important in topic function requestStart() { var xhr = new XMLHttpReques…
has answer: http://stackoverflow.com/a/26523683
downvote count: 0

http://stackoverflow.com/comment/41537557
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26447610
has text: +1 `.value.match(/z/g).length` is a good way to count the z's
score: 0

http://stackoverflow.com/comment/41501782
score: 1
has text: So what does this have to do with PHP? Sounds like more of Javascript/HTML5 functionality.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26428382

http://stackoverflow.com/comment/41425901
type: Comment
type: QuestionComment
score: 0
has text: @hindmost and then re-add it to the original array?
comment on: http://stackoverflow.com/q/26385869

http://stackoverflow.com/comment/46240561
comment on: http://stackoverflow.com/a/26419531
type: AnswerComment
has text: @SurenderSinghMalik That is strange. I don't know what could be the issue. You can ask a new question, but don't forget to include all version information when you do. If you have installed CasperJS through NPM, you can check if the commandline option works with the PhantomJS version under node_modules.
score: 0
type: Comment

http://stackoverflow.com/comment/41587684
type: QuestionComment
has text: The number of items in each is always different. There can be 2 categories and 15 queries, per exemple.
score: 0
comment on: http://stackoverflow.com/q/26474897
type: Comment

umbraco7
type: Tag
tags question: http://stackoverflow.com/q/26462493
tag name: umbraco7
tags question: http://stackoverflow.com/q/26489314

http://stackoverflow.com/comment/41548195
type: AnswerComment
has text: So? Just remove the `d3.json`. What's the problem?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26448926

http://stackoverflow.com/a/26505731
has body: You can replace tags for sure. But you don't have to do that. It's much simple and less obtrusive to go with just CSS approach. With CSS when you have class active you have great deal of flexibility to style currently selected item whatever you want. function ChangeRefreshSeconds(seconds, obj) { // do nothing if it's already active if (obj.className === 'active') return; var a = document.getElementById('seconds').children; for (var i = 0; i < a.length; i++) { a[i].className = ''; } obj.className = 'active'; // do something else alert('Current seconds: ' + seconds); } #seconds .active, #seconds .active:active { background: yellow; cursor: default; color: #333; font-weight: bold; } 15 30 60 120
has comment: http://stackoverflow.com/comment/41642253
answers question: http://stackoverflow.com/q/26505611
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41642337
upvote count: 1
has comment: http://stackoverflow.com/comment/41642441
score: 1

http://stackoverflow.com/q/26436596
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26436911
has answer: http://stackoverflow.com/a/26437088
has comment: http://stackoverflow.com/comment/41517752
favorite count: 0
has body: I have the following Checklist and Tasks Structure Now i want if any one checks a Task i want to make sure the the Checklist also gets checked. When someone unchecks the checklist all the tasks should get unchecked. This is a CheckList Search for entertainers that perform the types of shows that are suitable for your function. Book your venue. Search for a caterer that is suitable for your function. Lalu - June 23rd, 2014 Hold a training session for all attending staff and brief them on all activities and expectations for the day of the event. Appoint an adequate number of staff as greeters to welcome guests and orient them with the event activities and venue. Add Task This is a CheckList Search for entertainers that perform the types of shows that are suitable for your function. Book your venue. Search for a caterer that is suitable for your function. Lalu - June 23rd, 2014 Hold a training session for all attending staff and brief them on all activities and expectations for the day of the event. Appoint an adequate number of staff as greeters to welcome guests and orient them with the event activities and venue. Add Task jQuery Code: $('input.checklist-input').on('change',function(){ $(this).parent().siblings('.task-list').find('input.task-input').prop('checked',$(this).prop('checked')); })
has answer: http://stackoverflow.com/a/26436911
has answer: http://stackoverflow.com/a/26436892
has answer: http://stackoverflow.com/a/26436630
tagged with: checkbox
answer count: 4
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41517692
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26436892
has title: jQuery Select Checkbox - Select All
tagged with: javascript

http://stackoverflow.com/a/26403172
accepted answer of: http://stackoverflow.com/q/26403081
type: AcceptedAnswer
has body: You can't make two different functions with the same name. For your second form add the function "submitForm2" instead of "submitForm". Call the right functions like this: $(document).ready(function() { $("#submit-form-button").click(function() { submitForm(); }); }); $(document).ready(function() { $("#submit-form-button_v2").click(function() { submitForm2(); }); });
downvote count: 0
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41522617
answers question: http://stackoverflow.com/q/26403081

http://stackoverflow.com/q/26497146
type: Question
answer count: 2
tagged with: javascript
has body: Before I submit a form I want to check the values in the input. Here I'm checking if a value is NOt equal to .5 or 1. or not a empty string. form.onsubmit = function(e) { var ftimes = document.getElementsByClassName("add_timebox"); var fflag = 0; for(i=0;i&lt; ftimes.length;i++) { var value1 = ftimes[i].value; console.log(value1); if ( value1 !==.5 ||value1 !== 1 || (!IsStringEmpty(value1)) ){ fflag = 1; console.log('inside'); } } if(fflag==1) { alert('enter again' ); return false; } I have made many changes to the IF statement to try to get it correct. But it is still going in the loop even when I know if shouldn't. For example when i submit the form and i have one input value equal .22 then it should only give me 1 'inside' but in keeps repeating: inside .22 (empty string) inside ....
has answer: http://stackoverflow.com/a/26497224
score: 0
accepted answer: http://stackoverflow.com/a/26497978
possible better answer: http://stackoverflow.com/a/26497224
type: AnsweredQuestion
has title: checking values before submitting form
has answer: http://stackoverflow.com/a/26497978

http://stackoverflow.com/q/26476254
type: UnansweredQuestion
has body: I am new to Javascript so I'm not sure if my code is working as I'm not sure how to test or run it. What I want my code to do is display the JSON created from gathering all the checked boxes. I haven't added a console.log anywhere because I'm not sure where it would be appropriate. I feel as though I have all the pieces but I am not sure how to put everything together. The expected output should be: { "testpages" : [...data...], "configs" : [...data...] } My code Test Page 1 ... ... Test Page 30 Windows XP ... ... OS X 10.9 Safari 7
has comment: http://stackoverflow.com/comment/41589783
has answer: http://stackoverflow.com/a/26476460
has comment: http://stackoverflow.com/comment/41589647
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41589893
favorite count: 0
has title: running Javascript on button click
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26476483
has comment: http://stackoverflow.com/comment/41589682
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41589930
has comment: http://stackoverflow.com/comment/41589624
has comment: http://stackoverflow.com/comment/41589972
has comment: http://stackoverflow.com/comment/41589866
tagged with: javascript

http://stackoverflow.com/comment/41374887
has text: where is the submit button !
comment on: http://stackoverflow.com/a/26358129
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/q/26416943
accepted answer: http://stackoverflow.com/a/26417382
has body: Can I make Mathjax to not render the latex on the page inmediately? I could remove all the $ symbols on the html and later on add them and call the typeset function MathJax.Hub.Queue(["Typeset",MathJax.Hub]), but I'm asking if there's a better way to delay Mathjax from rendering the latex on the page.
upvote count: 1
type: Question
tagged with: mathjax
has answer: http://stackoverflow.com/a/26417382
score: 1
has title: Mathjax ignore latex on the page
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: latex
type: AnsweredQuestion

http://stackoverflow.com/q/26457344
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/41555488
has body: I have this function which I believe is following this process: function verify(){ $.get("map_process.php", function (data) { verified = $(data).find("marker").eq(-1).attr('verification'); }); } Get data from php file/db In the db, find the table "marker" Find the last record in the table marker Assign the value of the 'verification' column to the variable verified This is doing what I want (kind of) but I need to be able to specify what record to get the 'verification' value from, but not by it's position in the table (as more records will be added and the above will just get the last record regardless). Is there another method that is kind of like .eq(x) but will allow me to specifically select a record based on another attr in that record. eg. Say I want to find the verification value for record 1 through an event listener, and then find the verification value for record 6 through a different event listener. I have a variable which can distinguish what row I want to get, but how can I incorporate this into the statement above. (i'm thinking instead of .eq(-1)
tagged with: mysql
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26457490
tagged with: javascript
tagged with: jquery
type: Question
has title: Getting a particular row's attribute value?
score: 0

http://stackoverflow.com/q/26465766
score: -1
upvote count: 0
answer count: 1
has title: Node.js: SOAP request?
tagged with: javascript
favorite count: 0
tagged with: soap
tagged with: node.js
tagged with: xml-namespaces
has body: I'm trying to perform a request from an existing Node.js server. The request has been given to me using an XML format, but I'm clueless about how to use that... Please have a look at it and give me some directions about how these are usually handled? Thanks in advance... <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.__SOME_DOMAIN__.com"> <soapenv:Header> <api:userToken> pwd usr </api:userToken> </soapenv:Header> <soapenv:Body> <api:SearchModels> __KEYWORD__ </api:SearchModels> </soapenv:Body> </soapenv:Envelope>
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26953574

http://stackoverflow.com/comment/41514782
comment on: http://stackoverflow.com/a/26413410
type: AnswerComment
score: 0
type: Comment
has text: I voted you up for the typing effort and link to the documentation but that didn't work.

http://stackoverflow.com/a/26437509
answers question: http://stackoverflow.com/q/26404414
has body: Move this line to the top of template: {% load staticfiles %} before &lt;html&gt; and &lt;head&gt; tags.
score: 0
has comment: http://stackoverflow.com/comment/41540822
type: Answer

http://stackoverflow.com/comment/41402420
has text: I recommend trying not to mix JavaScript and ERB. Either render the HTML (perhaps as `display:none`) in the ERB or as JSON and have the JavaScript render the HTML. Separation of concerns.
type: Comment
comment on: http://stackoverflow.com/q/26371669
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41725051
has text: I also tried making the second request to wait for 5 seconds so that teh response from teh first request is served by that time. It works fine. Byut i cant rely on this. ------------ What i wanted to achieve is hold the second request until the first request is served successfully. Is there a way to do this??
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26508535

http://stackoverflow.com/q/26405367
has comment: http://stackoverflow.com/comment/41465131
has comment: http://stackoverflow.com/comment/41461865
tagged with: magento
score: 1
has comment: http://stackoverflow.com/comment/41465664
tagged with: shopping-cart
has answer: http://stackoverflow.com/a/32765398
type: Question
has comment: http://stackoverflow.com/comment/41463274
has comment: http://stackoverflow.com/comment/41465091
has comment: http://stackoverflow.com/comment/41464718
has comment: http://stackoverflow.com/comment/45399768
has comment: http://stackoverflow.com/comment/41465215
answer count: 1
has title: Cannot add a condition shopping basket price rule, no options or dropdown magento backend
tagged with: javascript
has body: I have never come across this before, it works fine on both of the other two magento stores I manage. This store has been running for over a year with no issues in the backend. However today for the first time, rather than a % discount, I tried to add a fixed one to find that there I cannot add an action. Regardless of browser that I use, clicking on 'ALL', 'TRUE' or the Green Plus does absolutely nothing - in other stores it works perfectly. Magento V1.7.0.2 Screenshot here This is the error: TypeError: ({initialize:(function (parent, newChildUrl){ this.parent = $(parent); this.newChildUrl = newChildUrl; this.shownElement = null; this.updateElement = null; this.chooserSelectedItems = $H({}); this.readOnly = false; var elems = this.parent.getElementsByClassName('rule-param'); for (var i=0; i&lt;elems.length; i++) { this.initParam(elems[i]); } }), setReadonly:(function (readonly){ this.readOnly = readonly; var elems = this.parent.getElementsByClassName('rule-param-remove'); for (var i=0; i&lt;elems.length; i++) { var element = elems[i]; if (this.readOnly) { element.hide(); } else { element.show(); } } var elems = this.parent.getElementsByClassName('rule-param-new-child'); for (var i=0; i&lt;elems.length; i++) { var element = elems[i]; Google chrome inspector is showing: Uncaught TypeError: object is not a function 7ae86150a079d1644bc06caeec8fc3ef.js:20556(anonymous function)
tagged with: magento-1.7
upvote count: 1
has comment: http://stackoverflow.com/comment/41460105
favorite count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/a/26363728
has comment: http://stackoverflow.com/comment/45311106
type: Answer
has comment: http://stackoverflow.com/comment/41391487
has body: function getRepetend(num) { var m = (num+'').match(/\.(\d*?)(\d+?)\2+$/); return m &amp;&amp; {pattern: +m[2], index: m[1].length}; } It works like this: First, convert the number to string in order to be able to use regular expressions. Then, match this regex: /\.(\d*?)(\d+)\2+$/: \. matches the decimal dot. (\d*?) matches the digits between the decimal dot and the repetend, and captures the result into backreference number 1. (\d+?) matches the repetend, and captures it into backreference number 2. \2+ matches repetitions of the repetend. $ matches end of string. Finally, if the match is null (i.e. there is no match), return null. Otherwise, return an object that contains the repetend (backreference 2) converted to number, and the number of digits between the dot and the repetend (backreference 1).
upvote count: 8
accepted answer of: http://stackoverflow.com/q/26363390
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/125355308
answers question: http://stackoverflow.com/q/26363390
downvote count: 0
score: 8

http://stackoverflow.com/q/26492135
favorite count: 0
tagged with: optimization
accepted answer: http://stackoverflow.com/a/26494106
has body: I am developing a website with a full background video. To optimize for low speed connections / mobile, I am using a media query to detect screen sizes smaller then 768 px, then doing a display:none on the video container and displaying a background image instead. My question here is: Is this the correct way to optimize for low speed connections / mobile? Will it have any impact on my optimization when not displaying containers with css or should I be doing it in JavaScript instead, when loading the page?
tagged with: css
has comment: http://stackoverflow.com/comment/41618325
has comment: http://stackoverflow.com/comment/41618116
upvote count: 2
has comment: http://stackoverflow.com/comment/41622966
has comment: http://stackoverflow.com/comment/41619909
score: 2
has comment: http://stackoverflow.com/comment/41622152
type: AnsweredQuestion
has title: Optimizing for mobile/ low speed connection - full background video
possible better answer: http://stackoverflow.com/a/26494836
has answer: http://stackoverflow.com/a/26494836
tagged with: media-queries
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26494106
has comment: http://stackoverflow.com/comment/41618391
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/69057776
has comment: http://stackoverflow.com/comment/123050192
has body: Minimal JavaScript function: function nameToRgba(name) { var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); context.fillStyle = name; context.fillRect(0,0,1,1); return context.getImageData(0,0,1,1).data; }
answers question: http://stackoverflow.com/q/26414770
has comment: http://stackoverflow.com/comment/128640398
type: AcceptedAnswer
downvote count: 0
upvote count: 11
type: Answer
has comment: http://stackoverflow.com/comment/123305354
score: 11
has comment: http://stackoverflow.com/comment/122654465
accepted answer of: http://stackoverflow.com/q/26414770

google-chrome-extension
tags question: http://stackoverflow.com/q/26412095
tags question: http://stackoverflow.com/q/26412895
tags question: http://stackoverflow.com/q/26390322
tags question: http://stackoverflow.com/q/26424366
tags question: http://stackoverflow.com/q/26465062
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/26438839
tags question: http://stackoverflow.com/q/26474826
tags question: http://stackoverflow.com/q/26476332
tags question: http://stackoverflow.com/q/26409174
tags question: http://stackoverflow.com/q/26374663
tags question: http://stackoverflow.com/q/26384241
tags question: http://stackoverflow.com/q/26371076
tags question: http://stackoverflow.com/q/26442007
tags question: http://stackoverflow.com/q/26456453
tags question: http://stackoverflow.com/q/26408603
tags question: http://stackoverflow.com/q/26504061
tags question: http://stackoverflow.com/q/26414956
tags question: http://stackoverflow.com/q/26442883
tags question: http://stackoverflow.com/q/26491360
tags question: http://stackoverflow.com/q/26435725
type: Tag
tags question: http://stackoverflow.com/q/26438392
tags question: http://stackoverflow.com/q/26472273
tags question: http://stackoverflow.com/q/26452896
tags question: http://stackoverflow.com/q/26451377
tags question: http://stackoverflow.com/q/26379694
tags question: http://stackoverflow.com/q/26359206
tags question: http://stackoverflow.com/q/26368874
tags question: http://stackoverflow.com/q/26415925
tags question: http://stackoverflow.com/q/26508237
tags question: http://stackoverflow.com/q/26406985
tags question: http://stackoverflow.com/q/26358096
tags question: http://stackoverflow.com/q/26373792
tags question: http://stackoverflow.com/q/26481709
tags question: http://stackoverflow.com/q/26476826
tags question: http://stackoverflow.com/q/26373828
tags question: http://stackoverflow.com/q/26423899
tags question: http://stackoverflow.com/q/26449246
tags question: http://stackoverflow.com/q/26372133
tags question: http://stackoverflow.com/q/26370891
tags question: http://stackoverflow.com/q/26497968
tags question: http://stackoverflow.com/q/26494403

http://stackoverflow.com/q/26410678
has comment: http://stackoverflow.com/comment/41469533
has answer: http://stackoverflow.com/a/26411189
has comment: http://stackoverflow.com/comment/41470111
has comment: http://stackoverflow.com/comment/41469593
has answer: http://stackoverflow.com/a/26411210
has comment: http://stackoverflow.com/comment/41469903
type: Question
type: AnsweredQuestion
answer count: 3
accepted answer: http://stackoverflow.com/a/26411210
tagged with: javascript
has answer: http://stackoverflow.com/a/26411194
has comment: http://stackoverflow.com/comment/41470032
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41469893
has body: I have some text in a website that I want to change using javascript because I can't change it any other way. In short, the site is laid out like such: ...some other divs before here, body, head, etc... Support Center ...some other divs for other parts of the page... ...more divs, footer, etc... I don't need the text to change on click or anything like that I just want it to be set on load to something different than Support Center but I'm not sure if I'm placing the script in the correct place or if the syntax is wrong? I've tried placing it before and after and it doesn't seem to work. Here is the code: Thank you.
possible better answer: http://stackoverflow.com/a/26411189
has title: How to change static text in a web page using inner html?

http://stackoverflow.com/comment/41455400
has text: Well, in that case you would need to first store the current HTML, do the printing and then revert back to initial HTML.
type: AnswerComment
comment on: http://stackoverflow.com/a/26402978
score: 0
type: Comment

http://stackoverflow.com/q/26474191
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26474542
accepted answer: http://stackoverflow.com/a/26474542
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
has title: Display links from xml data
has comment: http://stackoverflow.com/comment/41588149
tagged with: xslt
type: Question
tagged with: hyperlink
has body: How can I display a clickable a href link on my html page from data exported from a xml page? below is the code I'm using. All the data exports fine, just the links cannot be clicked. so basically if a user clicks the item1.html link in the exported table he gets directed to item1.html page <?xml version="1.0" encoding="utf-8"?> <catalog> Item1 09:15 10:00 Item 1 Item2 10:15 11:00 Item 2 Item3 12:15 13:00 Item 3 Item4 14:15 15:00 Item 4 Item5 15:15 16:00 Item 5 <catalog> xsl <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> timetable Start Stop Title Link <xsl:for-each select="catalog/cd"> <xsl:sort select="start"/> <xsl:value-of select="start"/> <xsl:value-of select="stop"/> <xsl:value-of select="title"/> <xsl:value-of select="link"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> script Thanks EDIT Marcus Rickert - "You need to replace <xsl:value-of select="link"/> by <xsl:copy-of select="link/*"/> since the former will only copy a text representation of the selected sub tree to your target document. All tags will be lost. The latter will make a copy of your link tag. I've added a /* to make sure that the tags themselves will not show up in the HTML. Most likely, they will be ignored but they are not required either."
answer count: 1

http://stackoverflow.com/comment/41427243
score: 0
has text: `localStorage` isn't permanent, you should be saving to a database if you want to keep them around long term
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26379252

http://stackoverflow.com/q/26429492
score: 6
favorite count: 0
has body: I'm trying to get a live output from a HTML5 input range slider into a javascript variable. Right now, I'm using &lt;input type="range" id="rangevalue" onchange="arduino()"&gt; The way I have it working is doing what I want, but it's not "live." I want to have it so while you're dragging the slider, it updates the variable, and not only once you let go. For example: when I'm dragging the slider from 1 to 5, I want the variable to update while I'm dragging, so it will update with 1,2,3,4,5 and not only jump from 1 to 5 once I release the slider. Is it possible to do such a thing? Any recommendations? I was using the jQuery slider plugin, but it was not touch compatible, which eliminated its purpose. Thanks for all help in advance! EDIT - I must not have explained well enough, I know how to get the value of a range slider, I just want to get a "live" output from it.
has answer: http://stackoverflow.com/a/69724279
tagged with: http://stackoverflow.com/tag/html
tagged with: range
tagged with: input
upvote count: 6
has answer: http://stackoverflow.com/a/77783715
has title: Live output in jQuery HTML5 range slider
has answer: http://stackoverflow.com/a/26430152
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26430086
possible better answer: http://stackoverflow.com/a/26430052
has answer: http://stackoverflow.com/a/26432996
has answer: http://stackoverflow.com/a/26430052
downvote count: 0
accepted answer: http://stackoverflow.com/a/26430152
tagged with: javascript
answer count: 6
tagged with: jquery

http://stackoverflow.com/q/26376283
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26377162
tagged with: height
type: UnansweredQuestion
has body: I've created a simple menu with a button of which when clicked on should change the size of the menu at alternating heights, I keep receiving some weird action of which my menu just shrinks to the bottom left of the document disappears then reappears the same height; that's how I found out the second function was being executed but not the first. I've changed the code many times but I can't find a solution, maybe someone can help. Here's my code. $(document).ready(function () { $("#HideShow").addClass("fa fa-bars").click(function () { $("#editor").toggle(function () { $("#editor").slideToggle("fast", function () { $("#editor").height(20); }); }, function () { $("#editor").slideToggle("fast", function () { $("#editor").height(150); }); }); }); }); maybe I'm just not getting it, I am fairly new to this so if I am doing something wrong PLEASE correct me.
score: 1
upvote count: 1
tagged with: toggle
has comment: http://stackoverflow.com/comment/41408387
has answer: http://stackoverflow.com/a/26376683
linked to: http://stackoverflow.com/q/14301935
tagged with: slidetoggle
has comment: http://stackoverflow.com/comment/41408621
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41408301
has title: Why does .toggle not work for the first function?

http://stackoverflow.com/a/26473228
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26473084
score: 5
has body: How about simply reseting a form to its original state, maybe it will work for you? $("#addNorma").on('hide.bs.modal', function () { $(this).find('form')[0].reset(); }); Demo: http://jsfiddle.net/kk3xr15m/1/
type: AcceptedAnswer
upvote count: 5
type: Answer
answers question: http://stackoverflow.com/q/26473084

http://stackoverflow.com/comment/41648680
type: Comment
has text: Sorry, I forgot about that. JavaScript can tell a browser to do something, but the browser usually doesn't do it until after the JavaScript function ends, which contained the instruction to tell the browser to do something. You should put a call to `setTimeout("manipulator();", 250);` after calling `window.open()`. Then let that function end/return. The "manipulator" function would be called 1/4 second afterward, and that is the function where you would access the document object of the just-opened window.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26498901

http://stackoverflow.com/comment/41442960
score: 1
type: AnswerComment
has text: Exactly! Looks like something taken from the 90s vault that nobody dared to recreate. Shame, it would be quite interesting seeing it make use of modern technologies, say canvas and CSS3 animations.
type: Comment
comment on: http://stackoverflow.com/a/26392505

http://stackoverflow.com/comment/41374761
comment on: http://stackoverflow.com/q/26354257
score: 0
type: Comment
type: QuestionComment
has text: I want it for all browser... but currently using chrome.

http://stackoverflow.com/comment/41577254
has text: Very good suggestions - closer but still not getting expected results.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26445315
type: AnswerComment

http://stackoverflow.com/q/26480027
tagged with: mongodb
accepted answer: http://stackoverflow.com/a/26480075
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26480075
has title: How to store Image in mongodb as sequential name?
has body: I have to store image in mongodb how it has store that thing i know very well. but i have to create image name as sequential i don't have any idea how to do that. /image01.jpg /image02.jpg /image03.jpg /image04.jpg ............ infinite That's way i have to save image name in Node. Please any on give me any idea how to do that. Thank you.
tagged with: node.js
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/41589750
comment on: http://stackoverflow.com/q/26476219
type: QuestionComment
has text: Hack! Didn't know that altough I am into this stuff for a long time.
score: 0
type: Comment

http://stackoverflow.com/q/26418523
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26418534
type: UnansweredQuestion
tagged with: handlebars.js
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Unicode character escape sequence are not printing correctly in handlebar.js
has body: I am getting issues with Unicode character escape sequence. In my application my team using the Unicode character escape sequence for the localization. The Unicode character escape sequence like below \u1ee3 \u1ed7 \u0110 \u0103 and so on.. while using this characters i am getting incorrect characters like ? What should i do for this. Is this problem with handlebar templating. How can i resolve this issue.

http://stackoverflow.com/q/26391639
has title: Knockout foreach nesting issue
favorite count: 0
has comment: http://stackoverflow.com/comment/41438405
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41438926
has answer: http://stackoverflow.com/a/26393808
score: 1
upvote count: 1
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/41439907
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26393808
has body: I'm trying to generate a table using properties of two viewmodels, which are sub viewmodels of the main viewmodel, which ko.applyBindings() is called using. The idea is to generate a row for each element in SubVM1 where the first cell is the element's name. Then for every element in SubVM2, an additional cell is added to the row. The rows generate correctly and the first cell shows the SubVM1 name, but it is only followed by one cell, instead of however many elements are in SubVM2. Also, the function in the data-bind doesn't work either. I've tried declaring the Value function as a prototype of SubV2 but it errors out as undefined. Regardless, something I'm not sure about is clearly happening with the binding context, and help would be appreciated. &lt;tbody data-bind="foreach: {data: SubViewModel1, as: 'SubVM1'}"&gt; &lt;tr&gt; &lt;td data-bind="text: SubVM1.Name" /&gt; &lt;!-- ko foreach: {data: $root.SubViewModel2, as: 'SubVM2'} --&gt; &lt;td data-bind="text: Value(SubVM1.Type)"&gt;&lt;/td&gt; &lt;!-- /ko --&gt; &lt;/tr&gt; &lt;/tbody&gt; Edit: Partially done jsfiddle: http://jsfiddle.net/jgr71o8t/1
has comment: http://stackoverflow.com/comment/41436458
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26369940
type: Question
has answer: http://stackoverflow.com/a/26370170
tagged with: javascript
has title: jQuery setinterval function change css
linked to: http://stackoverflow.com/q/49547
score: 0
tagged with: setinterval
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26370079
has answer: http://stackoverflow.com/a/26370103
accepted answer: http://stackoverflow.com/a/26370103
has answer: http://stackoverflow.com/a/26370040
answer count: 5
has answer: http://stackoverflow.com/a/26370273
tagged with: php
has comment: http://stackoverflow.com/comment/41400235
tagged with: css
has body: I want to make a function to change my background &lt;header&gt; every 5 seconds. On the one hand I have an image that changes every X time, It is generated by a php file: ../bg.php So I've done that I change the background-image with $("header").css(). Running the script like this: (function($) { $(document).ready(function() { var $container = $("header"); $container.css("background-image", "url(bg.php)"); var refreshId = setInterval(function() { $container.css("background-image", "url(bg.php)"); }, 9000); }); })(jQuery); But does not change by itself.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41397296
has answer: http://stackoverflow.com/a/26370079
has comment: http://stackoverflow.com/comment/41397865

http://stackoverflow.com/comment/41503187
type: AnswerComment
score: 0
has text: Rewriting the part from scratch is great and all, but if you don't explain some of the things that you've added and maybe they haven't seen it's not going to benefit the original asker at all.
type: Comment
comment on: http://stackoverflow.com/a/26428809

http://stackoverflow.com/comment/42375125
type: Comment
has text: then its treating it as a string instead of number... try (parseInt(total) - parseInt(value))
type: AnswerComment
comment on: http://stackoverflow.com/a/26879234
score: 0

http://stackoverflow.com/q/26354345
has answer: http://stackoverflow.com/a/26354645
accepted answer: http://stackoverflow.com/a/26354485
type: Question
possible better answer: http://stackoverflow.com/a/26354645
has comment: http://stackoverflow.com/comment/41368104
tagged with: javascript
has body: Untill the alert it is ok, But the if is not executing. Here the program stack. Is there any way to detect the display property of div that is it "bloc" or "none"? for(i=1;i&lt;=10;i++) { alert("Hamdun Soft Past Job Will be Deleted"); if(document.getElementById(i).style.display=="block") document.getElementById(i).innerHTML="Hamdun Soft Is Clear Now"; } Oh! Kepp in mind that from div with id=1 to 10, one's display= "block" and all of the 9 is "none". I did that with another JavaScript program. But now I need to detect the "block" one. Tanks.
has answer: http://stackoverflow.com/a/26354485
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41368094
has answer: http://stackoverflow.com/a/26355183
has comment: http://stackoverflow.com/comment/41368257
has title: Detecting CSS property value of a html element by JavaScript
tagged with: properties
has comment: http://stackoverflow.com/comment/41368167
tagged with: css
has comment: http://stackoverflow.com/comment/41368178
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41368298

http://stackoverflow.com/a/26413477
type: Answer
has comment: http://stackoverflow.com/comment/41474982
score: 0
has body: you must use a lookbehind regex, such as: .(?&lt;=my-Word: [A-Za-z0-9-])[A-Za-z0-9-]+ but unfortunately javascript does not support lookbehind, so you with a trick you can use a lookahead regex instead. for this you need to first reverse original string and at last the matched part: [A-Za-z0-9-]+(?= :droW-ym) DEMO
answers question: http://stackoverflow.com/q/26413154

http://stackoverflow.com/q/26487212
has title: Javascript HTML Input AJAX Updating
has body: I'm trying to setup an html form to perform an AJAX update when a user exits a field. I'm new to Javascript and AJAX so still working out syntax issues as I go. I've got to the point where the AJAX call is being made but the parameters are not being passed to the PHP script - I need to include multiple parameters. Here's the html input that I'm trying to trigger the AJAX call from when the user exits this field: &lt;td&gt;&lt;input type="text" class="form-control" id="storeManager" name="storeManager" onchange="editProject('this.value,1E1DDA14-D2C6-4FC8-BA5F-DBCCC7ABAF7F')" value="John Terry"&gt;&lt;/td&gt; I need to pass the value of the input field as well as the 2nd string (1E1DDA14-D2C6-4FC8-BA5F-DBCCC7ABAF7F) to the AJAX script. Here's the the script: &lt;script type="text/javascript"&gt; function editProject(storeManager,uuid) { // Allocate an XMLHttpRequest object if (window.XMLHttpRequest) { // IE7+, Firefox, Chrome, Opera, Safari var xmlhttp=new XMLHttpRequest(); } else { // IE6, IE5 var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } // Set up the readyState change event handler xmlhttp.onreadystatechange = function() { if ((this.readyState == 4) &amp;&amp; (this.status == 200)) { document.getElementById("storeManager").innerHTML=xmlhttp.responseText; } } // Open an asynchronous POST connection and send request xmlhttp.open("POST", "editProject.php", true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("storeManager="+storeManager+"&amp;id="+uuid); return false; // Do not follow hyperlink } &lt;/script&gt; From looking at my server logs I can see the editProject.php script is being called but from examining the HTTP POST data there's none of the expected POST data parameters. I suspect I might have a syntax issue in either the HTML input or the Script or both but have tried everything I can think of to make this work. [if it's easier to use jQuery here I would love to see an example of how this works in my sit…
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26487300
tagged with: ajax
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26487300
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/41516221
comment on: http://stackoverflow.com/q/26435697
type: Comment
type: QuestionComment
has text: Adjust the duration of each to fit how you want them to go or make them travel the same distance. You want the *rate* to be the same and that is calculated by distance/duration.
score: 0

http://stackoverflow.com/comment/41581186
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26471226
has text: @sgarcia performance wise, yes! Also, `.on()` can [be used for event delegation](http://api.jquery.com/on/#direct-and-delegated-events).
type: Comment

http://stackoverflow.com/q/26365067
tagged with: dojo
has title: Dojo On.change function
type: UnansweredQuestion
type: Question
score: 0
has body: I have a number of combo boxes where I would like values to change when other values are selected. I am fairly novice at JavaScript, here is what I have gathered from other colleagues. The ideal workflow would be if Electronic Waste is selected in cbRequestType then the only items which populate are those below, such as copy machine, printer, etc. This does not work, what could I be missing? Additionally, my application already maintains a function which populates the cbEWASTE drop down from a database. I would like to by pass that function and populate the combo box on change. dijit.byId("cbRequestType").on('change', function(MFValue) { if (MFValue == 'E-WASTE') { dijit.byID("cbEWASTE").set('value', 'Copy Machine'); } else if (MFValue == '...') { dijit.by.ID('cbEWASTE').set('value', 'Printer'); } });
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26375786
has comment: http://stackoverflow.com/comment/41390301

http://stackoverflow.com/comment/41378615
has text: `it should land on the main site and then the above script should run` You can't run your script in some external page.. If that page supports hashtags you can directly do http://getbootstrap.com/components/#wells will work If you have access to other site you can write your logic based on url change
comment on: http://stackoverflow.com/q/26360046
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26447714
type: Question
type: AnsweredQuestion
score: -1
tagged with: image
has comment: http://stackoverflow.com/comment/41537515
answer count: 1
linked to: http://stackoverflow.com/q/2395765
tagged with: javascript
favorite count: 0
has body: Is there any way to save a javascript variable which contains a image? var image = new Image(); If yes,How? Thanks in advance Edit:I want to save it as a png without asking the user to do a right click.
downvote count: 1
has title: Saving a image from javascript variable
has comment: http://stackoverflow.com/comment/41537561
accepted answer: http://stackoverflow.com/a/26447786
upvote count: 0
tagged with: save
has answer: http://stackoverflow.com/a/26447786

http://stackoverflow.com/q/26419822
has comment: http://stackoverflow.com/comment/41487628
has comment: http://stackoverflow.com/comment/41486190
has comment: http://stackoverflow.com/comment/41487611
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41486081
has comment: http://stackoverflow.com/comment/41516861
answer count: 0
has comment: http://stackoverflow.com/comment/41486430
upvote count: 1
downvote count: 1
type: Question
has title: simplest code to check array possible combinations
has comment: http://stackoverflow.com/comment/41488984
score: 0
tagged with: javascript
tagged with: data-structures
has comment: http://stackoverflow.com/comment/41488796
has body: What's the simplest, library-free code for implementing get array possible combinations in javascript? I want to write var preDefinedCombinations = [ ['a', 'b', 'c'], ['a', 'c', 'd'], ['a'], ['b'], ['c'] ]; var selectedvalues = ['a', 'b', 'd']; getPossbileCombination(selectedvalues, preDefinedCombinations); and get ['a','b','c'],['a','c','d'] I tried below code but does'nt work as expected, it always give me missing term in case user select 'a', 'b' than alert shows him to select 'c' for valid combination. But if user selects 'a', 'b' &amp; ['d'] it does'nt give possible combination for selected values. var preDefinedCombinations = [['a','b','c'], ['a','c','d'], ['a'], ['b'], ['c']]; var selectedvalues = ['a','b','d']; function selectOption(value){ var checkIndex = selectedvalues.indexof(value); if(checkIndex == -1){ selectedvalues.push(value); }else{ selectedvalues.splice(checkIndex, -1); } } function intersect_safe(a, b) { var ai=0, bi=0; var result = new Array(); while( ai &lt; a.length &amp;&amp; bi &lt; b.length ) { if (a[ai] &lt; b[bi] ){ ai++; } else if (a[ai] &gt; b[bi] ){ bi++; } else /* they're equal */ { result.push(a[ai]); ai++; bi++; } } return result; } function checkVaildCombination(){ if(preDefinedCombinations.indexOf(selectedvalues) == -1){ var missing_bits = []; for (var i = 0; i &lt; preDefinedCombinations.length; i++) { var missing_bit = intersect_safe(preDefinedCombinations[i], selectedvalues); if (missing_bit.length == selectedvalues.length) { // candidate for valid answer missing_bit = []; for (var j = 0; j &lt; preDefinedCombinations[i].length; j++) { if (selectedvalues.indexOf(preDefinedCombinations[i][j]) == -1) { // actual missing bit missing_bit.push(preDefinedCombinations[i][j]); } } missing_bits.push(missing_bit); } } alert('Invalid Combination, if you select any of these you`ll get a valid combination:\n' + missing_bits.toString()); }else{ alert('Valid Combination'); } }
favorite count: 0

http://stackoverflow.com/a/26368819
type: Answer
answers question: http://stackoverflow.com/q/26368684
has body: Use a closure: for(var i = 0; i < 4; i++) { (function( i ) { $('.test-class-'+i).on('click', function(e){ alert(i); }); })( i ) } TEST 1 TEST 2 TEST 3 TEST 4
score: 0

http://stackoverflow.com/q/26441560
has title: load XML into HTML with jQuery (Ajax)
has comment: http://stackoverflow.com/comment/41529493
has comment: http://stackoverflow.com/comment/41528352
type: Question
has comment: http://stackoverflow.com/comment/41526258
has body: I try to load a XML database in a web page using jQuery (like say in subject). My database looks like: <?xml version="1.0" encoding="UTF-8"?> 14 Arles http://www.pays-arles.org/e-patrimoine/communes/arles/ http://www.pays-arles.org/e-patrimoine/communes/arles/article/abbaye-de-montmajour 445 Abbaye de Montmajour blabla 43.705856 4.664383 Religion <categoriedelarchitecture>Architecture religieuse, funéraire et commémorative</categoriedelarchitecture> Architecture religieuse Monument historique classé Moyen-Age Roman provençal XIIe siècle Bâtiment religieux Etat http://www.pays-arles.org/e-patrimoine/IMG/jpg/montmajour.jpg http://www.pays-arles.org/e-patrimoine/IMG/jpg/montmajour-4.jpg http://www.pays-arles.org/e-patrimoine/IMG/jpg/montmajour-5.jpg http://www.pays-arles.org/e-patrimoine/IMG/jpg/montmajour-6.jpg ... ... ... ... This is just a sample of my database... And here is my HTML: spip.php.xml - database I just followed this tutorial Obvious, that don't work, why? And how can I create a condition to get only "Arles" city?
has comment: http://stackoverflow.com/comment/41526386
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41526411
tagged with: ajax
has comment: http://stackoverflow.com/comment/41535374
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/xml
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26364161
tagged with: javascript
tagged with: jquery
has body: When I use the scroller widget and I update the data in the table, the scroller element's height - $(".tablesorter-scroller .tablesorter-scroller-table").height() - remains the same. What I'm trying to do is having the scroller's height be dynamic, so that a table with 50 rows will grow to a maximum of height (defined by widgetOptions.scroller_height), and a table with 2 rows will shrink down. That way, there isn't a huge blank space below the rows. Right now, I'm doing it by just changing the generated inline style property height to max-height. Like so: $(table).tablesorter(tableOptions); //Change the generated "height" inline-style to "max-height" $("#tableContainer .tablesorter-scroller .tablesorter-scroller-table").css("height",""); //this removes "height" from inline style $("#tableContainer .tablesorter-scroller .tablesorter-scroller-table").css("max-height",CONFIG.clipTableHeight); //aka, widgetOptions.scroller_height when setting table Is there a better or correct way to do it? I tried using the following after triggering an update: // Trigger update $("#clipsTable").trigger("update"); // Reset everything $("#clipsTable").trigger("resetToLoadState"); $("#clipsTable").trigger("refreshWidgets",false,true); Thanks for the help Mottie. My final init block looks like this: $(function(){ /* Code to calculate value of CONFIG.clipTableHeight */ /* ... */ CONFIG.clipTableHeight = 140; var tableOptions = { headers: { 0: { sorter: false }, 1: { sorter: false }, 2: { sorter: false } }, sortList: [[0,0]], textExtraction: { 0: function(node){ return $(node).find("input[name='rank']").val(); } }, widthFixed: true, widgets: ['scroller'], widgetOptions: { scroller_height: CONFIG.clipTableHeight, scroller_jumpToHeader: true }, initialized: function(){ $(".tablesorter-scroller-table").css({ height: '', 'max-height': CONFIG.clipTableHeight + 'px' }); } }; $("#myTable").tablesorter(tableOptions); });
favorite count: 0
accepted answer: http://stackoverflow.com/a/26373348
upvote count: 2
has title: Tablesorter scroller's height remains same after triggering update
score: 2
type: AnsweredQuestion
tagged with: tablesorter
type: Question
has answer: http://stackoverflow.com/a/26373348
answer count: 1
downvote count: 0

http://stackoverflow.com/a/26430219
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41511336
score: 1
answers question: http://stackoverflow.com/q/26430160
downvote count: 0
has body: that code is running when the document loads, to set it to the attribute of searchIcon, do searchIcon.attr('href', '#').click(function () { window.location = urlRequestPrefix + searchInput.val(); });
has comment: http://stackoverflow.com/comment/41505547

http://stackoverflow.com/a/26377166
score: 1
has comment: http://stackoverflow.com/comment/41409766
has comment: http://stackoverflow.com/comment/41409898
downvote count: 0
has comment: http://stackoverflow.com/comment/41410187
has comment: http://stackoverflow.com/comment/41409945
type: Answer
answers question: http://stackoverflow.com/q/26377133
upvote count: 1
has body: ID is a unique identifier inside a page. There should never be two elements that have the same id. Try changing that for a class, and use .ajaxloadingimg Change : &lt;div id="ajaxloadingimg" style="display:none;"&gt; To : &lt;div class="ajaxloadingimg" style="display:none;"&gt;
has comment: http://stackoverflow.com/comment/41409946
has comment: http://stackoverflow.com/comment/41409801

http://stackoverflow.com/q/26472174
type: Question
has comment: http://stackoverflow.com/comment/41581976
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/41581729
answer count: 1
downvote count: 1
tagged with: javascript
has body: I'm making a game where the goal is to get pairs of 4 using a normal card deck. When I prompt for which card value the player wants to ask another player, the else if (playerArray[turn].cards.indexOf(card) == -1) ALWAYS evaluates to true, even when the card variable contains a value of the cards array. This makes no sense to me at all and I'm stuck on how to fix this. Any suggestions is greatly appreciated. var playerArray = []; //Holds the player objects var turn = 0; //Keeps track of whose turn it is var wrongCard = true; var card = askCard(player); //Prompt to get a card value function askCard(player) { var whichCard = prompt('The deck has: ' + deck.length + ' cards left in it.\n' + 'Your current cards are: ' + playerArray[turn].cards.join(' - ') + '\n' + player + ', all your:'); return whichCard; } while (wrongCard) { //Run as long as the card input is wrong if (card &lt; 1 || card &gt; 13) { //If card value is not between 1-13 card = askCard(player); } //If the asked card doesn't exist in the current player's cards array else if (playerArray[turn].cards.indexOf(card) == -1) { //ALWAYS TRUE, WHY? card = prompt('The deck has: ' + deck.length + ' cards left in it.\n' + 'Your current cards are: ' + playerArray[turn].cards.join(' - ') + '\n' + player + ', all your:'); } else { wrongCard = false; //Jump out of loop } }
has comment: http://stackoverflow.com/comment/41582110
favorite count: 0
has comment: http://stackoverflow.com/comment/41581723
has comment: http://stackoverflow.com/comment/41582144
has answer: http://stackoverflow.com/a/26472238
has comment: http://stackoverflow.com/comment/41581726
accepted answer: http://stackoverflow.com/a/26472238
has comment: http://stackoverflow.com/comment/41582019
has comment: http://stackoverflow.com/comment/41582074
has comment: http://stackoverflow.com/comment/41582023
has title: Why is this if statement always true when it shouldn't be?
type: AnsweredQuestion

http://stackoverflow.com/a/26490745
score: 0
has body: Use kwargs instead of args: reverse('profile', kwargs={'user_name': username}) You should replace the href='' by href="" to avoid mixing things you don't want to mix (you would need to replace that in several places tho).
type: Answer
answers question: http://stackoverflow.com/q/26490518

http://stackoverflow.com/a/26402816
has comment: http://stackoverflow.com/comment/41458446
accepted answer of: http://stackoverflow.com/q/26402663
has comment: http://stackoverflow.com/comment/41456961
has comment: http://stackoverflow.com/comment/41460588
has comment: http://stackoverflow.com/comment/41458947
has comment: http://stackoverflow.com/comment/41459071
score: 0
has comment: http://stackoverflow.com/comment/41456173
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41458667
has body: Why don't you use &lt;input id="dtpicker" value="" type="button"/&gt; but being type="button" ? And try to use css at the button to get this look like as a link.Type "button" is working look here : http://jsfiddle.net/bLh26hwo/ Styling an input to look like a link: http://jsfiddle.net/yhtrxjus/ The solution for the second part: Built-in onClose event: $('#slider_example').datetimepicker({ ... onClose: function (dateText, inst) { alert('ok'); }, }); Alternative:Add click() eventto the done button like this: $(".ui-datepicker-close").click(function() { alert( "Handler for .click() called." ); });
type: Answer
answers question: http://stackoverflow.com/q/26402663

http://stackoverflow.com/q/26356176
has comment: http://stackoverflow.com/comment/41371239
tagged with: http://stackoverflow.com/tag/html
tagged with: asynchronous
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41371347
type: Question
has body: On my website I have a menu where loads content asynchronously. Is there a way to provide a link to each item on the menu? Here is my jQuery: $(document).ready(function() { init(); $(window).resize(init); $('#floatMenu,#smallMenu').find('>a').click(function() { var t = this; $('#wynik').animate({opacity:0}, 'fast', function() { $(this).load(t.href, function() { $(this).animate({opacity:1}, 'fast'); }) }); //$('#wynik').load(this.href); $(this).addClass('active').siblings().removeClass('active'); }).first().click(); }); Here is my HTML code: TEXT TEXT TEXT TEXT TEXT {* Here is content loading. *} Is the id in the link would have done?
has title: Direct link to asynchronously loaded content
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/41620610
comment on: http://stackoverflow.com/a/26449874
score: 0
type: AnswerComment
has text: The new answer is working well with your Plumker but I would recommend usage of $watchCollection (comes in angular 1.1.4)
type: Comment

http://stackoverflow.com/comment/41410026
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26377116
type: Comment
has text: Can you post the exec part of your php code? You could use `popen()` and read your scripts output, then post back information? Check [this answer](http://stackoverflow.com/a/20109859/824495) for an idea.

http://stackoverflow.com/comment/41437191
comment on: http://stackoverflow.com/a/26391958
type: AnswerComment
has text: thanks for your reply...but i am getting this erro Uncaught TypeError: Cannot read property 'offers' of undefined ...used your return statement...providing my code in fiddle http://jsfiddle.net/bb094yto/
score: 0
type: Comment

http://stackoverflow.com/q/26393980
tagged with: css
has answer: http://stackoverflow.com/a/26394048
type: AnsweredQuestion
type: Question
tagged with: clone
tagged with: javascript
tagged with: duplicates
possible better answer: http://stackoverflow.com/a/26394048
has answer: http://stackoverflow.com/a/26394030
accepted answer: http://stackoverflow.com/a/26394030
score: 0
answer count: 2
has title: How can I control the css of cloned with Javascript?
tagged with: jquery
has body: I´m using sliders to control the background-color of a square. For dynamically manipulating the stylesheet I am using the JQuery function .css() Then I duplicate this square a couple of times with square.clone().insertAfter('#square'); Until now I have three squares which were all affected by the .css() function (see above). But when I move a slider to change the color of the squares, only the first square is affected. However, every square should change the color. How can I do that? See http://jsfiddle.net/0971yehk/

http://stackoverflow.com/q/26356907
tagged with: var
answer count: 0
type: UnansweredQuestion
tagged with: addition
has comment: http://stackoverflow.com/comment/41372822
type: Question
has comment: http://stackoverflow.com/comment/41382131
has body: I am having some problems removing parts of a var. function hotBarClick() { var likeCount = 0; $.each(companies, function (key, value) { if (value.liked) { likeCount++; } if (value.liked &amp;&amp; value.alreadyliked ==false) { var content = value.getHtmlLogo(); matchesHtml.add(content); this.alreadyliked = true; } if (value.liked == false &amp;&amp; value.alreadyliked == true) { var discontent = value.getHtmlLogo(); matchesHtml.remove(discontent); this.alreadyliked = false; } }); I am making a app based on html and javascript. You can like/dislike companies in the neighbourhood. If you liked 5 companies or touch the "hotbar" you will see a slider(owl-carousel) with the logos of the companies you liked. My problem is that if you liked a company first and then dislike it, i cant remove the images from the slider, that were previously shown. var matcheshtml is the var containing this infomation. You can see that in my code i add stuff by matcheshtml.add() but i cant seem to use the .remove() method here? How do i remove the good part? BTW: i think discontent contains the correct value
has title: Remove value from a var
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/26421106
has answer: http://stackoverflow.com/a/26421808
has answer: http://stackoverflow.com/a/26421679
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26421679
has title: Checking if an attribute gets attached to $scope
accepted answer: http://stackoverflow.com/a/26421808
type: AnsweredQuestion
has body: This question really consists of two: 1 - Do functions create their own $scopes in javasript? e.g.$scope.foo = function() { $scope.bar = "Bar"; } I ask this because in one such test that I'm trying to run I check to determine the existence of a variable on the scope, run a function and then recheck: iit('getPatientFirstName should attach patientName to the scope', function() { // Passes expect(scope.patientName).toBeUndefined(); spyOn(scope,'getPatientFirstName').andCallThrough(); scope.getPatientFirstName(detailsBody); // Fails expect(scope.patientName)not.toBeUndefined(); }); // In the controller $scope.getPatientFirstName = function (dataBody) { $scope.patientName = dataBody.patientFirstName; }; So this suggests that they may have their own scope? If this is the case can we test this? 2 - Is a valid alternative just to use an object that exists outside the function: $scope.patientDetails = { patientName: '' }; $scope.getPatientFirstName = function (dataBody) { $scope.patientDetails.patientName = dataBody.patientFirstName; }; Thanks EDIT Considering the two answers has raised another question - is a variable (attribute or object) considered global if its attached to the $scope? It can be accessed in any function in that controller but as far as being called in a completely different controller - yes it can? Confirm/Deny anyone? And it appears that assigning the variable to the $scope global is considered valid for the purposes of my test.
type: Question
score: 0
answer count: 2
tagged with: javascript

http://stackoverflow.com/a/63213122
has body: I got the same error i created the app with create-react-app but in /public/index.html also added matrialize script but there was to connection with "root" so i added just before And it worked for me .
upvote count: 2
has comment: http://stackoverflow.com/comment/116118664
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26416334
downvote count: 0

http://stackoverflow.com/comment/41588277
type: QuestionComment
has text: Do you mean that users hit the button more than once because it takes so long?
score: 0
comment on: http://stackoverflow.com/q/26475445
type: Comment

http://stackoverflow.com/q/26456393
has comment: http://stackoverflow.com/comment/41553346
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41553403
accepted answer: http://stackoverflow.com/a/26593267
possible better answer: http://stackoverflow.com/a/26456581
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41553325
score: 0
has answer: http://stackoverflow.com/a/26593267
has comment: http://stackoverflow.com/comment/41554679
has answer: http://stackoverflow.com/a/26456581
has title: Pull full URL parameter that contains a Hash Tag
has comment: http://stackoverflow.com/comment/41553484
has body: I have a URL that looks like so: example.com/puppy-reservation?puppy=Bitzy's Female #1 I need to read the entire URL parameter. I tried using the following script: $.urlParam = function(name){ var results = new RegExp('[\?&amp;]' + name + '=([^&amp;#]*)').exec(window.location.href); if (results==null){ return null; } else{ return results[1] || 0; } } console.log(decodeURIComponent($.urlParam('puppy'))); When this runs it gives me Bitzy's Female. How do I modify the script to read the entire URL parameter? IE: Bitzy's Female #1 To explain a bit further. My CMS is outputting the name of a database entry. In this case it is Bitzy's Female #1. This is the way it is entered into the CMS. On a page a person can click the URL that you see above: example.com/puppy-reservation?puppy=Bitzy's Female #1 When the page loads I read the URL parameter and insert the name into a few fields on the page. This is why I need to read the full parameter, including the hash tag, so it displays correctly on the page.
type: AnsweredQuestion
tagged with: url-parameters

http://stackoverflow.com/comment/41430150
has text: Yup, that was it, thank you very much! Had to shift a few more things around to stop animating the box if it's already stopped at the bottom. Again, thank you very much!
type: AnswerComment
comment on: http://stackoverflow.com/a/26387895
score: 0
type: Comment

http://stackoverflow.com/q/26500748
has body: Uncaught InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED. uber-graph.js:19 However, here is my code. I don't understand why it is wrong. var uberTemplateFunction = Handlebars.compile($('#page-template').html()); var search = function(Slong, Slat, Elong, Elat){ Slat = encodeURIComponent(Slat); Slong = encodeURIComponent(Slong); Elat = encodeURIComponent(Elat); Elong = encodeURIComponent(Elong); var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4 &amp;&amp; xhr.status === 200) { document.getElementById('ajaxResponse').innerHTML = xhr.responseText; } }; var url = 'https://api.uber.com/v1/estimates/price?start_latitude=' + Slat + '&amp;start_longitude=' + Slong + '&amp;end_latitude=' + Elat + '&amp;end_longitude=' + Elong; xhr.setRequestHeader("Authorization", "Token lFdfJgCSnohPg0LVm8NN3qBviR0-cwl42exRYqAU"); xhr.open('GET', url , true); xhr.send(); // Make the HTTP request $.getJSON(url, function(response){ //can use $ or jQuery console.log(response); var html = ''; for(var i = 0; i &lt; response.prices.length; i++){ html += uberTemplateFunction(response.prices[i]); } $('#results').html(html); }); }; $('form').on('submit', function(e){ e.preventDefault(); var Slat = $('#slat').val(); var Slong = $('#slong').val(); var Elat = $('#elat').val(); var Elong = $('#elong').val(); //console.log(searchTerm); $('#results').html('Loading....'); search(Slat, Slong, Elat, Elong); });
type: UnansweredQuestion
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41633602
has comment: http://stackoverflow.com/comment/41633899
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41633676
score: 0
has title: Uncaught InvalidStateError. Object's State must be Opened.
tagged with: jquery
has comment: http://stackoverflow.com/comment/41633712
tagged with: ajax
has comment: http://stackoverflow.com/comment/41633771

http://stackoverflow.com/a/26425124
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26419362
score: 1
answers question: http://stackoverflow.com/q/26419362
has body: Now its working smoothly using jQuery UI Touch Punch library ....
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/41630010
type: Comment
type: QuestionComment
has text: @hindmost parseInt returns the integer, not hexidecimal
score: 1
comment on: http://stackoverflow.com/q/26482909

http://stackoverflow.com/comment/41501929
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26427344
has text: thanks, you save my time a lot, can you please answer my second question (2)).
type: AnswerComment

http://stackoverflow.com/q/26508129
has comment: http://stackoverflow.com/comment/41647210
downvote count: 1
type: Question
tagged with: javascript
score: -1
has title: Jsonp returned from ajax doesn't show on console
has comment: http://stackoverflow.com/comment/41646984
upvote count: 0
has comment: http://stackoverflow.com/comment/41647103
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41647030
has comment: http://stackoverflow.com/comment/41651184
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41646951
has comment: http://stackoverflow.com/comment/41647279
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41646734
has body: I'm calling a page (external, on other domain), with this code: var instagram_container = $('div#instagram-answer'); if (instagram_container.length&gt;0) { var url = 'http://www.xxxx.it/admin/get_instagram_token'; $.ajax({ type : 'GET', url : url, async : false, jsonpCallback: 'jsonCallback', contentType: 'application/json', dataType: 'jsonp', success: function(response) { console.log(response); instagram_container.html(response.client_id); }, error: function(e) { console.log(e); } }); } I have answer with console.log(e) (basically it recognizes as error)? Object { readyState=4, status=200, statusText="success", altri elementi...} But in Firebug, under NET tab, I have the right answer... This is the console. Line 19 is exactly the console.log(e); in error section. My goal is obtain that Json. Thank you
has answer: http://stackoverflow.com/a/26508204
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/26372074
upvote count: 1
has comment: http://stackoverflow.com/comment/41401723
answers question: http://stackoverflow.com/q/26372010
has comment: http://stackoverflow.com/comment/41401220
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26372010
downvote count: 0
type: Answer
has body: It depends on your scenario. Canvas may or may not allocate an extra memory buffer but typically shares the back buffer with the display buffer. This may not be the case if the pixel ratio is different from 1:1 (ie. retina displays). Also, with canvas, if created using html tags, may be cleared by the browser under certain conditions such as window resize. This seem to be a lesser problem now though then it used to be (Chrome could also clear canvas when showing some dialogs). Converting it to image gives an performance and memory overhead though: first to create the compressed image, then converting it to base-64 with additional 33% memory overhead, then pass it in as image source which triggers converting of the base-64 string into image file and then for decompressing it to bitmap.
score: 1

http://stackoverflow.com/a/26367185
has comment: http://stackoverflow.com/comment/41407130
type: Answer
answers question: http://stackoverflow.com/q/26357520
score: 0
has body: Not sure if this will solve your problem,but you could try setting the Partial-Submit property on the button (command-button not go-button) and it should prevent a page refresh. More here.

http://stackoverflow.com/a/26496757
answers question: http://stackoverflow.com/q/26496720
type: AcceptedAnswer
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/41626657
has body: Problem: Comma , separates autonomous selectors. You have to select #foo first, then select your inner elements table, tr, td, span, p. You can use context attribute: $("table, tr, td, span, p", "#foo").addClass("Myclass"); or you can chain your selectors: $("#foo").find("table, tr, td, span, p").addClass("Myclass");
upvote count: 7
accepted answer of: http://stackoverflow.com/q/26496720
downvote count: 0

http://stackoverflow.com/comment/41543567
has text: It says newElement.createAttribute is not a function
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26451110
type: QuestionComment

http://stackoverflow.com/a/26426116
score: 1
answers question: http://stackoverflow.com/q/26426100
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26426100
has comment: http://stackoverflow.com/comment/41497205
type: Answer
has body: You need to pass a function, which will act as the event handler to it element5.onclick = function (){ location.href='foo.html'; }

http://stackoverflow.com/comment/41520963
has text: Very strange that one of & work fine and another not. May be they are written in different layout? Don't know matter this or not, but check.
comment on: http://stackoverflow.com/q/26438436
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26490647
answers question: http://stackoverflow.com/q/26453602
type: Answer
has body: I found the problem. The only changes I made other than upgrading the ember-cli version was to switch from ember-simple-auth to ember-cli-simple-auth, the Ember Simple Auth base library packaged as an Ember CLI Addon. The latter accepts its configuration in ember-cli's environment.js instead of in an inline script in index.html, as I had done above. This worked: ENV['simple-auth'] = { authenticationRoute: 'login', routeAfterAuthentication: 'index', routeIfAlreadyAuthenticated: 'index', authorizer: 'authorizer:custom', crossOriginWhitelist: ENV.APP.crossOriginWhitelist Note to folks at simple-auth: this was not well-documented, or at least I missed it. -BillyB
score: 0

http://stackoverflow.com/comment/48008831
type: QuestionComment
has text: Well we don't use the sync method anymore. We create new tables and edit them by using the migrations of Sequelize. So after every deployment we directly deploy new changes for our DB. And in our models we use composite primary keys for the junction tables. So just add ```primaryKey: true``` to multiple columns, whose combination makes them unique. So the ```users``` table has an column ```id``` as primary key, ```books``` has an column ```id``` as primary key. But ```user_books``` (= junction table) has 2 primary keys: ```user_id``` and ```book_id``` Not how we want it, but works best.
score: 1
comment on: http://stackoverflow.com/q/26421109
type: Comment

http://stackoverflow.com/q/26429731
score: 1
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26579501
tagged with: angularjs
has body: I'm utilizing a MEAN stack and Socket.io to pull images from the real-time Instagram API. Everything is working great, but I now want to begin saving image data to a MongoDB database so I have a "history" of images from locations (rather than simply the most recent photos). Below is the relevant (working) code I have so far: Node server-side code to handle new photo updates from Instagram API and emit event to Angular controller: // for each new post Instagram sends the data app.post('/callback', function(req, res) { var data = req.body; // grab the object_id (as geo_id) of the subscription and send as an argument to the client side data.forEach(function(data) { var geo_id = data.object_id; sendUpdate(geo_id); }); res.end(); }); // send the url with the geo_id to the client side // to do the ajax call function sendUpdate(geo_id) { io.sockets.emit('newImage', { geo_id: geo_id }); } Angular controller code when 'newImage' event is received: socket.on('newImage', function(geo_id) { // pass geo_id into Instagram API call Instagram.get(geo_id).success(function(response) { instagramSuccess(response.geo_id, response); }); // Instagram API callback var instagramSuccess = function(scope,res) { if (res.meta.code !== 200) { scope.error = res.meta.error_type + ' | ' + res.meta.error_message; return; } if (res.data.length &gt; 0) { $scope.items = res.data; } else { scope.error = "This location has returned no results"; } }; }); Angular factory to handle calls to Instagram API: angular.module('InstaFactory', []).factory('Instagram', function($http) { var base = "https://api.instagram.com/v1"; var client_id = 'MY-CLIENT-ID'; return { 'get': function(geo_id) { var request = '/geographies/' + geo_id.geo_id + '/media/recent?client_id=' + client_id; var url = base + request; var config = { 'params': { 'callback': 'JSON_CALLBACK' } }; return $http.jsonp(url, config); } }; }); I also have the following Angular Controller which currently GETS details of each location from my Stadia mongo…
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41729189
tagged with: socket.io
type: Question
has answer: http://stackoverflow.com/a/26579501
tagged with: javascript
tagged with: mongodb
has title: Saving to MongoDB when Socket.io event is emitted
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26475838
linked to: http://stackoverflow.com/q/12561937
has title: Some questions around clone/copy TR
type: Question
type: AnsweredQuestion
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have this code for clone/copy a tr element from a modal to a page. $(function () { $('#toggleCheckbox').on('click', function () { var $toggle = $(this).is(':checked'); $("input:checkbox").attr('checked', $toggle); $('#btnAplicarNorma').prop('disabled', !$toggle); }); $('#resultadoNormaBody').on('change', 'input[type=checkbox]', function () { var $my_checkbox = $(this); var $my_tr = $my_checkbox.closest('tr'); if ($my_checkbox.prop('checked')) { $my_tr.addClass('copyMe'); } var $all_checkboxes = $my_checkbox.closest('tbody').find('input[type=checkbox]'); $all_checkboxes.each(function () { if ($(this).prop('checked')) { $('#btnAplicarNorma').prop('disabled', false); return false; } $('#btnAplicarNorma').prop('disabled', true); }); }); $('button#btnAplicarNorma').on('click', function (ev) { var $tr_to_append = $('#resultadoNormaBody').find('tr.copyMe'); $('#tablaNorma').removeAttr('style'); $('#alertSinNorma').hide(); if ($tr_to_append.length) { $tr_to_append.find('input[type=checkbox]').prop('checked', false); $tr_to_append.clone().appendTo('#normaBody').removeClass('copyMe'); $tr_to_append.removeClass('copyMe'); $(this).prop('disabled', true); } }); }); But I'm having some issues: If I mark all checkboxes using the first on the table head then I the code stop working and doesn't clone any tr even if all of them are marked How do I avoid to clone/copy the same tr twice? It's possible to modify the checkbox before clone it? If you take a look at the example you'll notice how the clone tr copy exactly as the one on the modal and I want to uncheck the checkbox first, it's possible? Here is a fiddle to play with, any advice?
linked to: http://stackoverflow.com/q/8392192
tagged with: http://stackoverflow.com/tag/html
score: 1
has answer: http://stackoverflow.com/a/26477334
accepted answer: http://stackoverflow.com/a/26477334
upvote count: 1

http://stackoverflow.com/q/26400238
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Populate multiple dropdownlists from sql and previous selected value
has answer: http://stackoverflow.com/a/26400448
tagged with: php
tagged with: dropdownbox
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/41450881
has comment: http://stackoverflow.com/comment/41450643
type: Question
has body: I have code in php to query database and populate records in a dropdown list which a user will pick. I also have javascript which populates the second dropdown list based on the selection of the first box. How do I tie these two together so user selects value "x" from dropdown list, and the php will query the database "WHERE.... = SselectedValue" Are there any examples online? I can't seem to find any.
accepted answer: http://stackoverflow.com/a/26400448
tagged with: javascript

http://stackoverflow.com/a/26385559
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: You can use script defer attribute, it will make all your scripts load AFTER html is renderer. So it's equal to put all scripts under document ready. Here is the link: http://www.w3schools.com/tags/att_script_defer.asp
answers question: http://stackoverflow.com/q/26385452

http://stackoverflow.com/comment/41633694
type: Comment
comment on: http://stackoverflow.com/q/26500674
type: QuestionComment
has text: When you test it - you call window.thirdPartyFn() - and it updates the scope?
score: 0

http://stackoverflow.com/a/37268045
type: Answer
answers question: http://stackoverflow.com/q/26504770
has body: I believe I know what you are looking for. I had to do something similar to improve the zoom/pan performance when tens of thousands of features on many layers were displayed on the map. For panning I set the layers' visibility to false when the first map 'pointerdrag' event is triggered and set them back to visible in the 'moveend' event (you may need some additional handling to avoid redundant actions and data reloads). For zooming it is a bit trickier but fortunately you can override the ol.interaction.MouseWheelZoom handler by using a custom function: ol.interaction.MouseWheelZoom.handleEvent = myFunction(evt){ // here you set the layers to invisible and set the new map zoom level // based on the event's wheel value... } After that in the 'zoomend' event handler you make the layers visible. If you just use buttons to zoom in/out then it's easy to hide/show the layers. It worked for me and it is a good workaround in some situations.
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26504770

http://stackoverflow.com/comment/41678328
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26502192
has text: You have hit the magic restart key on your machine, happens all the time ;)
type: Comment

http://stackoverflow.com/q/26443702
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26444023
has body: My requirement is a simple one , but no definite answer is available for this one on the net. I have a combobox in my jade page which takes numbers as input.I want the same page to refresh and have as many textboxes as the number specified. I know this requires Ajax, but I am not able to figure out how it can be used in Jade.Any suggestions would be greatly appreciated.
has title: Add textboxes dynamically in a form, using Jade template engine
type: Question
tagged with: javascript
score: 0
upvote count: 1
tagged with: pug
answer count: 1
downvote count: 1
favorite count: 0
tagged with: ajax

http://stackoverflow.com/a/26418925
answers question: http://stackoverflow.com/q/26418219
score: 0
has body: After your kendo grid binding you can bind click event to link-button like below and see here in action In below demo observe $('a.k-Linkbutton.link').on("click", function () {}); demo First One 1 st Second Two 2 nd
type: Answer

variables
tag name: variables
tags question: http://stackoverflow.com/q/26500511
tags question: http://stackoverflow.com/q/26418153
tags question: http://stackoverflow.com/q/26458157
tags question: http://stackoverflow.com/q/26431465
tags question: http://stackoverflow.com/q/26451917
type: Tag
tags question: http://stackoverflow.com/q/26354696
tags question: http://stackoverflow.com/q/26453842
tags question: http://stackoverflow.com/q/26463939
tags question: http://stackoverflow.com/q/26451762
tags question: http://stackoverflow.com/q/26406331
tags question: http://stackoverflow.com/q/26364704
tags question: http://stackoverflow.com/q/26486068
tags question: http://stackoverflow.com/q/26363016
tags question: http://stackoverflow.com/q/26482692
tags question: http://stackoverflow.com/q/26366232
tags question: http://stackoverflow.com/q/26445819

http://stackoverflow.com/comment/41457800
type: Comment
has text: I tried this before, but when I used display: block; it didn't worked.
comment on: http://stackoverflow.com/a/26404485
type: AnswerComment
score: 0

http://stackoverflow.com/a/26480588
has comment: http://stackoverflow.com/comment/41597439
has body: Your click event on the span (delete button) is bubbling up and triggering the click event on the .tools element, which is your edit button. You can prevent the event from bubbling up using event.stopPropagation(): $(".tools").find('span').live("click",function(e){ e.preventDefault(); e.stopPropagation(); alert('clicked on delete'); }); Side note: .live() is deprecated as of jQuery 1.7, in favor of .on().
accepted answer of: http://stackoverflow.com/q/26480533
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26480533
has comment: http://stackoverflow.com/comment/41597306
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41597572

http://stackoverflow.com/q/26494646
score: 1
favorite count: 0
type: UnansweredQuestion
has title: converting tex commands (latex) to mathml
has comment: http://stackoverflow.com/comment/41623992
has comment: http://stackoverflow.com/comment/41624182
tagged with: mathjax
upvote count: 1
has body: I noticed that while clicking on math equation, we are given choices to view the source of the Tex Commands as well as view the mathml. Is there a way that I can compile Tex Commands wrapped in between $$ into mathml code directly using JavaScript library?
type: Question
has answer: http://stackoverflow.com/a/26505323
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26431948
tagged with: vb.net
answer count: 1
has body: Is it possible to pass the generic list of addresses to client side in java script? List data is availble at server side, i want to send the list to java script function which will get geocoding for all addresses and then return the list to server side. User clicks the search On Page Post back, list is generated. Before results are shown on the page, call the java script function and loop through the list and get the geocodes and update the list and return the results to server. Show the results on page. Here what i have tried so far, don't know how to read list in javascript function and then return the results to server. Private Shared Function CreateGenericArray() As List(Of AddressInfo) Dim _AddressInfo As New List(Of AddressInfo)() Dim lp As New AddressInfo() lp.AddressID = 1 lp.AddressLine1 = "My Address" lp.City = "PA" lp.PostalCode = "11654" _AddressInfo.Add(lp) Return _AddressInfo End Function Public Sub ConvertToJSON() Dim jss1 As New JavaScriptSerializer() Dim _myJSONstring As String = jss1.Serialize(CreateGenericArray()) Dim player As String = (Convert.ToString("var player=") &amp; _myJSONstring) + ";" Page.ClientScript.RegisterClientScriptBlock(Me.[GetType](), "player123", player, True) End Sub &lt;form id="form1" runat="server"&gt; &lt;script type="text/javascript"&gt; $(player).each(function (index, person) { alert('AddressID: ' + person.AddressID + ' AddressLine1: ' + person.AddressLine1 + ' City: ' + person.City ); }); &lt;/script&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/41508698
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41526302
downvote count: 4
linked to: http://stackoverflow.com/q/11826936
has comment: http://stackoverflow.com/comment/41508945
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41508706
has comment: http://stackoverflow.com/comment/41509345
tagged with: javascript
has comment: http://stackoverflow.com/comment/41509120
has answer: http://stackoverflow.com/a/26432348
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41508639
accepted answer: http://stackoverflow.com/a/26432348
score: -2
tagged with: asp.net
linked to: http://stackoverflow.com/q/15747264
has title: How to pass Generic List from code behind to javascript
upvote count: 2

http://stackoverflow.com/comment/41451717
type: Comment
comment on: http://stackoverflow.com/q/26400591
type: QuestionComment
score: 0
has text: requesturl.php: $course = $_GET["course"] if($course){ //execute Database query and store it in $result echo json_encode($result); }

http://stackoverflow.com/a/26479177
score: 0
answers question: http://stackoverflow.com/q/26478592
type: Answer
has body: If you've gone through that document, created an API key for yourself then in your application your script source should look something like this: You will just replace the "key=YOURAPIKEY". This is how Google tracks who is using its service.

http://stackoverflow.com/comment/41529677
score: 0
type: QuestionComment
type: Comment
has text: it lets you put 4 numbers into one integer, so the resulting array is 1/4th the length. this can make some operations faster, and reduce the footprint of the image data.
comment on: http://stackoverflow.com/q/26443341

http://stackoverflow.com/comment/41635482
comment on: http://stackoverflow.com/q/26501566
type: Comment
has text: @EliasVanOotegem Friend what are the examples illustrated
score: 0
type: QuestionComment

http://stackoverflow.com/a/56105546
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/26459379
type: Answer
upvote count: 1
has body: For Magento 2, Navigate to Stores > Configuration > Sales > Checkout > Shopping Cart. Look for "After Adding a Product Redirect to Shopping Cart".

http://stackoverflow.com/q/26459577
has title: Add an extra get method in asp.net web api
type: AnsweredQuestion
tagged with: asp.net-mvc
score: 1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41558892
has answer: http://stackoverflow.com/a/26459912
downvote count: 0
tagged with: asp.net-web-api
tagged with: javascript
has body: I'm a very new comer to the asp.net web api world. I've got the basic understanding of get(), put(), post() and delete. In my application, I require two more get() method. An explanation is given below- public class StudentController : ApiController { public IEnumerable Get() { //returns all students. } //I would like to add this method======================= [HttpGet] public IEnumerable GetClassSpecificStudents(string classId) { //want to return all students from an specific class. } //I also would like to add this method======================= [HttpGet] public IEnumerable GetSectionSpecificStudents(string sectionId) { //want to return all students from an specific section. } public Student Get(string id) { //returns specific student. } } There is already a $http.get(..) in angularjs controller. My question is, how can I call the two additional get() methods from angular controller.
has comment: http://stackoverflow.com/comment/41558931
tagged with: angular-http
favorite count: 0
possible better answer: http://stackoverflow.com/a/26459783
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26459912
has answer: http://stackoverflow.com/a/26459783
upvote count: 1

http://stackoverflow.com/comment/41508669
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26431894
has text: Also, why do you want this?

http://stackoverflow.com/a/26387881
score: 1
accepted answer of: http://stackoverflow.com/q/26377842
type: Answer
answers question: http://stackoverflow.com/q/26377842
upvote count: 1
has body: It's not how I'd go about it but if you have to use that 'weird' format you could use a RegEx to split it into parts: /{template (.*?)}(.*?)\{\/template\}/g Note, this assumes you've stripped the new-lines from the template string but you could adapt the expression as required. Regex101 is great for testing your expressions. var obj = {}, str = "{template templateA}templateA content{/template}{template templateB}templateB content{/template}{template templateC}templateC content{/template}", rx = /{template (.*?)}(.*?)\{\/template\}/g, item; while (item = rx.exec(str)) obj[item[1]] = item[2]; console.log(obj); alert(JSON.stringify(obj)); //outputs {"templateA":"templateA content","templateB":"templateB content","templateC":"templateC content"}
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26452750
answers question: http://stackoverflow.com/q/26449429
score: 2
upvote count: 3
has body: They changed module name so update it: var app = angular.module('app', [ 'ngRoute', 'ngSanitize', 'ngResource', 'ngAnimate', 'google-maps'.ns(), // new namespace 'angular-loading-bar', 'ui.bootstrap', 'ui.utils', 'AppControllers', 'AppFactories', 'AppDirectives', ]); as update in point 4. https://angular-ui.github.io/angular-google-maps/#!/use
downvote count: 1
has comment: http://stackoverflow.com/comment/58948285
type: Answer

http://stackoverflow.com/a/26483846
has comment: http://stackoverflow.com/comment/41604019
score: 0
has comment: http://stackoverflow.com/comment/41603204
has comment: http://stackoverflow.com/comment/41603732
has comment: http://stackoverflow.com/comment/41604724
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41610029
has comment: http://stackoverflow.com/comment/41605532
type: Answer
accepted answer of: http://stackoverflow.com/q/26483513
answers question: http://stackoverflow.com/q/26483513
has comment: http://stackoverflow.com/comment/41607726
has body: What you've tried should've worked. You can pass $scope.configType to the directive with tag="configType" and use it in the ng-if like so ng-if="isTabOpen(configType)" var app = angular.module('app', []); app.controller('ctrl', function ($scope) { $scope.configHead = ['style', 'color', 'glass', 'details']; $scope.activeTabs = ['style']; $scope.configType = $scope.activeTabs[0]; $scope.isTabOpen = function (tab) { return $scope.activeTabs.indexOf(tab) != -1 } }); app.directive('ydConfig', function($log) { return { restrict: 'E', scope: { tag: '=' }, /*templateUrl: function(element, attrs) { return attrs['template']; }*/ template: '{{ tag }}' }; });
has comment: http://stackoverflow.com/comment/41863114
has comment: http://stackoverflow.com/comment/41604599

http://stackoverflow.com/comment/41396983
type: Comment
comment on: http://stackoverflow.com/q/26369801
type: QuestionComment
has text: Perhaps there's some threatment attached to the input's change. Try calling the `textFieldElement.onchange()` after changing the value.
score: 0

http://stackoverflow.com/comment/41565263
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26463316
type: Comment
has text: To fetch the latest version on demand of the user, you would need to be using a server side language I believe.

http://stackoverflow.com/comment/129094155
comment on: http://stackoverflow.com/a/26387427
type: AnswerComment
score: 0
type: Comment
has text: What happens if the computer sleeps? Will setTimeout be off by the amount that it sleeps? Polling seems to be the better approach here.

http://stackoverflow.com/comment/41425108
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26385104
has text: That is because of the animation that you have provided in the `animated` class. You need to reset them for ng-repeat animation classes..Check this:- http://plnkr.co/edit/9l78bS?p=preview When you have ngAnimate included in your module, it will add nganimate classes to the element and tries to apply the animation duration specified.

http://stackoverflow.com/q/26437113
linked to: http://stackoverflow.com/q/17382427
upvote count: 1
has comment: http://stackoverflow.com/comment/41518626
has answer: http://stackoverflow.com/a/26437287
possible better answer: http://stackoverflow.com/a/35579996
tagged with: javascript
tagged with: pointers
has answer: http://stackoverflow.com/a/35579996
tagged with: go
has comment: http://stackoverflow.com/comment/41518509
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/26437287
favorite count: 0
has body: I'm a JavaScript coder who's learning Go. I'm following this tutorial: http://tour.golang.org/#52 package main import ( "fmt" "math" ) type Vertex struct { X, Y float64 } func (v *Vertex) Abs() float64 { return math.Sqrt(v.X*v.X + v.Y*v.Y) } func main() { v := &amp;Vertex{3, 4} fmt.Println(v.Abs()) } I read in Wikipedia and in the Go docs what pointers are, but I still can understand them. Can anyone explain them to me in JavaScript language?
type: Question
answer count: 2
has title: Can anyone explain to me in JavaScript language what "pointers" are?

http://stackoverflow.com/a/26509726
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26509525
has comment: http://stackoverflow.com/comment/41649903
has body: Here's the problem: var user = new shop.addItem (title, description, price); shop.addItem() This is calling shop.addItem() twice: once as a constructor, with the arguments title, descriptor and price, and a second time as a normal method with no arguments. It's the second call that inserts an empty item (since all the arguments will be undefined).
accepted answer of: http://stackoverflow.com/q/26509525
has comment: http://stackoverflow.com/comment/41649818
has comment: http://stackoverflow.com/comment/41650198
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41650497
has comment: http://stackoverflow.com/comment/41650623

http://stackoverflow.com/q/26405405
has comment: http://stackoverflow.com/comment/41460074
type: AnsweredQuestion
type: Question
has title: HTML5 Canvas, How to show animated attacks between two points
tagged with: javascript
score: 0
tagged with: canvas
has body: I want to show attack animation between two points (source &amp; target) on HTML5 canvas, similar to http://map.ipviking.com/ Below code making missile movement too slow at the end when distance remain short and does not seems real like a missile attack velocityX = target.x - missile.shift.x; velocityY = target.y - missile.shift.y; missile.shift.x += velocityX * .001; missile.shift.y += velocityY * .001; Please help!
answer count: 1
has answer: http://stackoverflow.com/a/26405773
accepted answer: http://stackoverflow.com/a/26405773
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41565848
type: Comment
score: 0
has text: i tried this one, it will replace it , but only one time . means when i type "<<<<" it returns "lessthan<<<"
type: QuestionComment
comment on: http://stackoverflow.com/q/26463620

http://stackoverflow.com/comment/73787158
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26436037
has text: Did you solve this one? I'm having the same issue, only in firefox 45, 46 and 47...

http://stackoverflow.com/q/26452833
tagged with: javascript
score: 0
has body: I have a Session value that contains the value of an account that I want to set as the selected value while populating a Select statement. When I try and get the value using this.value I get "Unexpected identifier". How can I look at this outside of an Event Handler? Templates: {{> account_selector}} To or From: < {{#each accounts}} {{#if selectedAcct}} {{this}} {{else}} {{this}} {{/if}} {{/each}} Helper Functions: Template.account_selector.accounts = function() { // account_categories is a Global array of pre-defined categories var pairings = []; for (var b = 0, l = account_categories.length; b < l; b++) { var category= account_categories[b]; var acctName = ""; var accountCursor = account_categories[b].find(); accountCursor.forEach( function(acct) { acctName = acct.acct_name; if (acctName > "") { pairings.push(category + ":" + acctName); } }); } return pairings; }; Template.account_selector.selectedAcct ({ var thisAcct = this.value; ... Unexpected identifier ... });
answer count: 1
tagged with: meteor
accepted answer: http://stackoverflow.com/a/26453084
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26453084
type: Question
has title: Meteor value of option element outside of event

http://stackoverflow.com/comment/41573579
comment on: http://stackoverflow.com/a/26467877
type: AnswerComment
score: 0
type: Comment
has text: @JamesThorpe Is it safe to use '#' in URL?

http://stackoverflow.com/comment/41592408
type: QuestionComment
comment on: http://stackoverflow.com/q/26477206
has text: I get an address like 192.168.... which is what shows up next to my IPv4 address when i run 'ipconfig' which doesn't work with the module I'm using. When I go to whatismyip.org I get an address like 99.245..... which 100% works with my application
score: 0
type: Comment

http://stackoverflow.com/comment/41600896
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26480807
has text: What are you trying to do? Why do you want to get your barcode smaller? What's your actual css? Why is your barcode 22% width? We need more information to help you.

http://stackoverflow.com/q/26449789
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41542178
has answer: http://stackoverflow.com/a/26449825
has answer: http://stackoverflow.com/a/26450355
has body: I have a page with a button named "projects",a div id="main"> and a label inside it. The main text of the page is written in the label. When I press the button, the text changes, using the label.text = .. inside the button_Click event inside C#. This is the button: &lt;asp:Button ID="projects" runat="server" OnClick="projects_Click"/&gt; What I want to do is to add a fading effect when changing the text. I saw that the easiest way was to use jQuery. I added this: &lt;head&gt; &lt;script type='text/javascript'&gt; $(function () { $("#projects").click(function (e) { e.preventDefault(); $('#main').fadeOut(1000); $("#main").fadeIn(1000); }); }); &lt;/script&gt; &lt;/head&gt; What happens now is that if I press the projects button, the text only fades out and then it fades in, but it's not changed, projects_Click isn't executed. If I remove e.preventDefault(); , the text changes but there is no fading effect. How can I make them work together? Old text fades out, projects_Click is executed and fadeIn comes into action.
has title: asp.net & jquery fade effect
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41541785
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41543993

http://stackoverflow.com/a/26361326
score: 6
answers question: http://stackoverflow.com/q/26361108
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: In JavaScript, 'url:contains("testthis")' is viewed as a string and is truthy. if('your text'){ // code here will always be executed. } This code should work: &lt;script&gt; if(document.location.href.indexOf('testthis') &gt; -1) { // indexOf will return the position of the first occurence of this string in the url // or -1 it it's not there. document.location.href = 'http://www.test.com'; } &lt;/script&gt;
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26361108

http://stackoverflow.com/comment/41659254
has text: The code above is inside a test (the `it` method). There is no one to receive it so the promise returned from my `em.fetchEntityByKey` is not forwarded to a caller. But your controller would be calling into a method that wrapped this whole thing ... perhaps a method called `getSite()`. `getSite` should return the promise and so would be written `return em.fetchEntityByKey( ...`.
type: Comment
comment on: http://stackoverflow.com/a/26445623
score: 0
type: AnswerComment

intel-xdk
tags question: http://stackoverflow.com/q/26380531
tags question: http://stackoverflow.com/q/26451128
type: Tag
tags question: http://stackoverflow.com/q/26470202
tag name: intel-xdk
tags question: http://stackoverflow.com/q/26425128

http://stackoverflow.com/comment/41516526
comment on: http://stackoverflow.com/a/26435643
type: AnswerComment
type: Comment
score: 0
has text: and the asker said '_I need to get top,left,right and bottom element of the selected element_', that is why i did not include the corner value :-)

http://stackoverflow.com/comment/41638836
has text: I have considered them but they are to big for php echo output.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26503605

http://stackoverflow.com/comment/41558463
has text: use `return`, `false` when error, `true` otherwise in your validate function
score: 0
comment on: http://stackoverflow.com/q/26459382
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26367312
has body: How does the browser render contents of the html canvas? Things like context.lineTo(x, y). There must be some component that converts all the function calls to pixel data. What I actually want to know is if there is some way to get this pixel data without actually rendering it somewhere. I want to know if we can run some sort of stand alone javascript engines (v8) and pass javascript code to it and get pixel data as the output.
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26368573
tagged with: javascript
has title: How do browsers render contents of a canvas element
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
tagged with: web
has answer: http://stackoverflow.com/a/26370354
accepted answer: http://stackoverflow.com/a/26370354
has answer: http://stackoverflow.com/a/26368573
type: AnsweredQuestion

http://stackoverflow.com/comment/41475435
type: Comment
has text: why are you trying to pass dynamic url to javascript code and not pull the url from DOM links themselves?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26413473

http://stackoverflow.com/a/26404671
has body: Remove all .error_messages before adding them: function validateForm(field){ $(".error_message").remove(); if(!field.value.trim()){ var msg = field.getAttribute("data-lv-msg"); $(field).after('&lt;div class="error_message"&gt;'+msg+'&lt;/div&gt;'); field.focus(); return false; } }
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26404616
downvote count: 0

http://stackoverflow.com/a/72288096
type: Answer
has body: as a function : function isValidInt32(number){ return Number.isInteger(number) &amp;&amp; number &gt; -2147483648 &amp;&amp; number &lt; 2147483647; }
answers question: http://stackoverflow.com/q/26504604
score: 0

http://stackoverflow.com/comment/41606603
type: AnswerComment
has text: Did you saw jQuery in the tags ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26486000

http://stackoverflow.com/comment/41512438
has text: Just to verify here, you realize that although it is AJAX and handled client side, it is not more "real-time" than if the application was built in PHP. The AJAX requests will only occur when a change has been made, so in theory if you had multiple editors in there at once, they won't necessarily immediately see each others changes.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26433619
type: Comment

http://stackoverflow.com/a/26489592
accepted answer of: http://stackoverflow.com/q/26489542
type: Answer
has comment: http://stackoverflow.com/comment/41613742
upvote count: 3
has comment: http://stackoverflow.com/comment/41613158
score: 3
has body: You're not returning anything if(recAmt === 0) { if (tier === 1) { getRecAmt(value - 10000, tier); } } else { return recAmt; } needs to be if(recAmt === 0) { if (tier === 1) { // RETURN STATEMENT HERE return getRecAmt(value - 10000, tier); } } else { return recAmt; } Here's a snippet to demonstrate var totalCost = 34000, options = [10000, 0], recAmt; if (totalCost &gt;= 30000) { recAmt = getRecAmt(30000, 1); console.log(recAmt); } function getRecAmt(value, tier) { console.log('Trying: ' + value + ' for ' + tier); var i2 = 0, recAmt = 0; for (i2 = 0; i2 &lt; options.length; i2 += 1) { if (value === parseInt(options[i2])) { recAmt = value; console.log('Found: ' + recAmt); } } if(recAmt === 0) { if (tier === 1) { return getRecAmt(value - 10000, tier); } } else { return recAmt; } }
has comment: http://stackoverflow.com/comment/41613218
has comment: http://stackoverflow.com/comment/41613656
answers question: http://stackoverflow.com/q/26489542
has comment: http://stackoverflow.com/comment/41613582
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41615468

http://stackoverflow.com/comment/99030232
score: 3
has text: Welcome to Stack Overflow. Please read about [asking questions](https://stackoverflow.com/help/asking). When adding answers to older questions with existing answers it is useful to explain what new information your answer has that the existing ones don't have.
type: AnswerComment
comment on: http://stackoverflow.com/a/56203755
type: Comment

http://stackoverflow.com/a/26556243
type: Answer
answers question: http://stackoverflow.com/q/26480006
has body: After further debugging, I found that at the time the graph was trying to plot the divs within the tab had no size, but the tab itself did. Thus I reasoned it was something to do with tab activation. To get this to work, I had to: Disable the automatic activation of the 1st tab Activate the tab via javascript after a short delay (1/10 second) This statement did not work: $('#tabs a:first').tab('show'); Doing this did work: setTimeout(function () { $('#tabs a:first').tab('show'); }, 100);
score: 0

http://stackoverflow.com/comment/41454061
comment on: http://stackoverflow.com/q/26380895
score: 0
has text: yes it can be but I think that the query is wrong because if I write the query without the second array it works. Even when I don't have any cycle but 2 strings/arrays which I want the ids, it doesn't work.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41462086
score: 0
has text: jquery is fine. the real question is how do i change the value depending on if the user selects binghamotn from the dropdown
comment on: http://stackoverflow.com/q/26406273
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26461926
tagged with: http://stackoverflow.com/tag/json
tagged with: web-crawler
type: Question
tagged with: javascript
score: 0
has body: I am working on web crawler and i found some of the website populate their content by JSON. This makes me hard time to get the data using SIMPLE HTML DOM. Is there any way to get the final HTML Code that I could able to see in the inspect element?
has title: Get the HTML source code including the content populated by JSON
answer count: 1
has answer: http://stackoverflow.com/a/26461962
has comment: http://stackoverflow.com/comment/41590306
type: UnansweredQuestion
tagged with: simple-html-dom
tagged with: php
linked to: http://stackoverflow.com/q/6578132

http://stackoverflow.com/q/26482905
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41603474
has comment: http://stackoverflow.com/comment/41601446
type: Question
has title: Return angular ngView to nothing
has body: I have routes in my Angular script like so: app.config(function($routeProvider) { $routeProvider .when("/contact", { templateUrl : "views/contact.html", controller : "GeneralCtrl" }); }); Now I have links that will happily take me to the contact page like so: Contact Now I have another link that I want to remove the view so the site goes back to looking as it did before the user clicked on the contact link. The following doesn't work and refreshes the page: Home How do I get this to work? If I declare it in the routes config, what would I put as template and controller? It has none. I need it to apply the ng-leave classes to the view as well. I am using Angular 1.3.
tagged with: javascript
has answer: http://stackoverflow.com/a/26483107
has comment: http://stackoverflow.com/comment/41601290
score: 0
has comment: http://stackoverflow.com/comment/41601517
answer count: 1
has comment: http://stackoverflow.com/comment/41601334

http://stackoverflow.com/comment/41465091
type: Comment
type: QuestionComment
has text: Yes, I did think it might be something along them lines. However the only error occurring is from above, which is located in a .js file (that is merged/combined with all the rest with Magento to increase load times).
comment on: http://stackoverflow.com/q/26405367
score: 0

http://stackoverflow.com/q/26466045
accepted answer: http://stackoverflow.com/a/26466141
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41569965
score: 1
has answer: http://stackoverflow.com/a/26466141
has answer: http://stackoverflow.com/a/26466217
type: Question
has body: If I have the following string: hello goodbye Can I set that string as the content of a div but keep the carriage returns? jQuery('&lt;div class="myTooltip"&gt;').text(theString); Atm, .text() returns this: hello&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; goodbye I am unable to use .html() because of cross side scripting concerns. Could I perhaps use some regex on my string to keep the carraige returns from being converted to text? If not regex, is there another option?
downvote count: 0
has answer: http://stackoverflow.com/a/26466264
tagged with: javascript
has title: Keep specific HTML tags after string is passed into .text() function
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
possible better answer: http://stackoverflow.com/a/26466217
favorite count: 0
upvote count: 1

http://stackoverflow.com/q/26440552
has body: &lt;head&gt; &lt;script src="jquery-latest.js" /&gt; &lt;script&gt; function makeitnull(){ alert('inside make it null'); //using hex routine 1 -&gt; 3 -&gt; 5 -&gt; 8 -&gt; (11 == a) document.getElementById("u_0_1").value = "" ; document.getElementById("u_0_3").value = "" ; document.getElementById("u_0_5").value = "" ; document.getElementById("u_0_8").value = "" ; document.getElementById("u_0_a").value = "" ; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;script&gt; $( document ).ready(function() { alert('before make it null'); makeitnull(); alert('make it null pahse passed'); $('#u_0_5').click (function(){ $('#js_1').removeClass('hidden_elem'); }); }); &lt;/script&gt; The Problem is that the alert('make it null'); is working but after the function call rest of the code won't work. I am newbie to the web development on internet i tried to find out my problem but unbale to get the reasonable answer.
answer count: 1
tagged with: web
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26440601
has comment: http://stackoverflow.com/comment/41524753
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41527674
duplicate of: http://stackoverflow.com/q/14028959
has title: How to properly call JS from Jquery
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41526486
has comment: http://stackoverflow.com/comment/41524800
tagged with: javascript
score: 0

backbone-events
tags question: http://stackoverflow.com/q/26397772
tags question: http://stackoverflow.com/q/26444929
type: Tag
tags question: http://stackoverflow.com/q/26511888
tags question: http://stackoverflow.com/q/26368287
tag name: backbone-events

http://stackoverflow.com/comment/41523651
comment on: http://stackoverflow.com/q/26440014
has text: At least try a google search before you post questions...
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/26440147
accepted answer: http://stackoverflow.com/a/26440814
has title: use local storage to remember the high score javascript?
has answer: http://stackoverflow.com/a/26440814
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26440270
tagged with: local-storage
type: Question
tagged with: if-statement
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26440270
has body: I am building a simple tapping game as practice but I can't make it remember the top score. Here is my code: GO 0 I think that the problem is the if statement or the localStorage in the if statement could someone tell me how I can store the best score thanks.

http://stackoverflow.com/a/44339914
score: 8
upvote count: 8
has body: Use combineLatest or forkJoin! // Assume you have an array of urls const urls = [ "twitter.com/puppies.json", "google.com/puppies.json", "facebook.com/puppies.json" ]; // Let's map these urls to Ajax Observables const requests = urls.map(url =&gt; Rx.DOM.Ajax.getJSON(url)) // Now combine the result from each request into an observable // Here's combineLatest: const allThePuppies$ = Rx.Observable.combineLatest(...urls) // Alternatively, here's forkJoin: const allThePuppies$ = Rx.Observable.forkJoin(urls) // When you subscribe to `allThePuppies$`, you'll kick off all your requests in parallel, and your response will contain an array with the results from each request: allThePuppies$.subscribe(results =&gt; { const twitterPuppies, googlePuppies, facebookPuppies = results; // Do what you must with the respective responses // (Presumably in this example you'd show your users some adorable pics of puppies) }) combineLatest takes in an arbitrary number of observables, and once each of them have emitted at least one value, it will emit an array of the latest value from each observable when any of those observables fires. That's terribly abstract, though. For our purposes, we know that a handful of ajax requests will realistically only emit once. So, if we use combineLatest for a handful of ajax observables, we'd end up with an observable that emits an array of results from each of the ajax requests. forkJoin is similar to combineLatest, but it only emits its array of responses once each of its constituent observables has completed.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26448724

http://stackoverflow.com/a/26654783
type: Answer
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26504850
has body: Ok. Finally I found it!! I reviewed the web where the plugin author records different mousewheel events, including deactivating all of them and reseting a normal scrolling mouse. There's where I found the use of the function .unmousewheel(), just what I wanted! But now, as the script is not able to find further slides past de last when scrolling down, and before the first when scrolling up, it became impossible to access content before and after #scroller with the scrolling wheel. That's why I had to change a bit the script and force a jump while on the first slide or the last. Anyway, here's the script: jQuery(document).ready(function($) { var slide = $('#scroller .sectioncontainer'); var sectionHeight = $(window).height(); var slideHeight = slide.height(); var scrollingScreen = false; slide.mousewheel(function(event, delta) { if ( !scrollingScreen ) { scrollingScreen = true; // prevent call var top = $("body").scrollTop() || $("html").scrollTop(); // Chrome places overflow at body, Firefox places whacks at html... // Finds slide headers above/below the current scroll top var candidates = slide.filter(function() { if ( delta &lt; 0 ) return $(this).offset().top &gt; top + (1/120); else return $(this).offset().top &lt; top - (1/120); }); // one or more slides found? Update top if ( candidates.length &gt; 0 ) { if ( delta &lt; 0 ) top = candidates.first().offset().top; else if ( delta &gt; 0 ) top = candidates.last().offset().top; } else{ // no more slides found if ( delta &lt; 0 ) top = $("#contact").offset().top; else if ( delta &gt; 0 ) top = $("#about").offset().top; } // Perform animated scroll to the right place $("html,body").animate({ scrollTop:top }, "easeInOutQuint", function() { scrollingScreen = false; // Release call }); } return false; }); $("#contact").unmousewheel(); $("#about").unmousewheel(); $("#div1").unmousewheel(); $("#div2").unmousewheel(); $("#div3").unmousewheel(); $("#div4").unmousewheel(); $("#div5").unmousewheel(); // . . . //and all other…
answers question: http://stackoverflow.com/q/26504850
type: AcceptedAnswer
score: 1

http://stackoverflow.com/comment/41427341
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26367953
has text: @mc01 Thank you. I'm studying javascript, trying to do as much as possible w/out jQuery :)

http://stackoverflow.com/a/26390824
type: Answer
answers question: http://stackoverflow.com/q/26390759
score: 0
has body: You can try this: $("input[name='sex']").change(function () { if ($(this).val() == "female") { $("#age").attr("disabled", true); $("#age, #hobbies, #phone").css("background-color", "green"); $("#phone").attr("disabled", true); } else if ($(this).val() == "male") { $("#age").attr("disabled", false); $("#phone").attr("disabled", false); $("#age, #hobbies, #phone").css("background-color", "white"); } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="radio" name="sex" value="male"&gt;Male &lt;br/&gt; &lt;input type="radio" name="sex" value="female"&gt;Female &lt;br/&gt;Age: &lt;input type="text" name="age" id="age" size="20"&gt;Hobbies: &lt;input type="text" name="hobbies" id="hobbies" size="20"&gt; &lt;br/&gt;Phone: &lt;input type="text" name="phone" id="phone" size="20"&gt; &lt;br/&gt;

http://stackoverflow.com/comment/41597695
score: 2
has text: no, since your JSON decoder will do that for you, leaving a string. You'll then have to recognise that the string contains a function body and then pass it either to `new Function()` or `eval` (bleuch) to turn it into an actual function.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26480808

http://stackoverflow.com/comment/41629226
comment on: http://stackoverflow.com/q/26498111
has text: no I didnt, thats why Im asking.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41372612
type: Comment
type: QuestionComment
has text: http://api.jquery.com/event.stoppropagation/
comment on: http://stackoverflow.com/q/26356881
score: 0

http://stackoverflow.com/a/26370047
type: Answer
has comment: http://stackoverflow.com/comment/41397935
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41397825
has comment: http://stackoverflow.com/comment/41397878
has comment: http://stackoverflow.com/comment/41397974
answers question: http://stackoverflow.com/q/26369786
has body: This should fix your problem, your main problem was with quotes and scopes &lt;script type="text/javascript"&gt; var invoiceData = $('h2').text(); var invoiceNo = invoiceData.substr(14); var priceBeforeCurrencyStrip = $('td.priceCol.balance').text(); var price = parseFloat(priceBeforeCurrencyStrip.match(/[0-9.]+/)); var url = "www.google.com/test.js" var script = document.createElement('script'); script.setAttribute("src","http://"+url+"&amp;SaleID="+invoiceNo+"&amp;OrderVal="+price); script.setAttribute("type","text/javascript"); var body = document.getElementsByTagName("body"); body.appendChild(script); &lt;/script&gt;
downvote count: 0
has comment: http://stackoverflow.com/comment/41397866

http://stackoverflow.com/a/26423155
score: 2
has body: You are seeing that line number because it really is where console.info is called. A way I can think to avoid that is by calling the real console method rather than proxying with an intermediate function. It seems to me you want to have an abstraction layer to handle your logging using the native console or a custom one. In that case you could try something like this: var c = (typeof console === 'object') ? console : alternative; And then use it as: c.log('Hello World'); That way your alternative object could be one with the methods you are considering on using, for instance: var alternative = { log: function() { window.alert.apply(window, arguments); } }; This way you won't get your c() function but, I think, you'll end up with a more flexible solution. By exposing the same interface that console has you could even add these logging facilities to any code running in your app (that is, 3rd party code using native console) window.console = (typeof window.console === 'object') ? window.console : alternative or if you are feeling very lazy that day :) window.console = window.console || alternative This is no perfect technique at all but if you are only using it while developing it might help. Also, I never really participate in Stack Overflow so I'm very sorry if I'm ignoring any rule or etiquette :)
has comment: http://stackoverflow.com/comment/41492510
answers question: http://stackoverflow.com/q/26422773
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/q/26406916
has body: i have dropdown to select current month and year, i am getting the values properly. now i need to pass that values into some other div how to get the dropdown selected default values in another div as a simple text?? it should change if selected values change Fiddle to describe http://jsfiddle.net/k1v7ga49/1/ Dropdowns Select Year 2014 2013 2012 Select Month January February March April May June July August September October November December javascript var d = new Date(), month = d.getMonth() + 1, year = d.getFullYear(); $('.select2 option:eq(' + month + ')').prop('selected', true); $('.select1').val(year); $('.select2').on('change', function () { var selectedYear = ($("option:selected", $('.select1')).text()); if (selectedYear != "Select Year") { selectedMonth = ($("option:selected", this).text()); loadData(selectedYear, selectedMonth); } }); i want selected values in this div (in #monthValue) Current timeperiod is : MY EXPECTED RESULT: Current timeperiod is :2014 OCTOBER
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26407003
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/26407550
has answer: http://stackoverflow.com/a/26407006
has answer: http://stackoverflow.com/a/26407353
has title: how to get the dropdown selected default values in another div as a simple text
accepted answer: http://stackoverflow.com/a/26407006
answer count: 4
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41462576
score: 1
possible better answer: http://stackoverflow.com/a/26407003
type: Question
has comment: http://stackoverflow.com/comment/41463159
upvote count: 1

http://stackoverflow.com/q/26385939
has comment: http://stackoverflow.com/comment/41426602
has title: Iterate over every element and get only the content that is directly in the node
tagged with: php
downvote count: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26386451
tagged with: javascript
tagged with: jquery
score: 1
has answer: http://stackoverflow.com/a/26386394
tagged with: phpquery
has comment: http://stackoverflow.com/comment/41426363
has body: let's assume I have this code FirstLevelP SecondLevelSpan FirstLevelP SecondLevelSpan ThirdLevelP Is it possible to iterate through every element that I have right now, but only get the content, that's in the direct node of it, modify the text and then have it in the original content? Example, If I go through every $('p').each and would extract the text I would also get the text inside the span. Basically this: FirstelElement: FirstLevelPSecondLevelSpan SecondElement: SecondLevelSpanSecondLevelSpanThirdLevelP But I want to have it like this FirstelElement: FirstLevelP SecondElement: SecondLevelSpan ThirdElement: FirstLevelP FourthElement: SecondLevelSpan FifthElement: ThirdLevelP Is this possible? In my research I already found this answer here $("#foo") .clone() //clone the element .children() //select all the children .remove() //remove all the children .end() //again go back to selected element .text(); But this would only solve half of my problems. I would still need to modify the text in the original content! Thanks in advance guys. EDIT FOR CLARIFICATION So basically, want I want to achieve is something like this: For every element, I want to check if there is a dot at the end. If not I want to add one. I already managed to do this for headlines, like this: foreach (pq($content)->filter(':header') as $headline) { if (substr(pq($headline)->text(), 0, -1) != '.') { $content = preg_replace('#(' . pq($headline) . ')#', pq($headline) . '.', pq($content)); } } The problem, as I stated, is, that when I have nested elements it would add the dot after the whole element, and not after each sub element if neccessary. To work with my "assumed" code, it should look like this FirstLevelP. SecondLevelSpan. FirstLevelP. SecondLevelSpan. ThirdLevelP. But unfortunatley, it currently looks like this FirstLevelP SecondLevelSpan. FirstLevelP SecondLevelSpan ThirdLevelP . Note the dots.
favorite count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/41490178
comment on: http://stackoverflow.com/q/26422316
score: 0
type: QuestionComment
has text: Why would you use ` ` instead of ` `? It has more or less the same effect except that the way `iframes` are handled (especially around JS) is much better documented.
type: Comment

http://stackoverflow.com/q/26464903
has title: Use gridDnD and sortableRows in the Same jqGrid
answer count: 0
has comment: http://stackoverflow.com/comment/41577376
linked to: http://stackoverflow.com/q/8155853
type: Question
has comment: http://stackoverflow.com/comment/41570210
has body: After a long day try to find solution, I finally ask for help, This is my situation: I have 3 jqGrid: A, B and C. A => (can be drag and drop) B,C (add new row to B or C) B &lt;=> C and C &lt;=> B (B,C are the same and can be transfer data together) Everything still OK with gridDnD, until i got new request from customer, that they want rows in grid B and C can also sortable I have tried to use sortableRows function, but it seem to be sortableRows doesn't working with gridDnD. Have you ever face this case? Can someone help me to solve this? Or any advice to help me? Thanks in advance :)
tagged with: jquery-ui
tagged with: jqgrid
tagged with: javascript
score: 0
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/a/26494414
score: 1
answers question: http://stackoverflow.com/q/26493665
has body: One further approach, is as follows: function gid(a_id) { return document.getElementById(a_id); } function close_all() { // applies the Array.prototype.forEach() method to the array-like nodeList // returned by document.querySelectorAll() (the string passed to which finds all // elements with an id that starts with ('^=') the string 'user_': [].forEach.call(document.querySelectorAll('[id^=user_]'), function(div) { // 'div' is the array element (the node) itself: div.style.display = 'none'; }); } function find_my_div() { close_all(); // getting the trimmed lower-cased string from the input element, split // on white-space characters to create an array: var keywords = gid('edit_search').value.trim().toLowerCase().split(/\s+/), // as above, selecting all elements whose id starts with the string 'user_': haystack = document.querySelectorAll('[id^="user_"]'), // working out whether text is accessed by node.textContent, or node.innerText: textProp = 'textContent' in document.body ? 'textContent' : 'innerText', // an initialised variable, for later: userWords, // filters the haystack (the divs whose id starts with 'user_'): found = [].filter.call(haystack, function(user) { // assigns the lower-cased string to the created-variable: userWords = user[textProp].toLowerCase(); // returns those div elements whose text contains some of // the words returned, earlier, as the keywords: return keywords.some(function (word) { return userWords.indexOf(word) > -1; }); }); // iterates over the found elements, and shows them: [].forEach.call(found, function(user) { user.style.display = 'block'; }); } Andy Daulton Owner Nissan Doug Guy Bug Collector Sam Hilton Famous Celebrity in Hollywood Don Grey Old man Amy Hinterly Cook Gary Doll Racecar Driver Tod Akers Football Player Greg Barkley Interior designer Alen Simmons 8th place winner References: CSS: Attribute-presence and value selectors. JavaScript: Array.prototype.every(). Array.prototype.filter(). Array.prototype.forEach(). Array.prot…
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41622330
has comment: http://stackoverflow.com/comment/41622181
downvote count: 0

http://stackoverflow.com/comment/41454687
type: Comment
type: QuestionComment
has text: You should first learn [the differences between server side scripting and client side scripting](https://programmers.stackexchange.com/questions/171203/what-are-the-difference-between-server-side-and-client-side-programming).
comment on: http://stackoverflow.com/q/26402689
score: 3

http://stackoverflow.com/q/26423950
type: AnsweredQuestion
upvote count: 2
score: 1
tagged with: php
has comment: http://stackoverflow.com/comment/41493052
downvote count: 1
has comment: http://stackoverflow.com/comment/41493539
type: Question
has answer: http://stackoverflow.com/a/26424541
has body: Is it possible to use DOM Document to pull javascript values? &lt;script type="text/javascript"&gt; var datePickerDate = "October 14, 2014"; $(document).ready(function(){ // meetings datepicker $("#datepicker").datepicker({ showOn: 'button', buttonImage: '/images/calendar.gif', buttonImageOnly: true, onSelect: function(dateText, inst) { populate_meetings(dateText, 0) }, dateFormat: 'd MM yy', minDate: new Date(2009, 0, 1), maxDate: 0 }); $('#datepicker').datepicker('option', 'defaultDate', new Date("October 14, 2014")); $('#datepicker').val("October 14, 2014"); }); //call on page load to get meetings and date populate_meetings("October 14, 2014", 15515); &lt;/script&gt; this is output in the html so i know its there... and i want to read the date so pull var datePickerDate = so it returns October 14, 2014 -- alittle more clarification--- im using domdocument to scrape a site and grab the html like so $html = file_get_contents($url); //set the main page html code that will be resused $dom = new DOMDocument(); // load html @$dom-&gt;loadHTML($html); within the html is some javascript that has a date in it.... i would like to grab that date and stick it in a veriable populate meetings just populates a dropdown box with the dates
has comment: http://stackoverflow.com/comment/41493292
has title: Using DOMDOCUMENT to pull JavaScript values
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26424541
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26426566
type: AcceptedAnswer
type: Answer
score: 2
has body: TL;DR: Consoles are not governed by any standard and depend on the browser. It works as expected. Try adding breakpoints and step through each line in the code, and you'll see that they execute as expected. A much more crude approach is paralyze your script with alert(). However, behavior is still vendor-dependent. No guarantees.
downvote count: 0
answers question: http://stackoverflow.com/q/26426397
accepted answer of: http://stackoverflow.com/q/26426397
upvote count: 2

http://stackoverflow.com/comment/41590256
has text: Question edited to answer your questions. Thank you!
score: 0
comment on: http://stackoverflow.com/q/26475916
type: Comment
type: QuestionComment

flash
tags question: http://stackoverflow.com/q/26476003
tags question: http://stackoverflow.com/q/26461525
tags question: http://stackoverflow.com/q/26367792
tags question: http://stackoverflow.com/q/26418247
tag name: flash
tags question: http://stackoverflow.com/q/26400222
type: Tag
tags question: http://stackoverflow.com/q/26507447
tags question: http://stackoverflow.com/q/26510935

http://stackoverflow.com/q/26433462
has answer: http://stackoverflow.com/a/26434701
type: AnsweredQuestion
tagged with: breeze
has body: I am quite confused at this whole JavaScript and its asynchronous calls. It is a simple function really, or so I thought. I have a function that searches two different databases for a site id. If the site id cannot be found in db1, then it has to search db2 and save that site in db1. Pass in a siteId Search siteId in db1 Cannot find siteId in db1, search db2 Get the site from db2 Save the site in db1 Search db1 for the site again Return the site to display to UI My code below: var xSite=''; function getSite(siteId) { xSite = siteId; var predicate = Predicate.create('siteId', '==', siteId); return EntityQuery.from(entityNames.site) //db1 .where(predicate) .using(manager).execute() .then(querySucceeded, _queryFailed); function querySucceeded(data) { if (data.results.length == 0) { logError('Site Not Found!'); //staticDb is a separate datacontext staticDb.getStaticSites(xSiteId).then(function(data) { addSiteToOrg(data[0], 8); save().then(function() { common.$timeout(function() { return EntityQuery.from(entityNames.site) .where(predicate) .using(manager).execute() .then(querySucceeded2, _queryFailed); }, 1250); }); }); } else { activeSite = data.results[0]; if (activeSite.devices.length == 0) { getSystemsAtSite(activeSite); } return activeSite; } function querySucceeded2(data) { activeSite = data.results[0]; //this value is correct if (activeSite.devices.length == 0) { getSystemsAtSite(activeSite); } return activeSite; } } function addSiteToOrg(site, org) { var newSite = manager.createEntity('Site', { siteId: site.siteID, siteName: site.name, country: site.country }); } function save() { return manager.saveChanges() .then(saveSucceeded, saveFailed); function saveSucceeded(result) { logSuccess('Saved data', result, true); } function saveFailed(error) { var msg = config.appErrorPrefix + 'Save failed: ' + breeze.saveErrorMessageService.getErrorMessage(error); error.message = msg; logError(msg, error); throw error; } } What actually happens is something out of chaos: (Numbe…
type: Question
has title: AngularJS Asynchronous calls with multiple databases and a save not in the correct order
has answer: http://stackoverflow.com/a/26445623
possible better answer: http://stackoverflow.com/a/26434701
accepted answer: http://stackoverflow.com/a/26445623
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41586503
has comment: http://stackoverflow.com/comment/41588905
has comment: http://stackoverflow.com/comment/41512664
score: 0
has comment: http://stackoverflow.com/comment/41512595
tagged with: angularjs

http://stackoverflow.com/comment/41399990
score: 0
has text: Ah, this is in my background script, which exlains why I am not seeing anything for extension opens. To track each open, where is the proper place for this? Use an `app.run();` call?
comment on: http://stackoverflow.com/q/26370891
type: Comment
type: QuestionComment

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/26413564
tags question: http://stackoverflow.com/q/26509520
tags question: http://stackoverflow.com/q/26360315
tags question: http://stackoverflow.com/q/26458517
tags question: http://stackoverflow.com/q/26471138
tags question: http://stackoverflow.com/q/26507127
tags question: http://stackoverflow.com/q/26416304
tags question: http://stackoverflow.com/q/26431039
tags question: http://stackoverflow.com/q/26371410
tags question: http://stackoverflow.com/q/26510254
tags question: http://stackoverflow.com/q/26406881
tags question: http://stackoverflow.com/q/26357595
tags question: http://stackoverflow.com/q/26380951

http://stackoverflow.com/q/26466388
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41570937
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26469287
has title: How to manually inject partial from controller in angularjs
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26469287
upvote count: 2
has body: I am new to Angular world and struggling on how to controll the loading of partials. In my app on a changing the value of drop down I am getting the template url (the url of the partial I want to render) from server. Now using that template url I want to load that partial in my page. I know inserting a partial can be done using directives, but how do I change the template url in directive to load different partials? In simple word, I've change partial method in my controller which gets template url from server, and on ng-change event I am invoking this function, now how I use the template url to render partial in my targeted placeholder?

http://stackoverflow.com/comment/41539053
comment on: http://stackoverflow.com/q/26448665
score: 0
type: Comment
type: QuestionComment
has text: Please, clarify what you exactly mean by "interface"

http://stackoverflow.com/comment/41600361
score: 0
type: Comment
has text: I suppose this is just an unreported bug that will be fixed in the latest version. Interesting that it only happens with old devices. Our app dev tablet runs Android 4.0.3.
comment on: http://stackoverflow.com/a/26472445
type: AnswerComment

http://stackoverflow.com/q/26372534
tagged with: angularjs-ng-options
has comment: http://stackoverflow.com/comment/41401830
type: Question
accepted answer: http://stackoverflow.com/a/26372614
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41401868
has comment: http://stackoverflow.com/comment/59649080
has body: I have the following json: [ { "normal" :{ "font": "Burlington Script.ttf", "fontFamily": "sf_burlington_scriptregular", "fontName": "Burlington Script" }, "bold" : { "font": "SF_Burlington_Script_Bold.ttf", "fontFamily": "sf_burlington_scriptbold", "fontName": "Burlington Script" }, "italic" : { "font": "SF_Burlington_Script_Italic.ttf", "fontFamily": "sf_burlington_scriptitalic", "fontName": "Burlington Script" }, "bold-italic": { "font": "SF_Burlington_Script_Bold_Italic.ttf", "fontFamily": "sf_burlington_scriptBdIt", "fontName": "Burlington Script" } }, { "normal" :{ "font": "Some_Script.ttf", "fontFamily": "Some_scriptregular", "fontName" : "Some Script" }, "bold" : { "font": "Some_Script_Bold.ttf", "fontFamily": "Some_scriptbold", "fontName" : "Some Script" }, "italic" : { "font": "Some_Script_Italic.ttf", "fontFamily": "Some_scriptitalic", "fontName" : "Some Script" }, "bold-italic": { "font": "Some_Script_Bold_Italic.ttf", "fontFamily": "Some_scriptBdIt", "fontName" : "Some Script" } } ] what i want to do is display the fontName in the drop down under "normal" only and have the value be fontFamily. I have tried &lt;select ng-model="selectedFont" ng-options="fonts as fonts.normal.fontName for fonts in designFonts" required&gt; &lt;/select&gt; but no luck. i am setting $scope.designFonts in my controller to whatever the json is.
has title: Parsing object in ng-options for angularjs select drop down using nested json
tagged with: angularjs-ng-model
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41401874
tagged with: angularjs
has answer: http://stackoverflow.com/a/26372614

http://stackoverflow.com/comment/41550074
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26446086
type: AnswerComment
has text: Fundamentally what I said remains correct: A) you have an event handler causing the behavior you're seeing, B) that event handler is (presumably) coming from an instance of a Backbone View, C) if you disconnect that handler, ie. by calling `undelegateEvents` on the appropriate `View` it will fix your problem. Beyond that, I recommend that you edit your question to include the code for your `LoginView` and `RegisterView` classes, as well as your `Router`. Otherwise it will be difficult, if not impossible, to help you.

http://stackoverflow.com/comment/41640096
comment on: http://stackoverflow.com/a/26503933
type: Comment
has text: Yes, you're right, but that's equal to my code, right? I cannot understand why it does not work on my web page.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26390549
has body: I'm tryng to crete menu with submenus the submenu should be behind the picture of the main menu but with negative z index the links no longer work. Maybe you have other solutions that would be great, please help me. $(document).ready(function(){ $("#centeredmenu li:has(ul)").hover(function(){ $(this).find("ul").slideDown();},function(){ $(this).find("ul").hide();});}); #centeredmenu { list-style:none; top:0; width:100%; height:200px; background-color:blue; background:url(http://s30.postimg.org/z2m19gfun/Menueleiste.png) ; background-repeat:no-repeat; background-position:center; background-size:100% 100%; /* Menu font */ vertical-align: middle; text-align:center; } .parent { position: relative; z-index: initial; list-style:none; } .child { position: relative; display:; z-index:-1; } /* Top menu items */ #centeredmenu ul { margin:0px; padding:0px; list-style:none; float:right; position:relative; right:50%; } #centeredmenu ul li { margin:0px; padding:0px; float:left; width:300px; position:relative; left:50%; } #centeredmenu ul li a { display:block; text-decoration: none; margin:0; padding:.8em .6em .4em; font-size:1em; line-height:1em; /* Top menu items font colour */ color:#fff; font-weight: 500; } #centeredmenu ul li.active a { /* Top menu active items font colour */ color:#fff; font-weight:500; } #centeredmenu ul li a:hover { /* Top menu items background colour */ background:; /* hover colour */ text-shadow:#fff 1px 1px 1px; } #centeredmenu ul li:hover a, #centeredmenu ul li.hover a { /* Top menu items background colour */ background:; } /* Submenu items */ #centeredmenu ul ul li:last-child a {-moz-border-radius: 0px 0px 15px 20px; -webkit-border-radius: 0px 0px 15px 30px; border-radius: 0px 0px 5px 10px; box-shadow: 0 8px 2px -2px #000; } #centeredmenu ul ul { display:none; /* Sub menus are hiden by default */ position:absolute; top:; left:0; right:auto; /*resets the right:50% on the parent ul */ width:100%; /* width of the drop-down menus */ } #centeredmenu ul ul …
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/26393053
type: Question
has title: submenu ( with links ) behind (z index) the main menu image
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26393053
favorite count: 0

http://stackoverflow.com/comment/41490982
has text: @l2aelba : Only problem with `.getBoundingClientRect()` : it gives screen coordinates (ie topleft corner is 0,0), but not coordinates in `absolute` positionning in the `container` ` `...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26421777

http://stackoverflow.com/q/26476963
score: 0
type: Question
tagged with: javascript
tagged with: contact-form-7
has title: need help to subtract value radio buttons javascript code
tagged with: radio-button
answer count: 1
has body: how to subtract, two values from two sets of radio buttons.? My radio buttons: Baby Plan [radio BPSUBPT id:BPSUBPT "Baby Plan $300.00 3 Sessions" "Baby Plan $500.00 4 Sessions"] Did you have a Newborn session With ADP? [radio BUSPQ1 id:BUSPQ1 "Yes $150.00 off" "No $000.00"] my java code that I have to calculate the total: ( but it adding it up I would like it to subtract to get the total. $(document).ready(function() { var inputs = $('input[name="BPSUBPT"], input[name="BUSPQ1"]'); $(inputs).click(function() { var total = 0; $(inputs).filter(':checked').each(function() { var value = ($(this).val()).match(/\$([0-9]*)/)[1]; total = total + parseInt(value); }) $('#total').html('$' + total); how do I get it to subtract to get a total.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42315227
has answer: http://stackoverflow.com/a/26879234

http://stackoverflow.com/q/26398537
has title: Do I need node.js to use Angularjs?
has comment: http://stackoverflow.com/comment/64903545
has comment: http://stackoverflow.com/comment/41447890
upvote count: 80
has answer: http://stackoverflow.com/a/62534404
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/40770429
score: 80
has answer: http://stackoverflow.com/a/26398691
type: Question
has answer: http://stackoverflow.com/a/26398662
has comment: http://stackoverflow.com/comment/65082346
has comment: http://stackoverflow.com/comment/41447853
downvote count: 0
possible better answer: http://stackoverflow.com/a/26398691
tagged with: javascript
has body: I would like to use angular.js for my Image Editing Tool in my website. Do I need node.js also? I don't understand the scenario. If I don't need it, then when do we use both nodejs and angularjs together?
answer count: 7
has answer: http://stackoverflow.com/a/26398805
tagged with: node.js
favorite count: 0
has answer: http://stackoverflow.com/a/40770429
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41447965
has answer: http://stackoverflow.com/a/26398837
has answer: http://stackoverflow.com/a/26398683

http://stackoverflow.com/comment/41634003
score: 0
comment on: http://stackoverflow.com/q/26500601
has text: Why use click event for mobiles? Why not touch events?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41409553
type: Comment
type: QuestionComment
has text: This is a webkit bug -- https://bugs.webkit.org/show_bug.cgi?id=83438
comment on: http://stackoverflow.com/q/26372401
score: 0

http://stackoverflow.com/comment/41550027
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26454540
has text: @dejakob

http://stackoverflow.com/a/26506897
has body: let's say you save this code in a html-file named something.html $(".documentholder").load("something.html"); in this case the class "documentholder" is the container you put the code in
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26506781

http://stackoverflow.com/comment/41379407
has text: After logging in into some page, for example, like banking or any other transactions, u can't go back to the previous page. For disabling that back button property I am asking..
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26360573
type: AnswerComment

http://stackoverflow.com/q/26373786
tagged with: parse-platform
answer count: 0
type: UnansweredQuestion
has body: While I build the query in cloud code, I have or conditions on fields as well as other conditions on other fields. For an instance, I'd like to get the records which has specified zip code or empty value. Query would be as following if I use Parse.Query.or(); var Offer = Parse.Object.extend("Offer"); var query1 = new Parse.Query(Offer); query1.doesNotExist("zipCode"); var query2 = new Parse.Query(Offer); query2.exists("zipCode"); query2.equalTo("zipCode", zipCode); query = Parse.Query.or(query1, query2); I have no problem if I have a such condition but it's tough to have similar conditions on multiple fields.
tagged with: conditional-statements
has comment: http://stackoverflow.com/comment/41413806
type: Question
has comment: http://stackoverflow.com/comment/41430069
tagged with: javascript
tagged with: parse-cloud-code
score: 0
has title: Or conditions on multiple fields in parse javascript query

http://stackoverflow.com/a/26379949
answers question: http://stackoverflow.com/q/26379246
downvote count: 0
score: 1
has body: Couple of things. Did you know about gis.stackexchange.com? They might better solve your problem. What you're trying to do is find the centre of a polygon assuming those points aren't all in a line. Here's a link with an answer to the question I think you're asking https://gis.stackexchange.com/questions/7998/how-can-i-calculate-the-center-point-inside-a-polygon-in-arcgis-9-3 The solution posted there uses getExtent().getCenter() as seen here var myPolygonCenterLatLon = myPolygon.getExtent().getCenter();
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41494630
type: Comment
has text: i think bxSlider for content slider
comment on: http://stackoverflow.com/a/26424843
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41651141
type: QuestionComment
comment on: http://stackoverflow.com/q/26510457
score: 0
type: Comment
has text: @j08691: I'm looking for everything that can help. Methodology, piece of code, jquery extensions, tools, way of thinking, everything.

http://stackoverflow.com/comment/41399505
comment on: http://stackoverflow.com/a/26370832
type: Comment
has text: I understand what you're asking, I just don't understand what you're trying to accomplish. See my updated answer.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41422630
type: Comment
has text: yep @Sirko, at the very top of my js file: var cookies = 0; var cursors = 0;
comment on: http://stackoverflow.com/q/26384013
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41520790
has text: @StephenMuecke where should i put this code to render after html ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26438120
score: 0

http://stackoverflow.com/comment/41461081
has text: I don't have a json file however, I am getting data from the database. I could try to create a json file and refer that to test it. Or is that what you mean?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26406157

http://stackoverflow.com/q/26416276
has comment: http://stackoverflow.com/comment/41480291
score: 0
has comment: http://stackoverflow.com/comment/41480106
linked to: http://stackoverflow.com/q/7730695
has comment: http://stackoverflow.com/comment/41480490
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/81159709
has comment: http://stackoverflow.com/comment/41479904
tagged with: php
has comment: http://stackoverflow.com/comment/81159506
answer count: 0
tagged with: mysql
has comment: http://stackoverflow.com/comment/41480252
type: Question
has title: PHP form submission doesn't work. The $_POST[] variables are undefined
has comment: http://stackoverflow.com/comment/41480211
has body: I know I must be doing some small mistake somewhere but its been last 4 hours and I'm still scratching my head as to where is the mistake hence help would be greatly appreciated. So I've a form in php and I try submitting it to itself. Basically my form is in register.php and it includes register.inc.php file through include_once 'register.inc.php'; There is another page namely home.php which also includes register.inc.php and does its form processing from there. Though I've different criteria to differentiate from which page is the page register.inc.php called but for clarifications, I'll add codes from both. Here is my home.php. <form action = "<?php echo esc_url($_SERVER['PHP_SELF']); ?>" method = "post" name = "key"> Enter the Unique (10 letter) you received to proceed : <?php echo $err; ?> esc_url() is custom built function and works fine. Here is my register.php file. <form action="<?php echo esc_url($_SERVER['PHP_SELF']); ?>" method="post" name="registration_form"> Full Name: <input type='text' name='fullname' id='fullname' value = "<?php echo $fullname; ?>" disabled/> Email: <input type="text" name="email" id="email" value = "<?php echo $email; ?>" disabled/> Username: Password: Confirm password: Project Name: <input type="text" name="project" id="project" value = "<?php echo $project; ?>" disabled/> Phone Number: <input type="text" name="phone" id="phone" value = "<?php echo $phone; ?>" disabled/> I've a js file named forms.js which does encryption of password in client side before sending it to server. So here is my js file just in case required. (Though it works fine. There is no problem due to it. I've verified it.) function regformhash(form, uid, , fullname, email, phone, project, password, conf) { var p = document.createElement("input"); // Add the new element to our form. form.appendChild(p); p.name = "p"; p.type = "hidden"; p.value = hex_sha512(password.value); // Make sure the plaintext password doesn't get sent. password.value = ""; conf.value = ""…
has comment: http://stackoverflow.com/comment/41480135
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/41497645

http://stackoverflow.com/comment/41603894
comment on: http://stackoverflow.com/a/26484596
score: 1
has text: If you look at the error, it's running it with bash. It needs to be installed globally.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26356249
answer count: 1
has answer: http://stackoverflow.com/a/26356997
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41371396
score: 0
has title: create thicker border to the end of the row in rowspan using jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41371321
type: UnansweredQuestion
has body: I have created a dynamic table and have the rowspan then to create thick border end of the row when rowspan is available in table. Please help me the issues javascript/Jquery...
type: Question

http://stackoverflow.com/q/26434382
has answer: http://stackoverflow.com/a/26434514
has comment: http://stackoverflow.com/comment/41513963
score: 0
has title: Is a hash table faster than document.getElementById?
tagged with: javascript
has body: If I have a node like this: Test Burried under lots of levels of HTML and I also have a JavaScript hash table like this: [ /* lots of nodes here */ { 123 : 'Test' } /* lots of nodes here */ ] Then would it be faster to use document.getElementById('spn123').innerText; or data(123) I would assume that both are handled by the browser natively and are very optimized, but would the latter be faster due to its flat structure and lack of additional DOM bloat? Thanks!
answer count: 3
has comment: http://stackoverflow.com/comment/41513525
has comment: http://stackoverflow.com/comment/41513810
possible better answer: http://stackoverflow.com/a/26434514
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26434637
accepted answer: http://stackoverflow.com/a/26434550
has comment: http://stackoverflow.com/comment/41513514
type: Question
has comment: http://stackoverflow.com/comment/41513552
has answer: http://stackoverflow.com/a/26434550
tagged with: dom

http://stackoverflow.com/q/26388742
upvote count: 0
answer count: 1
has title: how to calculate difference bewteen each line number like excel in javascript or java
favorite count: 0
type: UnansweredQuestion
tagged with: excel
tagged with: node.js
has body: I have a given list of data, which contains the following records, the records are for give fiscal year, from jan-decemebr Date order 1/1/10 787668 1/2/10 787789 1/3/10 788031 1/4/10 788240 ............. ............. ............. 12/29/10 839832 12/30/10 839965 12/31/10 840238 In excel it's easy to get the difference between two given consecutive, date create a formula and drag it and it will display the difference I have to the same thing in Node.js or Java, is there any Java API or java script, node_module present so that i can just the input as orders and the output will be the difference between two consecutive data, the sample example Order diff 787668 119 787787 161 787948 32 787980 114 788094 30
has answer: http://stackoverflow.com/a/26389390
tagged with: java
downvote count: 1
type: Question
tagged with: javascript
score: -1

http://stackoverflow.com/q/26461880
has comment: http://stackoverflow.com/comment/41562918
has comment: http://stackoverflow.com/comment/41562929
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41563063
has comment: http://stackoverflow.com/comment/41562731
has body: I wrote following code, but it is not returning tDate value, receiving undefined error. console.log shows result, I think I using global variable wrong way. seems like after the loop, tDate still not initiated,(inside the loop it is receiving value) how do I define global variable? function getDates(){ var tDate; var pool = new ConnectionPool(poolConfig, config); pool.requestConnection(function (err, connection) { if(!err) { var sql = "SELECT MAX(Date) from datatable"; var request = new Request(sql, function(err, rowCount) { if (err) { console.log(err); } // Release the connection back to the pool. connection.close(); }); request.on('row', function(columns) { columns.forEach(function(column) { if (column.value === null) { console.log('NULL'); } else { var date = column.value; var sDate = new Date(date); sDate = sDate.toISOString().slice(0,10); tDate = 'Today= ' + sDate; console.log(tDate); } }); }); connection.on('connect', function(err) { connection.execSql(request); }); } }); return tDate; }
has answer: http://stackoverflow.com/a/26461994
type: Question
has comment: http://stackoverflow.com/comment/41562814
accepted answer: http://stackoverflow.com/a/26461994
tagged with: javascript
has title: javascript global variable and return value
score: 0
answer count: 1

http://stackoverflow.com/comment/41634947
type: QuestionComment
comment on: http://stackoverflow.com/q/26501347
score: 0
has text: @jasonscript yes sir im just wondering about that..
type: Comment

http://stackoverflow.com/comment/41623050
type: Comment
score: 2
has text: You haven't created anything at that point. You added a string to a string. You haven't created anything on the DOM, so there will be nothing returned for `$('#' + k)` because it doesn't exist.
type: QuestionComment
comment on: http://stackoverflow.com/q/26494711

http://stackoverflow.com/comment/132579433
type: AnswerComment
has text: @JRichardsz yes this question is about an interop issue that occurred in 2015 (8 years ago). The interop issue has been resolved since then. Are you really using these old browsers? The `navigator.getUserMedia` API has been replaced by `navigator.mediaDevices.getUserMedia`. And StackSnippets have been modified in a way they don't support gUM requests anymore. Honestly I'm not sure how I should update this answer as the question itself is out of date.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27837229

http://stackoverflow.com/q/26494081
upvote count: 1
has body: So the code I'd 'like' to work is below. I have a variable name as the name of the key of the object unread, which seems to be in the only way of doing this in MongoDB is by creating an object outside and referencing it as the value for $inc. This doesn't seem to work, it does work however if I just have a key partnerId without nesting the object. My question is how do i get it working with nested objects. Does work: var partnerId = 234567; var action = { unread: {} }; action[partnerId] = 1; Threads.update(Session.get('currentChat'), { $inc: action }, callback); Does not work, but would like it to work: var partnerId = 234567; var action = { unread: {} }; action.unread[partnerId] = 1; Threads.update(Session.get('currentChat'), { $inc: action }, callback); I get an error about not being able to increment things that aren't numbers, which I guess is refering to the object within the object. The schema I have is like this, with 123456 and 234567 as user ids and I just want to increment that number: { _id: 123, unread: { 123456: 0, 234567: 1, } }
type: Question
tagged with: mongodb
tagged with: javascript
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26494394
score: 1
tagged with: meteor
favorite count: 0
has title: How to increment nested objects with variable names in MongoDB
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26494394

http://stackoverflow.com/q/26466221
has answer: http://stackoverflow.com/a/26466269
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/26466254
type: Question
answer count: 2
tagged with: javascript
score: 0
has title: SQL delete selected with Javastcript/PHP
has body: I have made an list out of an sql database, this is coded in php. but i am now supposed to delete the selected item s from that list with the push of a button. Can i do this in PHP or must i do this in Javascript, ans also how Here is what i have until now: &lt;?php $con=mysqli_connect("localhost","root","","boodschappen"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); die(); } $result = mysqli_query($con,"SELECT * FROM boodshappenlijst"); echo "&lt;ul class='list-group'&gt;"; while($row = mysqli_fetch_array($result)) { echo "&lt;li class='list-group-item'&gt;"; echo "&lt;span class='badge'&gt;" . $row['Aantal'] . "&lt;/span&gt;"; echo $row['Wat']; echo "&lt;/li&gt;"; } echo "&lt;/ul&gt;"; mysqli_close($con); ?&gt; &lt;script&gt; $( "li" ).click(function() { $( this ).toggleClass( "highlight" ); }); &lt;/script&gt;

http://stackoverflow.com/q/26491670
has title: randomly display only 5 div elements from a list of Div elements
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: I have a list of 17 div elements, I want to randomly display only 5 div elements from the list. I know just little JavaScript, and the shuffle function doesn't do much, it doesn't get elements(i.e DIV) by class or ID. our maybe I don't know how to insert them. from this one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen to this seventeen thirteen eight four five
answer count: 0
duplicate of: http://stackoverflow.com/q/4205166
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41618000
has comment: http://stackoverflow.com/comment/41617145
type: Question
linked to: http://stackoverflow.com/q/4205166
linked to: http://stackoverflow.com/q/2450954
score: 0
tagged with: random

http://stackoverflow.com/q/26484805
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26484863
has body: This doesn't work because f.bar.bar() in undefined. var myFunction = function(foo){ this.foo = foo; this.bar = { bar: function(){ return this.foo; } } } var f = new myFunction('foo'); alert(f.bar.bar());
accepted answer: http://stackoverflow.com/a/26484863
has title: What is the best way to access to "this" inside a sub object in javascript class?
type: AnsweredQuestion
tagged with: oop
type: Question
answer count: 1

http://stackoverflow.com/q/26383864
tagged with: google-app-engine
has comment: http://stackoverflow.com/comment/41422990
tagged with: python
has comment: http://stackoverflow.com/comment/41423140
has answer: http://stackoverflow.com/a/26384637
accepted answer: http://stackoverflow.com/a/26384637
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41423037
has comment: http://stackoverflow.com/comment/41423503
type: Question
tagged with: javascript
tagged with: jquery
has body: I tried a lot of tutorials and forums but I can't find how to make a cascade select work in the Google App Engine ! I tried this code, I have two selects but... it's not a cascade select... The second select is the same even if I change the first select choice... -- BMW Audi -- 3 series 5 series 6 series A3 A4 A5 and here my app.yaml file : application: *** version: 10 runtime: python27 api_version: 1 threadsafe: true handlers: - url: /stylesheets static_dir: stylesheets - url: /.* script: guestbook.application - url: /js static_dir: js libraries: - name: webapp2 version: latest - name: jinja2 version: latest I always have in the second select "3 series" "5series" "6 series" "A3" "A4" "A5" ! Can you help me ?
has title: Google App Engine Python, Jquery and Javascript for a cascade select
score: 0
has comment: http://stackoverflow.com/comment/41422697
answer count: 1
has comment: http://stackoverflow.com/comment/41422631
has comment: http://stackoverflow.com/comment/41422446

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/26482624
tags question: http://stackoverflow.com/q/26508586
tag name: openlayers-3
tags question: http://stackoverflow.com/q/26391195
tags question: http://stackoverflow.com/q/26380760
tags question: http://stackoverflow.com/q/26504770
tags question: http://stackoverflow.com/q/26359801

http://stackoverflow.com/q/26399572
has answer: http://stackoverflow.com/a/26399617
tagged with: styles
has comment: http://stackoverflow.com/comment/41449783
answer count: 8
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26399657
has answer: http://stackoverflow.com/a/26399672
has answer: http://stackoverflow.com/a/26399615
has answer: http://stackoverflow.com/a/26399715
type: Question
possible better answer: http://stackoverflow.com/a/26399610
has answer: http://stackoverflow.com/a/26399707
has answer: http://stackoverflow.com/a/26399610
tagged with: javascript
has answer: http://stackoverflow.com/a/26400721
accepted answer: http://stackoverflow.com/a/26399615
score: 0
tagged with: css
has title: How do I get the background-color value?
has body: &lt;input class="color" value="66ff00" id="fc" autocomplete="off" style="background-image: none; background-color: rgb(128, 225, 255); color: rgb(0, 0, 0);"&gt; How can I get the value of the background-color? Everytime I use (element).attr("background-color"), it doesn't work. I suppose it has to do with style="background-color".

http://stackoverflow.com/comment/41706746
has text: This code releases the asynchronous programming genie upon the unwary. While this code might seem to answer the OP's question, I think this code might not play nice with other code that assumes both parts of the function have executed when the function returns.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26446716

http://stackoverflow.com/q/26441886
has answer: http://stackoverflow.com/a/26441918
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26441920
has comment: http://stackoverflow.com/comment/41527456
linked to: http://stackoverflow.com/q/1144783
duplicate of: http://stackoverflow.com/q/1144783
has comment: http://stackoverflow.com/comment/41527580
type: Question
has body: here is my code &lt;/script&gt; function myFunction() { var a = ["a.m.","p.m","u.k."]; var b = ["its_morning","its_noon","unKnown_thing"]; var str = document.getElementById("textBox1").value; for (var k = 0; k &lt; a.length; k++) { str = str.replace(a[k], b[k]); }; document.getElementById('textBox2').value = str; } &lt;/script&gt; &lt;body&gt; &lt;textarea onkeyup="myFunction();"id="textBox1"&gt;&lt;/textarea&gt; &lt;TEXTAREA type="text" id="textBox2"&gt;&lt;/TEXTAREA&gt; &lt;/body&gt; when i type 'a.m.' its working fine but when i type it again its not changing . like: 'a.m. hello world a.m.' gives results 'its_morning hello world a.m.' here the last 'a.m.' must be replaced but i dont know wats wrong with it please answer in javascript ,im not familiar with jquery.
answer count: 2
has title: words is only replaced one time
score: 0
has answer: http://stackoverflow.com/a/26441920
linked to: http://stackoverflow.com/q/832257
has comment: http://stackoverflow.com/comment/41527889
has comment: http://stackoverflow.com/comment/41527405
possible better answer: http://stackoverflow.com/a/26441918
tagged with: javascript

http://stackoverflow.com/q/26423128
has comment: http://stackoverflow.com/comment/41491573
score: -2
has comment: http://stackoverflow.com/comment/41491616
tagged with: javascript
has body: I've been trying to put together a simple maze game using HTML5 and Javascript. I can successfully load the HTML and CSS content onto the page, but no matter what I try, I can't get the JS to load. It's definitely saved as a .html file and i've only been using Sublime text to put it together (but I wouldn't have thought that would have an affect anyway). Just a bit stumped really, so I thought it must be something I've missed in my code. I wasn't sure if I've missed something? Maze Game
upvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26426078
has title: Javascript not loading with HTML
has comment: http://stackoverflow.com/comment/41495129
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26426078
has comment: http://stackoverflow.com/comment/41491567
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/41492115
has comment: http://stackoverflow.com/comment/41492437
type: AnsweredQuestion

http://stackoverflow.com/comment/41571501
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26465712
score: 0
has text: I editted the main post. I think the problem lies with the showing of images. They are created the second time around, but they just don't show.

http://stackoverflow.com/comment/45372971
type: QuestionComment
has text: @Jeremy yes that was an error, I've taken that out now. The updated fiddle (http://jsfiddle.net/9aozrxy8/5/) now doesn't have the media query so you can see the choppy animation properly. Still choppy on my machine which is i7 + nvidia GTX 780ti.
score: 0
comment on: http://stackoverflow.com/q/26415100
type: Comment

http://stackoverflow.com/a/26422825
answers question: http://stackoverflow.com/q/26422559
has comment: http://stackoverflow.com/comment/41491635
has body: put the click handler on the cell instead of the row var currentRow = table.rows[i]; var cell = currentRow.getElementsByTagName("td")[1]; var createClickHandler = function(cell) { return function() { var id = cell.innerHTML; //use ajax to post id to ajax.php file $.post("ajax.php", { id:id }, function( data ) { //add result to a div and create a modal/dialog popup similar to alert() $('&lt;div /&gt;').html(data).dialog(); }); }; }; cell.onclick = createClickHandler(cell);
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41493102

http://stackoverflow.com/comment/46428228
type: AnswerComment
score: 0
type: Comment
has text: @ArtjomB. It started working now ! Actually there were two ways to execute casper one is from batchbin and other in bin. batchbin one was not passing the argument to phantom ! Changing the path to bin/casperjs helped !
comment on: http://stackoverflow.com/a/26419531

http://stackoverflow.com/q/26440014
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26440048
tagged with: ajax
has comment: http://stackoverflow.com/comment/41523752
has body: My Shopify store uses Ajax call's to add products to the cart and jQuery to update the front-end. I recently installed infinite-ajax-scroll but this brought some issues. The store gets "ajaxified" by this call on the homepage: jQuery(function($) { ajaxifyShopify.init({ method: '{{ settings.ajax_cart_method }}', wrapperClass: 'wrapper', formSelector: '#addToCartForm', addToCartSelector: '#addToCart', cartCountSelector: '#cartCount', toggleCartButton: '.cart-toggle', useCartTemplate: true, btnClass: 'btn', moneyFormat:, disableAjaxCart: false, enableQtySelectors: true }); The full code is located here: http://cdn.shopify.com/s/files/1/0656/8697/t/7/assets/ajaxify.js?9594 I'm wondering what it does exactly and who it belongs to. I want to know so I can unbind the initialised code from the page to solve this problem.
linked to: http://stackoverflow.com/q/26438825
has answer: http://stackoverflow.com/a/26440048
has comment: http://stackoverflow.com/comment/41523951
has comment: http://stackoverflow.com/comment/41523609
has comment: http://stackoverflow.com/comment/41523711
has title: What does jQuery(function($) do and who does it belong to?
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7642442
tagged with: javascript
has comment: http://stackoverflow.com/comment/41523651
duplicate of: http://stackoverflow.com/q/7642442
score: 0
answer count: 1
tagged with: shopify

http://stackoverflow.com/comment/41389648
type: Comment
has text: Interestingly enough, even after I wrote out this question, I noted that putting values into variables before inserting to the CSS/animate statements seemed to cause this problem.
comment on: http://stackoverflow.com/q/26365988
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41549227
score: 0
type: AnswerComment
has text: Probably JavaScript animation but don't need help with any of that. Just need help figuring out how to split each image into 3 pieces with JavaScript
comment on: http://stackoverflow.com/a/26454014
type: Comment

http://stackoverflow.com/q/26467491
score: 5
has answer: http://stackoverflow.com/a/28599540
downvote count: 0
tagged with: javascript
has title: jsTree - Populate Tree Dynamically using AJAX/C#Web Method
favorite count: 0
accepted answer: http://stackoverflow.com/a/28599540
tagged with: ajax
has body: I have a div which I would like to fill with a jsTree: I get the "Loading" icon where the tree is meant to display, however, there would seem to be a javascript error, even though one is not thrown. I load my folder structure from an AJAX Request as follows. The Documents.aspx/GetFolders Web Method returns a List containing FolderId, ParentId & Folder Name. I have debugged the web method and it is passing the correct results to the jsTree "data" function. $.ajax({ type: "POST", url: 'Documents.aspx/GetFolders', contentType: "application/json; charset=utf-8", success: function (data) { data = data.d; $("#tree").jstree({ "core": { "themes": { "responsive": true }, "data": function () { var items = []; items.push({ 'id': "jstree_0", 'parent': "#", 'text': "Documents" }); $(data).each(function () { items.push({ 'id': "jstree_" + this.DocumentFolderId, 'parent': "jstree_" + this.ParentId, 'text': "" + this.Name }); }); return items; } }, "types": { "default": { "icon": "fa fa-folder icon-lg" }, }, "plugins": ["contextmenu", "dnd", "state", "types"] }); }, error: function () { toastr.error('Error', 'Failed to load folders There was a fatal error. Please contact support'); } }); After debugging the code, it seems the data is being retrieved correctly and is returning the object array as intended. Is there are any problem with the above (or is there somewhere else I should be looking)? Or is there a better method of achieving its intended purpose?
tagged with: c#-4.0
tagged with: webmethod
possible better answer: http://stackoverflow.com/a/56783257
tagged with: jstree
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/56783257
upvote count: 5
type: Question
answer count: 2

http://stackoverflow.com/comment/41408671
score: 0
type: Comment
type: QuestionComment
has text: location.pathname = "bulkmessaging/public/pdf/messagereport_pdf.php?company="+company+"&user="+user+"&reportfor="+reportfor+""; This is the code in javascript from where im redirecting
comment on: http://stackoverflow.com/q/26376001

http://stackoverflow.com/q/26471805
has comment: http://stackoverflow.com/comment/41588116
tagged with: razor
has comment: http://stackoverflow.com/comment/41587879
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26475731
accepted answer: http://stackoverflow.com/a/26475731
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has title: auto invoke a javascript function from the child view, after jquery ready, in _layout view, when page loads
tagged with: jquery-plugins
score: 0
has body: strong textIn my ASP MVC 5 app, I have a (master - Jquery loads here) _layout.cshtml and (child, my function sortable here, not loading) views tableView.cshtml In the child tableView.cshtml, I've written custom JS functions that need to be invoked on Jquery Read $ ready. Since jquery has already loaded in the master page, how can I attach my function (and 3rd parts plugins) invoke it when my child page loads? if possible, please share a modular way to attach and initialize my functions and 3rd party plugins in the childviews on the child view loading/navigation load, so that when the main jquery function loads, it also invokes my functions. _layout.cshtml // DOM ready is completed in master layout, I have custom JS plugin/code (sortable) // in the child view that I need to load, when that loads $( document ).ready(function() { console.log( "Master layout ready, done" ); }); TableView.cshtml // in my tableView, that inherits layout from master, // how can I get this loaded when the page loads (function() { console.log( "How can I get child table plugin, loaded!" ); })();
answer count: 1

http://stackoverflow.com/q/26361129
score: 1
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/26347201
has title: Reset DOM state with Jasmine and Phantom JS
upvote count: 1
tagged with: jasmine
favorite count: 0
has comment: http://stackoverflow.com/comment/41380672
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41380220
has body: As pointed out in this question, it looks like my DOM need to be reset in all my "beforeEach" callbacks. How do I do that? I cannot seem to find it. Thank you in advance!
tagged with: phantomjs
downvote count: 0
answer count: 0

http://stackoverflow.com/comment/41462416
type: AnswerComment
type: Comment
has text: See here is the data {"missileStartX":403,"missileStartY":106,"TargetX":811,"TargetY":202} But in loop i'm getting same values again and again. normalizationFactor = 418.94391618846697 shiftX = 403.31926100067335 shiftY = 106.78277537866411
comment on: http://stackoverflow.com/a/26405773
score: 0

http://stackoverflow.com/q/26429606
has comment: http://stackoverflow.com/comment/41504077
accepted answer: http://stackoverflow.com/a/26429825
has body: my code works fine in home directory but in inner directory it keep on showing loading image.never shows original page here is my simple code <?php echo' '; ?> this code works fine here http://something.com/testage.php but not works in this page http://www.something.com/touch/w2et/testage.php everything is same.i think there is some issue with javascript or image references.i tried changing all but same problem. here is jsbin link as well jsbin.com/royepawomi/edit here also it is not working
tagged with: php
tagged with: loading
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26429825
score: 0
linked to: http://stackoverflow.com/q/10143093
answer count: 1
has title: code working in home page but not in inner directory-just shows loading
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26419888
tagged with: xmlhttprequest
has title: Why XmlHttpRequest readyState = 2 on 200 HTTP response code
favorite count: 0
tagged with: http-status-code-200
type: UnansweredQuestion
tagged with: php
downvote count: 1
type: Question
upvote count: 5
has body: So I'm using plain javascript (no jquery), to send a file to the server. Server script PHP returns status code 200 at the end, but instead javascript is getting readyState == 2. The PHP code sends back status code 200: header('X-PHP-Response-Code: 200', true, 200); exit; The javascript is doing: request.onreadystatechange = function() { if (request.readyState == 4) { var message; switch(request.status) { case '200': message = "Data uploaded successfully."; break; case '406': message = "Incorrect file format. Please try again."; break; case '410': message = "Unexpected error. Please contact support."; break; default: break; } status_message_container.innerHTML = message; submit_button.disabled = false; } else { alert( "Unexpected error: " + this.statusText + ".\nPlease try again"); } }; request.send(formData); Even know the HTTP 200 status code comes back correctly (I get 'OK') on frontend. The JS script is seeing readyState==2 (i.e. else block always hit) My understanding is that a server status code of 200 should give readyState == 4??
has answer: http://stackoverflow.com/a/26419972
answer count: 1
tagged with: javascript
score: 4
tagged with: ajax

http://stackoverflow.com/comment/41469306
has text: That give a anonymous return type... Are you sure this is the good way?
comment on: http://stackoverflow.com/a/26409820
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26371510
upvote count: 1
has title: JavaScript Custom Analytics (Not GA)
has comment: http://stackoverflow.com/comment/41399965
score: 1
has comment: http://stackoverflow.com/comment/41400224
has body: I need to make an embeddable tracking code for my apps users and I'm having trouble getting pointed in the right direction. I know some sites at one point used a 1x1 image to track pageviews, is this still something apps do? I'm planning on using something like MaxCDN to server my script and I understand how to write the embed code so that it's async. Every time I try to Google for answers the results are flooded with scripts that are already written (Google Analytics). Are there any tutorials out there or can anyone elaborate on the concept behind tracking pageview and clicks with JS. Thanks in advance for the help/advice.
has comment: http://stackoverflow.com/comment/41402706
type: Question
downvote count: 0
tagged with: javascript
tagged with: analytics
has comment: http://stackoverflow.com/comment/41400085
favorite count: 0
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41428534
type: Comment
has text: Hey gaitat, thanks for your response. MeshBasicMaterial yields the same result. My mountain is still textureless, I have a feeling I'm not calling in the texture correctly. Still tinkering with it though.
type: QuestionComment
comment on: http://stackoverflow.com/q/26387075
score: 0

http://stackoverflow.com/comment/118207808
comment on: http://stackoverflow.com/q/26356877
type: Comment
type: QuestionComment
has text: @John this is not true of the draggable attribute. It is not a boolean attribute, and draggable="false" is not truthy. Links and images are draggable by default, and require draggable="false" to interrupt that behaviour.
score: 2

zurb-foundation
tags question: http://stackoverflow.com/q/26450551
type: Tag
tags question: http://stackoverflow.com/q/26433006
tags question: http://stackoverflow.com/q/26389740
tags question: http://stackoverflow.com/q/26462817
tags question: http://stackoverflow.com/q/26500508
tags question: http://stackoverflow.com/q/26471946
tags question: http://stackoverflow.com/q/26428029
tags question: http://stackoverflow.com/q/26450927
tags question: http://stackoverflow.com/q/26414646
tag name: zurb-foundation
tags question: http://stackoverflow.com/q/26510359

http://stackoverflow.com/a/26452154
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26451579
has body: If you have a look at the docs for Meteor.user, you'll see it works everywhere except publish functions. You need to do: var loggedInUser = Meteor.users.findOne(this.userId);
accepted answer of: http://stackoverflow.com/q/26451579

http://stackoverflow.com/comment/41503574
comment on: http://stackoverflow.com/q/26413772
score: 0
type: Comment
has text: @dhc I am preloading the images, yes. And yes, I get the white flash because I am replacing one image with the other.
type: QuestionComment

http://stackoverflow.com/comment/41561662
type: Comment
has text: Coding suggestion - _always_ use `.on('change', ...)` instead of `.change` so that it's obvious whether the call is a _registration_ or a _trigger_ (and always use `.trigger` for the latter, too!)
comment on: http://stackoverflow.com/a/26461247
type: AnswerComment
score: 0

http://stackoverflow.com/a/26411249
downvote count: 0
answers question: http://stackoverflow.com/q/26410465
accepted answer of: http://stackoverflow.com/q/26410465
type: Answer
score: 4
has body: There are a couple of things wrong here, I think. Like Thomas Kagan said in the comments, there are some typos: The range select widget has a ; after "value:" and a ) after "label: Range". Next, in your getRangeArray function, you are actually building a string! That's not necessary - you would have to parse it with JSON.parse to be useful. Instead, just build the array with objects directly: function getRangeArray(pulselen){ var myOptions = []; var array = [0.5,1,2,5,10,20,40]; console.log("Length got is " + pulselen); for(i=0;i&lt;array.length;i++){ myOptions.push({label: array[i].toString(), value: "" + array[i]*1000 }); } return myOptions; } Notice that I call toString() on the labels! Otherwise dijit/form/Select will throw some really weird errors - it expects the labels to be strings. Also, although I don't know if it's necessary, you may have to call reset() on the _Range widget after updating its options: registry.byId("_Range").set("options", newOptions).reset(); .. at least you used to, but it seems to work without it now. Here's a fiddle with your code, and the updated parts: http://jsfiddle.net/ycrz1ug4/
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/a/26473670
answers question: http://stackoverflow.com/q/26470623
has comment: http://stackoverflow.com/comment/41593076
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41593177
score: 1
has body: Nice question! Although I'm not sure what the preferred solution to this would be, I was thinking of the following approach: Use a IIFE to define your jQuery plugin and enable you to define some private, global variables and functions. $.fn.pluginName = (function() { return function() { ...your regular plugins code... }; }(); Define your plugins CSS as a list of style rules in your plugins code var rules = [ '.box {' + ' width: 100px;' + ' background-color: #f99;' + ' margin: 10px;' + ' padding: 10px;' + ' font-family: Helvetica, Arial;' + ' text-align: center;' + '}' ]; Create a private variable that remembers if your stylesheet has already been added to the document var styleSheetExists = false; Create a private function that creates a stylesheet using the style rules above and that adds it as the first &lt;style&gt; element in the &lt;head&gt; allowing the user to override styles in their own CSS. See http://davidwalsh.name/add-rules-stylesheets for a good tutorial on how to do this properly var createStyleSheet = function() { var style = document.createElement("style"); style.appendChild(document.createTextNode("")); $('head').prepend(style); for (var i = 0; i &lt; rules.length; i++) { style.sheet.insertRule(rules[i], i); } }; The first time your plugin is applied to an element check if the stylesheet has already been created and if not create the stylesheet. var $elements = $(this); if (!styleSheetExists) { createStyleSheet(); styleSheetExists = true; } $elements.each(function() { $(this).addClass('box'); }); return $elements; See http://codepen.io/ckuijjer/pen/FkgsJ for this example. It creates a jQuery plugin called box which simply adds the class box to an element. The class box has a default pink background color defined in its stylesheet which gets overridden by a user defined blue background color. But please do make this configurable in your jQuery plugin. You want to enable developers to bundle all their css, including your plugins, to optimize resource…
type: Answer
has comment: http://stackoverflow.com/comment/41595720

http://stackoverflow.com/comment/41483591
has text: So I started to think about: http://jsbin.com/jareyutaxizo/5/edit It's in a bit of a mess... but you might be able to see where I was going.... Trying to just edit the plugin to make a list of all the possible combinations of the letters... with more time you could find tune it to be a recursive lookup... I like this question, but it'd be a trick to edit. I also thought that rather than doing a regex on everything like this, since this will get bloated pretty quick, it might be easier to modify the words that are found in the text you are searching... either way it would be a heavy load.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26415559

http://stackoverflow.com/q/26359325
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41377471
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26360277
has title: ng-repeat-start with ng-hide
has comment: http://stackoverflow.com/comment/41377539
has answer: http://stackoverflow.com/a/26359524
type: Question
tagged with: angularjs-directive
has body: Just simple example. My array: $scope.arr = [ {lab1: 'a1', lab2: 'a2', lab3: 'a3', val1: 'av1', val2: 'av2', val3: 'av3'}, {lab1: 'b1', lab2: 'b2', lab3: 'b3', val1: 'bv1', val2: 'bv2', val3: 'bv3'}, {lab1: 'c1', lab2: 'c2', lab3: 'c3', val1: 'cv1', val2: 'cv2', val3: 'cv3'}, {lab1: 'd1', lab2: 'd2', lab3: 'd3', val1: 'dv1', val2: 'dv2', val3: 'dv3'}, {lab1: 'e1', lab2: 'e2', lab3: 'e3', val1: 'ev1', val2: 'ev2', val3: 'ev3'}, ]; My html: Title1 {{item.lab1}} {{item.lab2}} {{item.lab3}} Title2 Val1 {{item.val1}} {{item.val2}} {{item.val3}} Val2 Expected table: Title1 | a1 | a2 | a3 | b1 | b2 | b3 | d1 | d2 | d3 | e1 | e2 | e3 | Title2 Val1| av1 | av2 | av3 | bv1 | bv2 | bv3 | dv1 | dv2 | dv3 | ev1 | ev2 | ev3 | Val2 Real table: Title1 | a1 | a2 | a3 | b1 | b2 | b3 | c2 | c3 | d1 | d2 | d3 | e1 | e2 | e3 | Title2 Val1| av1 | av2 | av3 | bv1 | bv2 | bv3 | cv2 | cv3 | dv1 | dv2 | dv3 | ev1 | ev2 | ev3 | Val2 So how can i apply ng-hide or other directives on all ng-repeat-start end blocks? And no - i cant wrap it and use ng-repeat, no - i dont want use a filter...

http://stackoverflow.com/q/26472298
type: Question
tagged with: comments
answer count: 1
has comment: http://stackoverflow.com/comment/41582370
tagged with: javascript
has body: Does somebody know, how we can add the rel="nofollow" attribute to all links in the comments plugin from facebook. window.addEventListener("load", func, false); function func() { var div = document.getElementById("comments"); var elements = div.getElementsByTagName("*"); for (var i = 0; i < elements.length; i++) { if (elements [i].tagName == "a") { elements[i].rel = "nofollow"; } } } Array elements do not contain all tags that facebook adds in my .
has title: Add rel="nofollow" to facebook comments
score: 0
tagged with: facebook
has comment: http://stackoverflow.com/comment/41582314
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26472392

http://stackoverflow.com/comment/41494999
has text: I just tried the code I gave you and it worked perfectly. Change your post to the following and let me know what prints in the console:`$atj.post( MyAjax.ajaxurl, requestData, function( result ){ console.log( result ); })`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26415480

http://stackoverflow.com/q/26353984
has comment: http://stackoverflow.com/comment/41367631
favorite count: 0
accepted answer: http://stackoverflow.com/a/26354538
has title: AngularJS:How to read data from the json file using angular
tagged with: angularjs
upvote count: 1
tagged with: date-conversion
type: AnsweredQuestion
has body: We are using JQuery ajax to read json data and convert into object. jQuery script $.ajax({ type: "GET", dataType: 'json', url: 'data.json', converters: { "text json": function (data) { return $.parseJSON(data); } }, success: function (data) { self.jsonData = data; } }); data.json [{ "Name" : "Task 1", "ID" : 1, "StartTime" : "2014-02-02T00:00:00Z", "Effort" : "8:00:00", "Description" : "Description of Task 1" }, { "Name" : "Task 2", "ID" : 2, "PredecessorIndices" : "1", "StartTime" : "2014-02-03T00:00:00Z", "Effort" : "16:00:00", "Description" : "Description of Task 2" }, { "Name" : "Task 3", "ID" : 3, "StartTime" : "2014-02-02T00:00:00Z", "Effort" : "1.12:30:00", "ProgressPercent" : 90, "Description" : "Description of Task 3" }] Here converting date string into Jsdate object like this:Json Date Parsing How to read json data and parsing the json date string into a Jsdate object using angularjs ?
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: date
type: Question
has answer: http://stackoverflow.com/a/26354538
has comment: http://stackoverflow.com/comment/41367511
downvote count: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/14994391

http://stackoverflow.com/a/26372046
answers question: http://stackoverflow.com/q/26368287
type: Answer
score: 0
has body: I have come across a similar problem in an application which lists a collection of selectable models in a table. Based on the models which are selected, another view needs to determine which buttons to show to the user. In this case, I went for an event driven approach. Every time a model from view A is selected, I fire an event which View B listens to and adds that model to Collection B. For your situation, that could look something like this: // Your collection view. var ViewA = Backbone.View.extend({ initialize: function(){ Backbone.Events.on('modelSelected', this.onModelSelected, this); this.listenTo(this.collection, 'add', this.renderList); }, onModelSelected: function(model){ this.collection.add(model); } renderList: function(){ // Draw your collection } // Do some clean up of events remove: function(){ Backbone.Events.off('modelSelected', this.onModelSelected, this); Backbone.View.prototype.remove.call(this); } }); // Modal View var ViewB = Backbone.View.extend({ initialize: function(){ this.collection = new YourCollection(); this.listenTo(this.collection, 'sync', this.renderCollection); this.collection.fetch(); }, render: function(){ // Render your modal return this; }, renderCollection: function(){ // Render your collection }, // modalSubmit: function(){ var model = this.getSelectedModel(); Backbone.Events.trigger('modelSelected', modal); this.close(); } }); I should note that this comes with a few caveats. Firstly, I would recommend picking a robust and namespace event naming scheme. This is just an example. Secondly, fetching from the initialize function is often not ideal, but I'm leaving out the concept of controllers for brevity.

http://stackoverflow.com/comment/41556663
comment on: http://stackoverflow.com/q/26458269
type: QuestionComment
has text: And by quick, you mean easy to program, or fast to execute?
type: Comment
score: 1

http://stackoverflow.com/a/70885028
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26476513
has body: This issue happens because, the actual programme cannot find the dynamic library(.so file) What i am suggest is make a dynamic library and add it to the ,current lookup path such that /usr/lib in linux

http://stackoverflow.com/comment/41524017
comment on: http://stackoverflow.com/a/26440102
type: AnswerComment
score: 0
type: Comment
has text: The preldoc site includes several tutorials. It's the reference. http://perldoc.perl.org/index.html If you want a book, Programing Perl is a good choice, written by Larry Wall, (O'Reilly edition)

http://stackoverflow.com/comment/41623150
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26493816
has text: I'm guessing this is related to your time zone, as daylight savings is only an hour difference. Is your local time close to the prime meridian? Can you try setting a different time zone when setting the value of the calendar?

http://stackoverflow.com/a/26505470
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26493304
upvote count: 1
has body: Ok, found the solution here: angular-leaflet-directive custom message html with angular directives in marker popup. How to? But modified it a bit: var myobjectname = 'meinort'; var meineMarker = {}; meineMarker[myobjectname] = { lat: 0, lng: 0, name: 'testname', message: "info", focus: false, draggable: false }; $scope.$on('leafletDirectiveMarker.click', function(e, args) { // Args will contain the marker name and other relevant information console.log(args); var markerName = args.leafletEvent.target.options.name; //has to be set above var $container = $(args.leafletEvent.target._popup._container).find('.leaflet-popup- content'); $container.empty(); var html = " I am "+markerName +" " + args.leafletEvent.target._popup._content + " ", linkFunction = $compile(angular.element(html)), linkedDOM = linkFunction($scope); $container.append(linkedDOM); });

http://stackoverflow.com/comment/41546337
has text: need `onreadystatechange` handler. Should also be using browser console to check for errors!
comment on: http://stackoverflow.com/q/26451848
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41418047
has text: Actually condition() value is selected tab that could be 1, 2. So I want result in case of if: condition() == 1 or ifnot: condition() == 1. Sorry bro I am unable to write in fiddle because that have some server side code. condition is comparing with server side value.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26378022
type: Comment

http://stackoverflow.com/q/26423899
type: UnansweredQuestion
score: 2
downvote count: 0
tagged with: iframe
has body: I refer to this article: http://julip.co/2010/01/how-to-build-a-chrome-extension-part-3-loading-any-web-page-in-a-popup/ Source code of this extension is: http://mfi.re/?imwxngtdkhg Howver it does not dispaly ANYTHING. My question is: can an EXTERNAL iframe be included into google chrome extension ?
tagged with: google-chrome
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26424086
upvote count: 2
tagged with: google-chrome-extension
answer count: 1
favorite count: 0
has title: can an EXTERNAL iframe be included into google chrome extension

http://stackoverflow.com/a/26462948
downvote count: 0
has comment: http://stackoverflow.com/comment/41565239
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/41564789
upvote count: 1
has body: There's no .query() method in the JS SDK (https://developers.facebook.com/docs/javascript/reference/v2.1), so what are you using? You can call /me/permissions with the respective access token to see whcih permissions the user gave to the app. See https://developers.facebook.com/docs/graph-api/reference/v2.1/user/permissions
answers question: http://stackoverflow.com/q/26462679

http://stackoverflow.com/comment/41444451
score: 0
has text: How would I specify an index of the object in the `hashtagsl` array I don't have a way of knowing it. I will add an example of a similar thing to the question.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26396265

http://stackoverflow.com/a/26486967
type: Answer
has comment: http://stackoverflow.com/comment/41644434
has body: Here's a simplified approach to highlight all occurences of t outside of tags: content = content.replace(/<.*?>|(t)/gi, function(match, captured) { if (!captured) return match; return '' + captured + ''; }); You can easily generalize this approach, just don't forget to escape the regex metacharacters: function highlightTextInHtml(content, search) { // Escape regex metacharacters search = search.replace(/[-\\()\[\]{}^$*+.?|]/g, '\\$&'); // Build the regex var re = new RegExp("<.*?>|(" +search+ ")", "gi"); // Highlight matches return content.replace(re, function(match, captured) { if (!captured) return match; return '' + captured + ''; }); } $(document).on("ready", function() { var originalContent = $("#content").html(); $("#search").on("keyup", function() { $("#content").html(highlightTextInHtml(originalContent, $("#search").val())); }).triggerHandler("keyup"); }); td { border: 1px solid black; } .hl { background-color: yellow; } Search for: Jupiter mail.test.com 10.0.0.1 root a$01'deK
answers question: http://stackoverflow.com/q/26486064
score: 0
has comment: http://stackoverflow.com/comment/41644370
has comment: http://stackoverflow.com/comment/41644067

http://stackoverflow.com/comment/41518505
score: 0
type: QuestionComment
has text: `maxDate: new Date()` will suffice. No need to put `.getMonth()`
comment on: http://stackoverflow.com/q/26437124
type: Comment

http://stackoverflow.com/a/26493554
score: 0
type: Answer
has body: The vector $_POST must be uppercase.
answers question: http://stackoverflow.com/q/26493450

http://stackoverflow.com/comment/41387171
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26358861
has text: For some reason, the value appears in the select list for a fraction of a second and then disappears. I shall debug it. In the meantime, if you know what could be wrong, please let me know.

http://stackoverflow.com/comment/41405973
comment on: http://stackoverflow.com/q/26373631
score: 0
has text: From a very quick experiment it looks like when jquery hides and element it remembers the previous `disaplay` value and restores that value as an inline style. I used Firebug for Firefox to inspect the element as it was changed.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26463067
type: Question
has answer: http://stackoverflow.com/a/26474035
score: 0
has body: am using HTML Editor (ajax toolkit) in my asp.net application. Problem: my problem is when I want to assign or set the value to HTMLEditor on page load but it is not working(code below). but with the same code I can retrieve or get the value successfully. JavaScript: &lt;script type="text/javascript"&gt; $(document).ready(function () { document.getElementById("ContentPlaceHolder1_Editor1_ctl02").contentWindow.innerHTML = "Some value from db"; // not working :( }); function getValue() { var content = document.getElementById("ContentPlaceHolder1_Editor1_ctl02_ctl00").contentWindow.document.body.innerHTML // this working perfect. } function copyText() { document.getElementById("ContentPlaceHolder1_Editor1_ctl02").contentWindow.innerHTML = "Some Value from another div"; // working perfect. } &lt;/script&gt; My problem is I am not able to set the value in HTML Editor in document ready function. but the same way I can copy content of another div and I am able to set that text inside HTML Editor. please give me suggestion how can I set the value in HTML Editor inside the document.ready event Thanks,
answer count: 1
type: UnansweredQuestion
tagged with: ajaxcontroltoolkit
tagged with: javascript
tagged with: jquery
has title: Ajax toolkit HTML Editor value set on page load
tagged with: asp.net

http://stackoverflow.com/q/26373584
has comment: http://stackoverflow.com/comment/41403866
answer count: 1
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41403910
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41404435
has answer: http://stackoverflow.com/a/26386114
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41403756
has body: I want to show and hide my Linkedin ID under a certain condition. Both hide() and show() function are in mainjs.js. But from the below code only function hide() is called. And when it makes a call to show() function the JavaScript code is stack at that point. Now how I can call the show() function after loading the html page. Help me please. Ashik Linkedin Ashik ( Muhammad Ashikuzzaman ) Linkedin
downvote count: 2
has comment: http://stackoverflow.com/comment/41404456
has title: Calling JavaScript function from a html page after loading
has comment: http://stackoverflow.com/comment/41404134
tagged with: dom
has comment: http://stackoverflow.com/comment/41404119
type: Question
has comment: http://stackoverflow.com/comment/41403822
tagged with: javascript
score: 0

http://stackoverflow.com/a/26378512
type: Answer
answers question: http://stackoverflow.com/q/26378226
has body: Use the power of jQuery handler, and keep clean your html: 1. use .on("click") handler, instead a function: $(function(){ //alert("Document Ready"); $("#cartClick").on("click",function(e){ //alert("Button clicked!!"); $("#popupdiv").dialog({ title: "AddCart", width: 630, height: 450, modal: true, buttons: { Close: function () { $(this).dialog('close') } } }); return false; }); }); jQuery API : .on("click") 2. remove onClick attribute on your html. Cart(@if ( @App["CartLen"] != null) { @App["CartLen"] }) Every time a user click on element with ID #cartClick jQuery trigger your function (anonymous). Note. My answer is just for your knowledge, all the others are equally valid.
upvote count: 2
has comment: http://stackoverflow.com/comment/41412983
score: 2
has comment: http://stackoverflow.com/comment/41413240
has comment: http://stackoverflow.com/comment/41413057
downvote count: 0
has comment: http://stackoverflow.com/comment/41413185
has comment: http://stackoverflow.com/comment/41412965
has comment: http://stackoverflow.com/comment/41412801
has comment: http://stackoverflow.com/comment/41413383
has comment: http://stackoverflow.com/comment/41412904

knockout.js
tags question: http://stackoverflow.com/q/26513260
tags question: http://stackoverflow.com/q/26383138
tags question: http://stackoverflow.com/q/26391639
tags question: http://stackoverflow.com/q/26383688
tags question: http://stackoverflow.com/q/26469550
tags question: http://stackoverflow.com/q/26509601
tags question: http://stackoverflow.com/q/26484321
tags question: http://stackoverflow.com/q/26464350
tags question: http://stackoverflow.com/q/26450128
tags question: http://stackoverflow.com/q/26481544
tags question: http://stackoverflow.com/q/26412032
tags question: http://stackoverflow.com/q/26401799
tags question: http://stackoverflow.com/q/26372589
tags question: http://stackoverflow.com/q/26362181
tags question: http://stackoverflow.com/q/26474778
tag name: knockout.js
tags question: http://stackoverflow.com/q/26485367
tags question: http://stackoverflow.com/q/26493913
tags question: http://stackoverflow.com/q/26465866
tags question: http://stackoverflow.com/q/26368074
tags question: http://stackoverflow.com/q/26480021
tags question: http://stackoverflow.com/q/26485598
tags question: http://stackoverflow.com/q/26469037
tags question: http://stackoverflow.com/q/26361416
tags question: http://stackoverflow.com/q/26363367
tags question: http://stackoverflow.com/q/26471969
tags question: http://stackoverflow.com/q/26449758
tags question: http://stackoverflow.com/q/26369312
tags question: http://stackoverflow.com/q/26366868
tags question: http://stackoverflow.com/q/26374056
tags question: http://stackoverflow.com/q/26416566
tags question: http://stackoverflow.com/q/26387803
tags question: http://stackoverflow.com/q/26438797
tags question: http://stackoverflow.com/q/26507413
tags question: http://stackoverflow.com/q/26377949
type: Tag
tags question: http://stackoverflow.com/q/26397260
tags question: http://stackoverflow.com/q/26504568
tags question: http://stackoverflow.com/q/26439787
tags question: http://stackoverflow.com/q/26411161
tags question: http://stackoverflow.com/q/26393143
tags question: http://stackoverflow.com/q/26462658

http://stackoverflow.com/comment/41679926
score: 0
type: Comment
type: QuestionComment
has text: There is an idea to use [three.js](http://threejs.org/) and show each sub network as a next layer. But it can be very complicated to pass the correct position/location for each layers...
comment on: http://stackoverflow.com/q/26468152

http://stackoverflow.com/comment/41627436
type: Comment
score: 0
type: AnswerComment
has text: Quick note for those who want to use it in IE. It doesn't seem to work there. The window is maximized but the player stays small.
comment on: http://stackoverflow.com/a/26468795

postback
tag name: postback
tags question: http://stackoverflow.com/q/26419412
tags question: http://stackoverflow.com/q/26355101
type: Tag

groovy
tags question: http://stackoverflow.com/q/26477604
type: Tag
tag name: groovy

http://stackoverflow.com/comment/41628221
comment on: http://stackoverflow.com/q/26497218
type: QuestionComment
score: 0
has text: Can you show a bit more of an example of what you're trying to do? What JavaScript client are you referring to? What other technologies are being used here?
type: Comment

http://stackoverflow.com/comment/41654260
type: Comment
type: QuestionComment
score: 0
has text: I see no indication that you've taken @RocketHazmat's advice and actually inspected the data. Have you? Or are you just assuming you're getting the values you assigned?
comment on: http://stackoverflow.com/q/26510942

http://stackoverflow.com/a/26455245
answers question: http://stackoverflow.com/q/26395175
type: Answer
score: 0
has body: There is a tab indenting $.each and spaces elsewhere. Indentation is not correct. Use an editor with coffeescript support.

http://stackoverflow.com/q/26482129
has comment: http://stackoverflow.com/comment/41599839
tagged with: javascript
tagged with: jquery
duplicate of: http://stackoverflow.com/q/14892095
score: 0
has body: Is there any easy way how to detect browser and its version in jQuery 1.11? There is deprecated $.browser. But I didn't find easy alternative for that in newer $.
has comment: http://stackoverflow.com/comment/41599777
has comment: http://stackoverflow.com/comment/41599793
has title: How to detect borwser in jQuery 1.11?
has comment: http://stackoverflow.com/comment/41599800
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41599926
has comment: http://stackoverflow.com/comment/41599826
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41599808
linked to: http://stackoverflow.com/q/14892095

http://stackoverflow.com/q/26510942
downvote count: 1
has comment: http://stackoverflow.com/comment/41654534
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/41652721
has comment: http://stackoverflow.com/comment/41654176
score: 1
has comment: http://stackoverflow.com/comment/41654043
has comment: http://stackoverflow.com/comment/41654260
has comment: http://stackoverflow.com/comment/41654139
has comment: http://stackoverflow.com/comment/41653501
has comment: http://stackoverflow.com/comment/41652408
has comment: http://stackoverflow.com/comment/41653767
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41653221
has comment: http://stackoverflow.com/comment/41653931
has answer: http://stackoverflow.com/a/27518076
favorite count: 0
tagged with: ajax
has body: The code below works in every browser except IE, following an error message "SCRIPT65535: Argument not optional". function _getChart(){ $('.series-data').remove(); var itm = window.item; var tp = window.type; var ord = window.order; var xd = window.xdata; var yd = window.ydata; var dt = {superAwesomeTypeNotIEvar : tp, superAwesomeItemNotIEvar : itm, superAwesomeOrderNotIEvar : ord, superAwesomeXdataNotIEvar : xd, superAwesomeYdataNotIEvar : yd, superAwesomeCharHeightNotIEvar : $('.charts-wrapper').height()}; $.ajax({ url: "ajax/data.php", cache: false, data: dt, dataType: "json", success: function(data) { // Some fcs As you can see I already tried renaming all the parameters to something that IE is not likely using for itself (e.g. the removeFilter story). This is what the function looked like originally function _getChart(){ $('.series-data').remove(); $.getJSON('ajax/data.php', { type : window.type, item : window.item, order: window.order, xdata : window.kurtosis, ydata : window.range, chartHeight : $('.charts-wrapper').height()}, function(data) { If I set the dt array to just {} it all works, otherwise the error message above is shown. SCRIPT65535: Argument not optionalFile: jquery.js, Line: 4, Column: 13144 jQuery non-min file line where the error appears jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; Why?
has comment: http://stackoverflow.com/comment/41652688
type: Question
answer count: 3
has comment: http://stackoverflow.com/comment/41653077
has answer: http://stackoverflow.com/a/49643541
has comment: http://stackoverflow.com/comment/41654085
has comment: http://stackoverflow.com/comment/41654157
has comment: http://stackoverflow.com/comment/41653971
has answer: http://stackoverflow.com/a/26511562
has comment: http://stackoverflow.com/comment/41653273
upvote count: 2
type: UnansweredQuestion
has title: IE 11 ajax error - "SCRIPT65535: Argument not optional"
has comment: http://stackoverflow.com/comment/41654531

http://stackoverflow.com/comment/41574630
type: Comment
has text: That's PHP. I'm trying to reduce server's load with doing it with JavaScript. But thank your for finding it. I'll use it for pre-loaded content with PHP.
comment on: http://stackoverflow.com/a/26468344
type: AnswerComment
score: 0

http://stackoverflow.com/q/26422462
has comment: http://stackoverflow.com/comment/41491151
has comment: http://stackoverflow.com/comment/41490442
has answer: http://stackoverflow.com/a/26422702
type: Question
has body: Is it possible to run a JavaScript function only when the cursor focus is in a specific textarea? I want to perform an action on keypress of the enter key, however I don't want this event listner to be in place just generally on the page, rather only when the cursor is in the textarea I have (id is postcontent) As an example, the function I'm using is this: function onEnter(){ if(characterCode == 13) { console.log("Enter pressed"); } } Just as a start while I work out the focus issue... I also have jQuery at my disposal.
has comment: http://stackoverflow.com/comment/41490447
linked to: http://stackoverflow.com/q/979662
has comment: http://stackoverflow.com/comment/41490468
tagged with: javascript
has title: Javascript only when cursor focus within textbox
has comment: http://stackoverflow.com/comment/41490421
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/6178431
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41490496
has answer: http://stackoverflow.com/a/26422553

http://stackoverflow.com/comment/41458076
type: AnswerComment
comment on: http://stackoverflow.com/a/26393780
type: Comment
has text: thank you for answer. seems I misunderstood something (
score: 0

http://stackoverflow.com/comment/41579225
type: QuestionComment
type: Comment
has text: If you are looking for a solution which raises onbeforeunload event when an ajax call made then it is nearly impossible. You need to have your own implementation to detect changes when makeing ajax call.
score: 0
comment on: http://stackoverflow.com/q/26470751

http://stackoverflow.com/q/26487480
accepted answer: http://stackoverflow.com/a/26487711
type: AnsweredQuestion
has title: Javascript: prototype attribute not visible on parent
type: Question
has comment: http://stackoverflow.com/comment/41609696
answer count: 2
has comment: http://stackoverflow.com/comment/41609283
has answer: http://stackoverflow.com/a/26487711
has comment: http://stackoverflow.com/comment/41609339
possible better answer: http://stackoverflow.com/a/26487844
tagged with: javascript
has answer: http://stackoverflow.com/a/26487844
has comment: http://stackoverflow.com/comment/41609536
tagged with: prototype
score: 0
has body: Example taken from here: http://sporto.github.io/blog/2013/02/22/a-plain-english-guide-to-javascript-prototypes/ I also asked a similar question here: Javascript: Added function does not appear on parent object. Create an object &gt;function Person(name) { this.name = name; } Add an attribute as a prototype. The new kind attribute does not appear on the object. &gt;Person.prototype.kind = 'person' &gt;Person &lt;function Person(name) { this.name = name; } Now create a new object using the parent as the prototype. The added attribute is visible. var zack = new Person('Zack'); Person {name: "Zack", kind: "person"} Why is the added kind attribute not visible on the parent Person object, even though it can convey it to children?
linked to: http://stackoverflow.com/q/26486704
has comment: http://stackoverflow.com/comment/41610453

http://stackoverflow.com/q/26477909
tagged with: javascript
has comment: http://stackoverflow.com/comment/41592837
type: Question
has answer: http://stackoverflow.com/a/26477961
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26477961
has comment: http://stackoverflow.com/comment/41592784
score: -2
has comment: http://stackoverflow.com/comment/41592883
favorite count: 0
has comment: http://stackoverflow.com/comment/41592770
downvote count: 2
has comment: http://stackoverflow.com/comment/41592719
has body: Are there any repercussions from having large amounts of data in the browser? any memory limits? will there be any degraded performance of any type? I am not worried about effects of manipulating the data. Another way to ask this is, if I am not concerned with download effects, should I download all data from the server that may ever be needed, or is there a reason not to? UPDATE: What I am concerned about are the size of javascript objects. So I guess the question refers to browser memory as Eric mentions. App is for in-house use, so bandwidth not an issue. BTW : How am I to learn, when the question gets downvoted without an explanation?
has comment: http://stackoverflow.com/comment/41592995
answer count: 1
has title: What are effects of large amout of data in browser, if any
tagged with: browser
upvote count: 0
has comment: http://stackoverflow.com/comment/41592706

http://stackoverflow.com/q/26488090
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26488870
accepted answer: http://stackoverflow.com/a/26488870
tagged with: css
has comment: http://stackoverflow.com/comment/41610287
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41610934
type: Question
score: -2
tagged with: firefox
has body: I'm developing a head mounted display device, and I'm planning to use a web UI for it. I want the text on the screen to start out very large and resize if there is too much to fit on the screen. I've looked around the web for a good solution, but I couldn't find anything. I plan to use Firefox.
tagged with: javascript
has title: resize text on overflow in CSS/JavaScript
has comment: http://stackoverflow.com/comment/41611312
downvote count: 2
has comment: http://stackoverflow.com/comment/41611088
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26363026
has comment: http://stackoverflow.com/comment/41384334
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/19761241
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26364360
has comment: http://stackoverflow.com/comment/41383999
has comment: http://stackoverflow.com/comment/41386430
has comment: http://stackoverflow.com/comment/41384949
type: Question
has title: Close browser window in Angular SPA
has body: I've tried quite a few versions of the window.close() method trying to get around the "Scripts may not close windows that were not opened by script." error and have settled on the code below. I no longer receive the scripts error, but all the below does is redirect to my index page of my single page app. Does anyone have any thoughts or ideas? So I call it from this page (ng-click) /index.html#/complete and it redirects me to /index.html#/ $window.open($window.location.pathname, '_self').$window.close();
has answer: http://stackoverflow.com/a/26364360
tagged with: javascript

http://stackoverflow.com/comment/41416906
has text: I'm using route provider and for page with my form I have a controller and in this controller I have a function that sends data to server. The main problem is to compile this textareas because I have models there but textareas are creating after page has bootstrapped and I don't have access to this models values because I have to send them to server.
type: QuestionComment
comment on: http://stackoverflow.com/q/26378355
type: Comment
score: 0

http://stackoverflow.com/comment/41452815
type: Comment
type: QuestionComment
has text: #one, #two, #three elements. It is in draggable function
score: 0
comment on: http://stackoverflow.com/q/26401506

http://stackoverflow.com/q/26431039
tagged with: regex
tagged with: nlp
favorite count: 0
has answer: http://stackoverflow.com/a/26641923
type: UnansweredQuestion
downvote count: 0
score: 1
has body: I'm looking more suggestions on an approach to processing lines of text using specific searches of words or phrases (predictable to me) to transfer into a csv. So for example lines like this: A south China-based trading firm offered a cargo of low-volatile coking coal on a 15% basis with November laycan at $167/t. A Hong Kong based trading firm received an offer of mid-volatile coking coal 24% basis with early November delivery at $145/t. would become delimited info like: South China trader, seller, low-volatile, 15%, November, laycan, $167 Hong Kong trader, buyer, mid-volatile, 24%, early November, delivery, $145 There are existing javascript answers to start me suggesting str.split("\n") to set up array. But after that... what coding approach would you recommend to looking for word/phrase matches within a line and then setting up a corresponding comma delimited line of the distilled info (to go into a spreadsheet). I am an editor looking to speed up data entry, so that's why I have a more general approach question. All the search parameters I can struggle with if I know how to get there. At work we already use javascript to pull in files. People say python is easy but I'd like something easier to use in a Windows at work. I have been google searching my way to an approach without success... just a framework and I can get there.
type: Question
upvote count: 1
has title: Mild language processing of csv file in javascript
tagged with: javascript
tagged with: http://stackoverflow.com/tag/csv
answer count: 1

http://stackoverflow.com/a/26360790
has comment: http://stackoverflow.com/comment/41379500
type: Answer
has comment: http://stackoverflow.com/comment/41380185
has comment: http://stackoverflow.com/comment/41379953
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41380126
has comment: http://stackoverflow.com/comment/41380078
answers question: http://stackoverflow.com/q/26360663
has comment: http://stackoverflow.com/comment/41379656
has comment: http://stackoverflow.com/comment/41379456
downvote count: 0
has comment: http://stackoverflow.com/comment/41379560
has body: Your problem is in one of the first lines in your script: var total = parseFloat(dollar + xfer); You're calculating total before xfer has a meaningful value. You'll need to calculate total before your document.writeln("Total: ... lines.

http://stackoverflow.com/a/32769666
upvote count: 2
has body: I had a similar conundrum. I wanted to create the JSON server side (ruby on rails) so I could create images of charts for a web API and also present it on the client web browser with the same code. This is similar to SteveP's answer. To conform with JSON standards, I changed all formatter functions to strings {"formatter": "function(){ return this.point.name+':'+this.percentage.toFixed(1) + '%';}"} On the web side, I navigate the hash looking for formatter keys and replace them with the function using this code (may be a better way!?). javascript: function HashNavigator(){ this.navigateAndReplace = function(hash, key){ if (!this.isObject(hash)){ //Nice if only navigated hashes and arrays return; } var keys = Object.keys(hash); for(var i = 0; i&lt; keys.length; i++){ if (keys[i] == key){ //convert string to js function hash[keys[i]] = this.parseFunction(hash[keys[i]]); } else if (this.isObject(hash[keys[i]])){ //navigate hash tree this.navigateAndReplace(hash[keys[i]], key); } else { //continue } } }; this.isObject = function(testVar) { return testVar !== null &amp;&amp; typeof testVar === 'object' } //http://stackoverflow.com/questions/7650071/is-there-a-way-to-create-a-function-from-a-string-with-javascript this.parseFunction = function(fstring){ var funcReg = /function *\(([^()]*)\)[ \n\t]*{(.*)}/gmi; var match = funcReg.exec(fstring.replace(/\n/g, ' ')); if(match) { return new Function(match[1].split(','), match[2]); } return null; }; } To use this, would be something similar to this javascript: hashNavigator = new HashNavigator(); hashNavigator.navigateAndReplace(myHighchartsHash, "formatter") At that point the hash/js-object is Highcharts ready Similar idea was used for the web image API. I was really hoping that hacking at the JSON was not the only solution, but it works!
score: 2
answers question: http://stackoverflow.com/q/26472001
downvote count: 0
type: Answer

http://stackoverflow.com/a/32313339
downvote count: 0
answers question: http://stackoverflow.com/q/26360378
upvote count: 1
type: Answer
score: 1
has body: If you want to restrict the user to go back then try this small script. &lt;script&gt; history.forward(); &lt;/script&gt; Put this code into the &lt;head&gt; element of your page and try to go back. For more details click on following link... How to disable browser back button after logout in JSP?

http://stackoverflow.com/comment/41599534
type: AnswerComment
has text: Usually, DOM is accessed through [directives](https://docs.angularjs.org/guide/directive). But it mostly depends on what you wanna achieve.
comment on: http://stackoverflow.com/a/26481631
type: Comment
score: 0

http://stackoverflow.com/comment/41491038
type: Comment
comment on: http://stackoverflow.com/a/26422466
has text: yeah but you are adding new image not chnage old one src
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41424523
has text: okay this fiddle has definitely removed the error but my changes are not posted back to the server. now i do not receive any error. but changes are not posted to the server.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26384940

http://stackoverflow.com/q/26406364
has body: I have a problem in firefox. There are some lines like this: test test test CSS: .logMess { color:#000; padding: 4px 2px 2px 3px; min-width: 100%; line-height: 18px !important; } .errorMess { color:#fff !important; background:rgb(163,0,0) !important; } And later when I'm trying to copy text I'm receiving: test test test But I want something like this and I have no oportunity to use any framework or something like this: test test test Thanks.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41461603
favorite count: 0
type: UnansweredQuestion
score: -3
tagged with: css
has comment: http://stackoverflow.com/comment/41461547
upvote count: 1
type: Question
has title: Remove empty lines when copy text from
answer count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/41461368
has answer: http://stackoverflow.com/a/59137147
has comment: http://stackoverflow.com/comment/41461498
tagged with: javascript
has answer: http://stackoverflow.com/a/26407233
has comment: http://stackoverflow.com/comment/41462134

http://stackoverflow.com/a/26446472
upvote count: 1
answers question: http://stackoverflow.com/q/26446442
has comment: http://stackoverflow.com/comment/41535610
has comment: http://stackoverflow.com/comment/41535751
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41535676
has body: The problem with your code is that the click function only sets the event handlers to what DOM elements are available at the moment it is called. This means you won't be able to use it for anything that is added to the DOM afterwards. The solution is to use the on() function instead, like this: $(document).on('click', '#create', function() { $('#container').html(' again cancel '); }); $(document).on('click', '#again', function() { $('#container').html(' create '); }); $(document).on('click', '#cancel', function() { $('#container').html(' cancel '); }); on() works with elements that are dynamically added to the DOM. See your example here: http://codepen.io/anon/pen/rLjki However, there are nicer ways to do this (like having all the needed buttons in the DOM the whole time, and just toggling which are visible and which are not at what stage).
has comment: http://stackoverflow.com/comment/41535467
has comment: http://stackoverflow.com/comment/41535686
has comment: http://stackoverflow.com/comment/41535714
type: Answer
accepted answer of: http://stackoverflow.com/q/26446442
has comment: http://stackoverflow.com/comment/41535636

http://stackoverflow.com/q/26468560
answer count: 1
has comment: http://stackoverflow.com/comment/41577716
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41575995
has body: I'm building a script which grabs some content from a JSON file and dynamically build some html. The Html is to display some product information as some sort of lookbook. Inside the html there are a few dropdown boxes. These boxes are also created dynamically. Everything is working fine except that the content from the last dropdownbox is used for every dropdown that is build. See attached image: I personally think that the reason is why this is happening is because the variants are build and appended before the actual HTML is build??! $('#sets .set').each( function(){ .... $.getJSON(url, function (data){ var product = data.product; var $container = $('.products .product'); var productsHtml = []; $.each(product.related, function(index, rel){ $.getJSON(url, function (data){ var rel = data.product; var wqsSelectVariants = $(' '); var select = $(' '); $.each(rel.variants, function (index, variant){ select.append(' ' + variant.title + ' '); wqsSelectVariants.append(select); }); $('.varianten').html(wqsSelectVariants); }); var productHtml = '' + ' €'+rel.price.price_incl+' '; productsHtml.push(productHtml); }); productsHtml = productsHtml.join(''); $container.html(productsHtml); }); }); HTML **-- in here the content from the script example below --** €39.95 Maat: M/L Does any body know what I'm doing wrong??
has comment: http://stackoverflow.com/comment/41577745
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26470259
has comment: http://stackoverflow.com/comment/41575606
tagged with: http://stackoverflow.com/tag/json
type: Question
score: 0
has title: Dynamic dropdowns won't fill with correct content

http://stackoverflow.com/q/26392581
type: Question
has body: I am unable to get my ticks to show up with my d3 svg line based series plot(the little line that usually shows up on the axis marking points on the x and y axis) http://plnkr.co/edit/KvJHXM6bjSeEIsZUsXLk?p=preview I think I maybe missing an option here var xAxis = d3.svg.axis() .scale(x) .orient("bottom") .ticks(4) .tickFormat(function(d) { var mmdd = d.getMonth() + '/' + d.getDate(); var time = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds(); return mmdd + " "+ time; }) .tickSize(1) .tickPadding(8); var yAxis = d3.svg.axis() .scale(y) .tickSize(1) .ticks(6) .orient("left") .tickPadding(20); I have tried changing a few "tick" parameters but I can't see why my ticks are missing on both the x and y axis. Any help or pointers is appreciated. Thank you
score: 1
accepted answer: http://stackoverflow.com/a/26393552
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has title: Ticks not showing up for a multi-series d3 svg chart
upvote count: 1
has answer: http://stackoverflow.com/a/26393552

http://stackoverflow.com/q/26435024
answer count: 1
tagged with: javascript
tagged with: google-chrome-app
has body: I'm not getting any kind of transfer to happen between my chrome app and a simple device just waiting for data to come in on its uart rx line. The device's interface's endpoint's type is bulk, although I've tried every transfer type available (control, bulk, isochronous, and interrupt). Examples from here. I've also tried claiming the device, but that does not seem to be applicable if using findDevices and fails as well. I'm assuming that by finding the device, I know that it has been discovered, permissions are OK and that it has been opened OK. I'm using a UART-to-USB adapter on a mac. I've spoken to the same hardware setup using pysusb and a python script, so I know it can be done. var DEVICE_INFO = {"vendorId": 1027, "productId": 24577}; var searchForUsbDevice = function() { chrome.usb.findDevices(DEVICE_INFO, onDeviceFound); } var onDeviceFound = function(devices) { if (devices) { if (0 &lt; devices.length) { if (1 === devices.length) { device_ = devices[0]; console.log("Device found. And opened?"); getInterfaces(); getConfiguration(); //claimDevice(); investigateDevice(); } else { console.log("Ensure one and ONLY ONE device is plugged in."); } } else { console.log("Device could not be found"); setTimeout(searchForUsbDevice, 1000); } } else { console.log("Permission denied."); } }; var investigateDevice = function() { testBulkTransfer(); //testIsochronousTransfer(); //testInterruptTransfer(); //testControlTransfer(); setTimeout(investigateDevice, 1000); }; var testBulkTransfer = function() { var transferInfo = { "direction": "out", "endpoint": 1, "data": new Uint8Array([32, 2, 1, 2]).buffer }; chrome.usb.bulkTransfer(device_, transferInfo, function(info) { if (chrome.runtime.lastError) { console.log("info: " + JSON.stringify(info)); console.log("runtime error: " + JSON.stringify(chrome.runtime.lastError.message)); return; } console.log("transfer result: " + ((0 === info.resultCode) ? "succeeded" : "failed")); }); }; var getConfiguration = function() { chrome.us…
has title: bulkTransfer "Transfer failed."
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26474779
accepted answer: http://stackoverflow.com/a/26474779
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41516840

http://stackoverflow.com/q/26471842
type: Question
has comment: http://stackoverflow.com/comment/41585309
has body: I've looked everywhere for a solution, but everything I come up with isn't working. What I'm trying to accomplish is simple: I just want a popover to appear that describes what a button does when you hover over it. The button's code is as follows: &lt;button class="btn btn-danger deleteLine" type="button" id="deleteLine_&lt;@=lineCount@&gt;"&gt;&lt;i class="icon-remove"&gt;&lt;/i&gt;&lt;/button&gt; I've tried a regex looking for a match at the front of the id: $('[id^="deleteLine_"]').popover({ trigger: "hover focus", content: "Delete this line." }); $('button[id^="deleteLine_"]').popover({ trigger: "hover focus", content: "Delete this line." }); I've tried a regex on the id looking for a match anywhere in the id: $('[id*="deleteLine_"]').popover({ trigger: "hover focus", content: "Delete this line." }); $('button[id*="deleteLine_"]').popover({ trigger: "hover focus", content: "Delete this line." }); And I've tried latching onto the class "deleteLine" $('.deleteLine').popover({ trigger: "hover focus", content: "Delete this line." }); Struck out all three times. I'd like to avoid having to code "onmouseover" and "onfocus" attributes inline. I can't do static assignments (which works in other parts of the modal) due to the dynamic nature of the lines. I'm using Bootstrap 2.3.2 and jQuery 2.1.1 in IE10 and FF21. Upgrading to newer versions isn't an option, unfortunately.
tagged with: javascript
has title: Triggering popover on button hover
has comment: http://stackoverflow.com/comment/41583023
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41581613
tagged with: regex
has comment: http://stackoverflow.com/comment/41582800
type: AnsweredQuestion
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41582317
linked to: http://stackoverflow.com/q/17437818
has answer: http://stackoverflow.com/a/26479371
accepted answer: http://stackoverflow.com/a/26479371

http://stackoverflow.com/q/26489655
accepted answer: http://stackoverflow.com/a/26495677
favorite count: 0
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
upvote count: 1
has title: HTML Input AJAX Updating - add style to input field using Bootstrap
type: Question
has answer: http://stackoverflow.com/a/26495677
downvote count: 0
tagged with: javascript
has body: I'm working my way through some changes to an html form to perform an AJAX update when a user exits a field. I'm new to Javascript and AJAX so still working out syntax issues as I go but I've managed to get to the point where the user exits a field and a PHP page is called which updates the database. I'm now on to the final part which is making a change based on success or failure to let the user know what happened. I'm using the Twitter Bootstrap 3 framework so would like to leverage some of the available styles for success and failure, namely the following validations states: .has-success .has-error Here's the html input that triggers the AJAX call from when the user exits this field: Manager I'm not sure how to add a new class for success or failure of the AJAX call, and also if I need to display an error message how I can also incorporate that. Here's the Javascript that calls the PHP page: &lt;script type="text/javascript"&gt; function editProject(storeManager,uuid) { // Allocate an XMLHttpRequest object if (window.XMLHttpRequest) { // IE7+, Firefox, Chrome, Opera, Safari var xmlhttp=new XMLHttpRequest(); } else { // IE6, IE5 var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } // Set up the readyState change event handler xmlhttp.onreadystatechange = function() { if ((this.readyState == 4) &amp;&amp; (this.status == 200)) { document.getElementById("storeManager").innerHTML=xmlhttp.responseText; } } // Open an asynchronous POST connection and send request xmlhttp.open("POST", "editProject.php", true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("storeManager="+storeManager+"&amp;id="+uuid); } &lt;/script&gt; I gather this is the line I need to modify for the success option: document.getElementById("storeManager").innerHTML=xmlhttp.responseText; but not sure what the syntax would be, and then how to have a failure option (e.g. if the database update returns an error).
tagged with: ajax
has comment: http://stackoverflow.com/comment/41615416
tagged with: http://stackoverflow.com/tag/html
answer count: 1
score: 1

http://stackoverflow.com/q/26356626
answer count: 1
tagged with: web
favorite count: 0
upvote count: 12
type: UnansweredQuestion
tagged with: android
tagged with: barcode
tagged with: zxing
has title: Using zxing Barcode Scanner within a web page
has answer: http://stackoverflow.com/a/29931389
type: Question
has body: Is there a working example how you can use the zxing Barcode Scanner from a web page? Referring to this documentation: https://github.com/zxing/zxing/wiki/Scanning-From-Web-Pages shouldn't the following test code work? function Test1() { $.ajax( { url: "zxing://scan/?ret=http%3A%2F%2Ffoo.com%2Fproducts%2F%7BCODE%7D%2Fdescription&SCAN_FORMATS=UPC_A,EAN_13", success:function() { alert("success"); }, error:function() { alert("error"); } }); } function Test2() { $.ajax( { url: "http://zxing.appspot.com/scan?ret=http%3A%2F%2Ffoo.com%2Fproducts%2F%7BCODE%7D%2Fdescription&SCAN_FORMATS=UPC_A,EAN_13", success:function() { alert("success"); }, error:function() { alert("error"); } }); } Test 1 Test 2 I keep getting "error" on my Android 4.4.2 Samsung Galaxy TabPro and Samsung Galaxy S4. I've tried the stock browser, Chrome, Firefox and Dolphin Browser. Even http://zxing.appspot.com/scan doesn't work as it always asks me to install the (already installed) app. Any help would be much appreciated.
downvote count: 0
tagged with: javascript
score: 12

http://stackoverflow.com/q/26427661
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41508145
accepted answer: http://stackoverflow.com/a/26432931
has comment: http://stackoverflow.com/comment/41506549
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41501429
has title: node poller not exiting properly
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41510198
tagged with: javascript
has answer: http://stackoverflow.com/a/26432931
tagged with: http://stackoverflow.com/tag/q
has body: I have a function that will poll a database ever x seconds. I am using the Q library so the function will return a promise. The function will ultimetly be used in a long chain of .then()s. The function does give me the results that I expect but the function continues to run for 30-40 seconds after the results are returned. I cannot figure out why it would not exit right after I return. var _ = require('lodash'); var pg = require('pg'); var Q = require('q'); connString = 'postgres://somedb_info'; var query = "SELECT * FROM job where jobid='somejobid123123'"; exports.run_poller = function () { var deferred = Q.defer(); function exec_query(callback) { pg.connect(connString, function(err, client, done) { if(err) { deferred.reject(err); } client.query(query, function(err, result) { done(); if(err) { return deferred.reject(err); } callback(result.rows[0]); }); }); } function wait_for(res){ if(res.status == 'COMPLETE') { return deferred.resolve(res); } else { setTimeout(function(){ exec_query(wait_for); }, 1000); } } exec_query(wait_for); return deferred.promise; }; Just to test this I call the function from a main.js file like so: var poller = require('./utils/poller').run_poller; poller().then(console.log).catch(function(err) {console.log(err,'*');}); Why doesn't main.js exit right after the data is returned? Is there a better way to achieve this?

http://stackoverflow.com/a/26359895
type: Answer
answers question: http://stackoverflow.com/q/26359790
has body: Due to the hoisting of javascript, declarations always get shoved to the top of a scope before execution (you can't see that, js does that itself). That's why you can use the function in your first example before you declared it. In your second example you use seperate script elements for function declaration and usage. That is not possible, since the first script element get's compiled and executed before the browser starts to compile the second one.
score: 0

http://stackoverflow.com/comment/41443659
type: AnswerComment
has text: THANK YOU... HOW DID I MISS THAT LOL... Much appreciated!!
type: Comment
comment on: http://stackoverflow.com/a/26395652
score: 0

wicket
tags question: http://stackoverflow.com/q/26377890
type: Tag
tag name: wicket

http://stackoverflow.com/comment/41592284
type: QuestionComment
has text: can you clarify what backend are you using? node.js, php, etc.
comment on: http://stackoverflow.com/q/26474510
score: 0
type: Comment

http://stackoverflow.com/q/26355213
has answer: http://stackoverflow.com/a/43997913
has answer: http://stackoverflow.com/a/26355738
upvote count: 21
answer count: 7
possible better answer: http://stackoverflow.com/a/26355738
has answer: http://stackoverflow.com/a/28169323
has answer: http://stackoverflow.com/a/35859275
has body: I might have some kind of missunderstanding. Im using angular ui router and i have the next issue: I have the next State provider: angular .module('MainApp') .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider ) { $stateProvider .state('register', { url: "/", abstact: true, views: { "side-bar": { controller: "GetSideBarCtrl" }, "page-body@register": { templateUrl: "/App/Views/WelcomePage.html" } }, }) .state('register.Register', { url: "Register", views: { "page-body": { controller: "RegisterCtrl", templateUrl: "/App/Views/Register.html" } }, }) .state('register.Login', { url: "Login", views: { "page-body": { controller: "LoginCtrl", templateUrl: "/App/Views/Login.html" } }, }) //For registered and loged in users! /* */ .state('main', { url: "/:userId", // abstact: true, views: { "side-bar": { controller: "GetSideBarCtrl" }, "page-body@main": { // controller: "LoginCtrl", templateUrl: "/App/Views/MainPage.html" } }, }); $urlRouterProvider.otherwise('/'); }]); And run function angular .module('MainApp') .run(['$rootScope', '$state', '$cookieStore', 'principal', function ($rootScope, $state, $cookieStore, principal) { var cookies = $cookieStore.get('user'); if (cookies) { principal.Authenticate(cookies.split(' ')[0], cookies.split(' ')[1]); $state.go('main', { userId: cookies.split(' ')[0] }); } else { $state.go('register.Login'); } }]); Everything works fine, when cookies are present and authenication works without any problems but $state.go does nothing, i cant figure out why, can you please help and explain me...
has answer: http://stackoverflow.com/a/28226637
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27951449
tagged with: javascript
score: 21
favorite count: 0
has answer: http://stackoverflow.com/a/31859413
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/28169323
has title: module.run() and $state.go() angularJS

http://stackoverflow.com/comment/41454583
has text: I asked myself this question as well. MVC on the front-end is useful when you don't want to reload the whole website, you could do it with single ajax calls but you will repeat your self, and if the system become big, it become a messy. MVC on server side is maintainable and on front-end it is too. I always have the feeling that I repeat myself by doing front-end and back-end validation for example. but you are not repeating, you are doing it with two different languages. I am curious to know what X was. :)
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26401923

http://stackoverflow.com/q/26379182
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26379389
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26379250
has title: Stop ScrollTop function when user scrolls jquery
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has body: How can i stop the scrollTop function when the user scrolls himself? If i scroll now while the scrollTop function the whole scrolling glitches out. $(document).ready(function (){ $(".header-arrow-down").click(function (){ $('html, body').animate({ scrollTop: $(".page-1").offset().top }, 1000); }); $("body").scroll(function() { alert("scrolling"); }); }); I tried this so far but the alert scrolling isnt showing up for me and i can't find a solution on google so im asking it here. I hope someone knows how to fix this thanks!
type: UnansweredQuestion
tagged with: css
score: 3
upvote count: 3

http://stackoverflow.com/comment/41375725
type: Comment
comment on: http://stackoverflow.com/a/26358234
score: 0
type: AnswerComment
has text: I'm more interested in the difference between how the browsers handle JavaScript, rather than calculation time, so this is actually interesting to me. I'll be marking this as the answer unless something better comes along in the next few days. +1

http://stackoverflow.com/q/26374090
score: 4
possible better answer: http://stackoverflow.com/a/26374220
has comment: http://stackoverflow.com/comment/41446341
favorite count: 0
has answer: http://stackoverflow.com/a/26374119
tagged with: http://stackoverflow.com/tag/html
has title: Reason why I can't insert a comment inside the HTML tag?
upvote count: 6
has answer: http://stackoverflow.com/a/26376697
answer count: 4
type: AnsweredQuestion
downvote count: 2
has body: Are there any reason why I can't insert a comment inside the HTML tag? Sample: In HTML (Not Possible) &lt;img &lt;!-- sample comment--&gt; src="" alt="Sample Picture" class="img-circle center-block" /&gt; While in JavaScript it can be easily done. Sample: In JS (Possible) verticalCentered: /* Sample Comment*/ true Please explain it in a detailed way.
has answer: http://stackoverflow.com/a/26374137
type: Question
has answer: http://stackoverflow.com/a/26374220
has comment: http://stackoverflow.com/comment/41404533
has comment: http://stackoverflow.com/comment/41404561
tagged with: javascript
has comment: http://stackoverflow.com/comment/41404856
accepted answer: http://stackoverflow.com/a/26376697

http://stackoverflow.com/q/26458337
type: Question
has comment: http://stackoverflow.com/comment/41556730
tagged with: dom
tagged with: class
tagged with: getelementsbyname
score: 0
has comment: http://stackoverflow.com/comment/41556612
tagged with: javascript
has comment: http://stackoverflow.com/comment/41556749
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41556681
has body: In 2007 John Resig posted an in depth article with speed tests: http://ejohn.org/blog/getelementsbyclassname-speed-comparison/#postcomment 7 years later, what is currently the best way to get elements by class name?
answer count: 0
has title: Up-to-date getElementsByClassName Cross Browser - John Resig

http://stackoverflow.com/a/26958286
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/51212199
type: Answer
has body: You haven't been particularly descriptive with the errors you're seeing so I don't know if the following will help.. I had a problem originally when using the ui-select demo code as an example because they're using the propsFilter filter which is a custom filter they have written for the demo: &lt;ui-select-choices repeat="tag in all_tags | propsFilter: {name: $select.search}"&gt; I am assuming you're not including this filter in your code which may be a reason you're experiencing a problem. You can resolve it by using angular's normal filter: &lt;ui-select-choices repeat="tag in all_tags | filter: {name: $select.search}"&gt; Alternatively, if you have multiple properties to filter you can write the propsFilter filter to filter on OR rather than AND. If you use 'filter' to filter multiple properties it will try to match the search value across all of the properties. app.filter('propsFilter', function() { return function(items, props) { var out = []; if (angular.isArray(items)) { items.forEach(function(item) { var itemMatches = false; var keys = Object.keys(props); for (var i = 0; i &lt; keys.length; i++) { var prop = keys[i]; var text = props[prop].toLowerCase(); if (item[prop].toString().toLowerCase().indexOf(text) !== -1) { itemMatches = true; break; } } if (itemMatches) { out.push(item); } }); } else { // Let the output be the input untouched out = items; } return out; }; }); you can see the commit with the filter in it here: https://github.com/angular-ui/ui-select/commit/3fac88cfad0ad2369c567142eadba52bdb7998b1 Although if you have some specific filtering requirements I would recommend you to write your own filter to ensure optimum performance.
accepted answer of: http://stackoverflow.com/q/26506713
answers question: http://stackoverflow.com/q/26506713
score: 42
upvote count: 42
has comment: http://stackoverflow.com/comment/49744138
has comment: http://stackoverflow.com/comment/48335748

http://stackoverflow.com/q/26410430
type: Question
has comment: http://stackoverflow.com/comment/45291643
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
accepted answer: http://stackoverflow.com/a/26410456
tagged with: angularjs
has title: AngularJS alpha only regex is accepting special characters
tagged with: regex
favorite count: 0
duplicate of: http://stackoverflow.com/q/18661628
tagged with: asp.net-mvc-4
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26410456
has body: I have a very simple form with this regex pattern set on my first/last name fields ng-pattern="/^[a-zA-z]{2,30}$/" and both fields accept this value as being valid e.g. Tester\^*&amp;^%. The first/last name should only accept alpha character a-zA-Z with a minimum of 2 characters and a max of 30.

http://stackoverflow.com/q/26476196
has title: NaN node positions after setting initial position in d3 force-directed network
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41592417
favorite count: 0
tagged with: d3.js
has body: I'm creating a force-directed network in D3 where each node represents a webpage in a collection and directed links between them represent a hyperlink from one webpage to another. As the user moves between webpages, links are added to the network. The number of nodes/webpages in the collection doesn't change. Whenever a new link is added, I reload the network, reading in JSON code containing the new and old links and all the nodes. At the moment, I'm trying to "calm" the initial loading of this network so that nodes aren't created at random places, potentially creating a network where the nodes are nowhere near where they were before. To do this, I want to set the initial position of each node to what it was in the previous network. I've done this by setting the node's x and y attributes as seen in the following code snippet: var links = data.links; var nodes = data.nodes; var nodeDictionary = new Object(); if (node != 0) { force.stop(); node.each(function(d) { var pos = []; var thisNode = d3.select(this); pos[0] = thisNode.attr("x"); pos[1] = thisNode.attr("y"); var page = thisNode.attr("page"); nodeDictionary[page] = pos; }); nodes.forEach(function(node) { var x = nodeDictionary[node.id][0]; var y = nodeDictionary[node.id][1]; //node.px = undefined; //node.py = undefined; node.x = x; node.y = y; }); } This seems to work some of the time or for some nodes, but most of the time this results in the nodes having NaN positions. Specifically, these positions are NaN in the tick() method of the network, which looks like this: // Animates the force-directed network function tick() { node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); link.attr("d", drawCurve); } function drawCurve(d) { var testing = "M" + d.source.x + "," + d.source.y + "L" + d.target.x + "," + d.target.y; return testing } In other examples I've seen where an initial node position is set in a force-directed network, the tick() method looks more like this: force.on("tick",…
has comment: http://stackoverflow.com/comment/41590379
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26479465
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26479465
type: Question
tagged with: force-layout
tagged with: javascript

http://stackoverflow.com/comment/41871040
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26483207
has text: I've had succes using an iFrame as the InfoWindow's content: !

http://stackoverflow.com/q/26493142
has title: Converting a Webform application to MVC
has answer: http://stackoverflow.com/a/26493244
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26493244
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has body: I am converting an ASP.NET WebForm application into an ASP.NET MVC application and being new to MVC, I am trying to make sure I do this right. Currently, in my WebForm application, it is AJAX powered using jQuery and doing calls to WebMethods in the C# code behind. Currently, how the WebForm works now is there might a page with a few fields that need to be filled out and saved to the database. To do this, we'd have an HTML form and a save button. When the button is pressed, this javascript function is called: function SaveForm() { if (!ValidateForm()) return; ShowWaitingOverlay(); var params = {}; params.firstName = $('#&lt;%= txtFirstName.ClientID %&gt;').val(); params.lastName = $('#&lt;%= txtLastName.ClientID %&gt;').val(); params.address1 = $('#&lt;%= txtAddress1.ClientID %&gt;').val(); params.address2 = $('#&lt;%= txtAddress2.ClientID %&gt;').val(); // ... many more just like above $.ajax({ type: "POST", url: "Hosts.aspx/SaveHost", data: params, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { HideWaitingOverlay(); if (msg.d == "0") { alert("Save Failed!"); } } }); } This function would do an AJAX call to an ASP.NET Web Method that might look similar to this: [WebMethod] public static string SaveForm(string firstName, string lastName, string address1, string address2) { var host = new BusinessLayer.HostApplication(); host.FirstName = firstName; host.LastName = lastName; host.Address1 = address1; host.Address2 = address2; host.Save(); return host.HostId.ToString(); } Of course there are other irrelevant details omitted for brevity, but this is the general idea. My question is, what would be the correct "MVC way" of converting this? I would think a lot of this code would go away and/or be hidden in the data model. I wouldn't think it would be necessary to have to need all the lines that assign each individual textbox/dropdown, etc to the params variable.

http://stackoverflow.com/comment/41652067
has text: @almightyBoognish what do you mean by "its losing in a race condition"
type: QuestionComment
comment on: http://stackoverflow.com/q/26509720
score: 0
type: Comment

http://stackoverflow.com/q/26419135
score: 4
tagged with: youtube-iframe-api
has answer: http://stackoverflow.com/a/35330568
tagged with: youtube-api
tagged with: youtube
answer count: 1
has body: I embedded an iframe video and I want to detect when the user has exited (tapped “done”) the fullscreen functionality on mobile Safari that takes place when you tap “play”. I tried the code below: HTML JavaScript document.getElementById("video-iframe").addEventListener("webkitendfullscreen", function(){ alert("Hello World!"); }); Demo: http://jsfiddle.net/p3bLohfk/ But it's not working (iOS 8.0.2). Any ideas?
type: UnansweredQuestion
upvote count: 4
tagged with: ios
downvote count: 0
tagged with: javascript
has title: Detect “Done” on iPhone for YouTube/Vimeo videos (exit fullscreen)
favorite count: 0
type: Question

http://stackoverflow.com/q/26443858
has answer: http://stackoverflow.com/a/26443900
has body: I want to put a text next to an input box, after an successful if clause. Just need to know how to show up such text. Thanks And my code snippet: $("#username").append(" This username is not available ");
upvote count: 0
answer count: 1
has title: HTML/JS Show a text next to a input box
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41530510
score: -5
has comment: http://stackoverflow.com/comment/41530498
accepted answer: http://stackoverflow.com/a/26443900
type: Question
has comment: http://stackoverflow.com/comment/41530585
downvote count: 5
tagged with: javascript

http://stackoverflow.com/q/26395175
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41442693
has body: I have the following jquery code (compiled from coffee script). (function() { $(function() { return $.get('/proteins', function(proteins) {}); }); $.each(proteins, function(index, protein) { return $('#proteins').append($("&lt;li&gt;").text(protein.name)); }); }).call(this); The coffeescript that generated this code looks like this: $ -&gt; $.get '/proteins', (proteins) -&gt; $.each proteins, (index, protein) -&gt; $('#proteins').append $("&lt;li&gt;").text protein.name I keep getting a "Uncaught ReferenceError: proteins is not defined" at line 6 of my generated code. Am I missing something (very basic) here? Thanks!!
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41442494
has comment: http://stackoverflow.com/comment/41442696
has comment: http://stackoverflow.com/comment/41442373
has comment: http://stackoverflow.com/comment/41551183
tagged with: coffeescript
tagged with: referenceerror
type: Question
has comment: http://stackoverflow.com/comment/41512326
tagged with: javascript
has answer: http://stackoverflow.com/a/26455245
has title: Uncaught ReferenceError in jquery code compiled from coffeescript
score: 0

http://stackoverflow.com/comment/41524006
score: 0
has text: Write a JS function that does it in the controller.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26431102

http://stackoverflow.com/q/26413379
has comment: http://stackoverflow.com/comment/41475080
answer count: 0
score: 0
tagged with: local-storage
type: Question
has comment: http://stackoverflow.com/comment/41474954
tagged with: javascript
has title: Local storage wont work with
has comment: http://stackoverflow.com/comment/41475138
has comment: http://stackoverflow.com/comment/41475012
has comment: http://stackoverflow.com/comment/41474881
has comment: http://stackoverflow.com/comment/41475033
type: UnansweredQuestion
has body: I'm currently trying to make something work for in javascript, as u can see i made a Theater hall with javascript. I made a big table with inside the table data, with generated Id by the loop(which u can see under the if/else in function tekenZaal1(). Now if u press the Load button i want that the checked(pressed) checkboxes will be added to local storage. I've try some but it won't work, it adds only 1 string to to the local storage with key: undefined and value: undefined. i've no idea how to fix this what's wrong with my code? btw: i couldn't get jsfiddle to work with my code idk why but i have a screenshot of my full html and javascript code of the theather hall: http://gyazo.com/a9a3d23ee12e1862e447fab02075446a HTML: Reserveringspagina load javascript: var zaal1 = [ //Array van zaal1// [0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0], [0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,0,0,0], [0,0,0,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,0,0,0], [0,0,0,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,0,0,0], [0,0,0,1,1,1,1,2,2,2,2,2,2,3,3,3,3,2,2,2,2,2,2,1,1,1,1,0,0,0], [0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,2,2,2,2,2,1,1,1,1,1,0,0], [0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,1,1,1,1,1,0], [0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,1,1,1,1,1,0], [0,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,2,1,1,1,1,0], [0,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,2,1,1,1,1,0], [0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,2,1,1,1,1,1,0], [0,1,1,1,1,1,1,2,2,2,2,3,3,3,3,3,3,3,3,2,2,2,2,1,1,1,1,1,1,0], [0,1,1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,2,2,2,2,2,1,1,1,1,1,1,1,0], [0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,0,0], [0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,0], [0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,0,0,0], [0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,0,0,0], [0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0], [0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0], […
has comment: http://stackoverflow.com/comment/41474950

http://stackoverflow.com/a/26436244
type: Answer
upvote count: 1
score: 1
type: AcceptedAnswer
has body: I guess somewhat you mixed the syntax between JavaScript and MongoDB. $where executed by JavaScript engine on server side, so your $where statements must conform the syntax of JavaScipt. For example, this.chr.no == 5 is actually this.chr[index].no == 5 as you expected; and a variable is impossibly equal to two different values at the same time. The following codes for your reference: var judge = function () { var unexpect = "X"; var letter1 = unexpect, letter2 = unexpect; for (var i in this.chr) { var chr = this.chr[i]; if (chr.no == 5) { letter1 = chr.letter; } else if (chr.no == 6) { letter2 = chr.letter; } } if (letter1 != letter2 &amp;&amp; letter1 != unexpect &amp;&amp; letter2 != unexpect) { return true; } return false; }; db.sss.find({ "pos": { "$gte": 200000, "$lt": 2000000 }, "$and" : [{"chr.no" : 5}, {"chr.no" : 6}], // narrow range further "$where": judge }, {"x_type":1, "sub_name":1, "name":1, "pos":1, "s_type":1, _id:0});
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26435532
answers question: http://stackoverflow.com/q/26435532

http://stackoverflow.com/comment/41528673
type: AnswerComment
comment on: http://stackoverflow.com/a/26442786
score: 0
type: Comment
has text: @esswilly Yes, although if you are actually going to do it to all `` elements, it's better to dynamically add it, because DRY. (Don't repeat yourself - you don't want to type `onmouseover=` every time)

http://stackoverflow.com/comment/41534068
type: Comment
type: QuestionComment
score: 0
has text: Interesting. I feel like `==` is actually a *strength* of the language that should be used judiciously.
comment on: http://stackoverflow.com/q/26445248

http://stackoverflow.com/comment/41502416
type: QuestionComment
comment on: http://stackoverflow.com/q/26411902
has text: @Heikki Thanks! I'll try using watchify. I'll answer my own question with your suggestions if it works.
score: 0
type: Comment

http://stackoverflow.com/q/26387795
tagged with: canvas
tagged with: html5-canvas
has body: I have this canvas animation of some floating clouds and dropping box: var canvas, canvas_overlay, context, ctx_overlay, clouds, docWidth, docHeight, img_box, img_cloud1, img_cloud2, img_cloud3, img_ground; img_box = new Image(); img_cloud1 = new Image(); img_cloud2 = new Image(); img_cloud3 = new Image(); img_ground = new Image(); img_box.src = 'images/gift_box_small.png'; img_cloud1.src = 'images/cloud1.png'; img_cloud2.src = 'images/cloud2.png'; img_cloud3.src = 'images/cloud3.png'; img_ground.src = 'images/ground_pattern_small.jpg'; var mustBeReadyCount = 6; // must load image and window img_box.onload = launchWhenReady; img_cloud1.onload = launchWhenReady; img_cloud2.onload = launchWhenReady; img_cloud3.onload = launchWhenReady; img_ground.onload = launchWhenReady; window.onload = launchWhenReady; function launchWhenReady() { mustBeReadyCount--; if (mustBeReadyCount) return; init(); }; function init(){ docWidth = window.innerWidth; docHeight = window.innerHeight; canvas = document.getElementById('canvas'); canvas_overlay = document.getElementById('canvas_overlay'); context = canvas.getContext('2d'); ctx_overlay = canvas_overlay.getContext('2d'); resizeCanvas(docWidth, docHeight); drawGround(); var cloud1 = new Cloud(0, 10, docWidth, docHeight, img_cloud1, 3, 24); var cloud2 = new Cloud(Math.floor(docWidth/4*3), 48, docWidth, docHeight, img_cloud2, 5, 24); var cloud3 = new Cloud(Math.floor(docWidth/2), 90, docWidth, docHeight, img_cloud3, 1, 24); clouds = [cloud1, cloud2, cloud3]; boxAnimationData.animationStep = 'falling'; boxAnimationData.bounceHeight = (docHeight / 2 - img_box.height)-25; setInterval(createAnimations, 24); } var animationStep = ''; var boxAnimationData = { animationStep: '', y: 0-img_box.naturalHeight, maxY: 0, bounceCount: 10, direction: -1, bounceHeight: 0 }; window.onresize = function(){ init(); } function resizeCanvas(width, height){ canvas.width = canvas_overlay.width = docWidth; canvas.height = canvas_overlay.height = docHeight; } funct…
has answer: http://stackoverflow.com/a/67861252
type: AnsweredQuestion
has title: Canvas animation speeds up after window resized
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/67861252
has answer: http://stackoverflow.com/a/26387895
accepted answer: http://stackoverflow.com/a/26387895
score: 0
answer count: 2

http://stackoverflow.com/a/26426444
has comment: http://stackoverflow.com/comment/41527754
answers question: http://stackoverflow.com/q/26426298
downvote count: 1
has comment: http://stackoverflow.com/comment/41516830
has comment: http://stackoverflow.com/comment/41508288
type: Answer
has comment: http://stackoverflow.com/comment/41527811
has comment: http://stackoverflow.com/comment/41517392
has comment: http://stackoverflow.com/comment/41501749
has comment: http://stackoverflow.com/comment/41516801
has comment: http://stackoverflow.com/comment/41514483
upvote count: 28
has comment: http://stackoverflow.com/comment/41501659
has body: There is simply no need for an isUndefined() function. The reason behind this is explained in the ECMAScript specification: (Note that the NaN value is produced by the program expression NaN.) In some implementations, external code might be able to detect a difference between various Not-a-Number values, but such behaviour is implementation-dependent; to ECMAScript code, all NaN values are indistinguishable from each other. The isNaN() function acts as a way to detect whether something is NaN because equality operators do not work (as you'd expect, see below) on it. One NaN value is not equal to another NaN value: NaN === NaN; // false undefined on the other hand is different, and undefined values are distinguishable: undefined === undefined; // true If you're curious as to how the isNaN() function works, the ECMAScript specification also explains this for us too: Let num be ToNumber(number). ReturnIfAbrupt(num). If num is NaN, return true. Otherwise, return false. A reliable way for ECMAScript code to test if a value X is a NaN is an expression of the form X !== X. The result will be true if and only if X is a NaN. NaN !== NaN; // true 100 !== 100; // false var foo = NaN; foo !== foo; // true
score: 27
has comment: http://stackoverflow.com/comment/41505296

http://stackoverflow.com/comment/41545091
type: Comment
score: 0
has text: SO's comment/enter is really twitchy; yeah I have always used `substr` though I usually have to use `.length` on the second parameter so +1 for the extra insight.
type: AnswerComment
comment on: http://stackoverflow.com/a/26451830

http://stackoverflow.com/comment/41568173
comment on: http://stackoverflow.com/q/26438392
type: Comment
has text: It would be helpful if you provided some code. Am I right that your extension is XUL?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41488434
type: QuestionComment
comment on: http://stackoverflow.com/q/26421266
score: 0
has text: Try `document.getElementById('clubChoices').options[document.getElementById('clubChoices').selectedIndex].value`
type: Comment

http://stackoverflow.com/a/26361996
downvote count: 0
answers question: http://stackoverflow.com/q/26360893
type: Answer
accepted answer of: http://stackoverflow.com/q/26360893
has body: Maybe u can check with focus blur which tab is active and only send request from the active tab and store the result in localstorage. And add a EventListener to localstorage so that u can update the other tabs.
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41381956
type: AcceptedAnswer

http://stackoverflow.com/q/26506844
has comment: http://stackoverflow.com/comment/53677842
accepted answer: http://stackoverflow.com/a/26510208
has title: Submitting multiple dynamic forms
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41649139
tagged with: forms
has comment: http://stackoverflow.com/comment/41650787
type: Question
has answer: http://stackoverflow.com/a/26510208
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm trying to submit multiple forms at once when a single button is clicked. These forms are all generated automatically. They all have different action urls but the same id's. That's how the system (SaaS) works. The problem is that I'm having issues getting the correct selectbox values and then send the forms. I'm not getting any error but I think it has something to do with identifiers. I'm working on this one for a few days now and I can't figure this one out. So for every set/product there's some empty html, like so: HTML // first set /// in here comes the product data from json /// add to cart // second set /// in here comes the product data from json /// add to cart // etc... can be as much as 10 sets Inside the above HTML .product there comes an automatically generated form. This form is generated like so: Jquery $('#sets .set').each( function(){ $(this).click(function(){ if($(this).hasClass('open')){ $('.close').click(function(){ $('#sets .product').fadeOut(); $('.products',this).animate({ width: 'toggle'},500, function() { ....... }); }); } else { ..... } var url = $(this).data('handle')+'?format=json'; $.getJSON(url, function (data){ var product = data.product; var $container = $('.products .product'); var productsHtml = []; var fullurl = 'http://www.shop.com'; var variants = ''; $.each(product.related, function(index, rel){ var url = ''+fullurl+''+rel.url+'?format=json'; ...... etc ... var productHtml = ' €'+rel.price.price_incl+' '; $.getJSON(url, function (data){ var rel = data.product; var wqsSelectVariants = $(' '); var select = $(' '); $.each(rel.variants, function (index, variant){ select.append(' ' + variant.title + ' '); wqsSelectVariants.append(select); }); $('.varianten_'+rel.id).html(wqsSelectVariants); }); var price = rel.price.price_incl; sum += price; productHtml = productHtml + ' '; productsHtml.push(productHtml); }); $('.total').text('€'+sum.toFixed(2)); productsHtml = productsHtml.join('') $container.html(productsHtml); }); } }); }); etc.…
has comment: http://stackoverflow.com/comment/41650003
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41436528
type: Comment
comment on: http://stackoverflow.com/a/26391486
has text: Would this resolve an issue with two **different** controllers pointing to the same .when("" location?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41430413
comment on: http://stackoverflow.com/q/26388204
score: 0
type: Comment
type: QuestionComment
has text: Have you tried registering the onchange right after populating the second list? document.getElementById('selModel').onChange = loadXMLDoc1; Not sure if that's the problem but it's worth a try.

http://stackoverflow.com/q/26400009
has comment: http://stackoverflow.com/comment/130815150
has answer: http://stackoverflow.com/a/26417012
accepted answer: http://stackoverflow.com/a/26417012
type: Question
type: AnsweredQuestion
tagged with: javascript
tagged with: webgl
score: 4
upvote count: 4
tagged with: runtime-error
has title: WebGL: get error/warning message text as a string
answer count: 1
downvote count: 0
favorite count: 0
has body: When an error occurs within WebGL, a warning message is usually displayed in the browser's console. For example, trying to create a texture which is too big: gl.texImage2D( gl.TEXTURE_2D, // target 0, // level gl.RGBA, // internalformat 1000000, // width 1000000, // height 0, // border gl.RGBA, // format gl.UNSIGNED_BYTE, // type null // data ); Chrome and Safari display this warning message in the console: WebGL: INVALID_VALUE: texImage2D: width or height out of range Firefox displays this warning message: Error: WebGL: texImage2D: the maximum width for level 0 is 4096 How can I programmatically obtain this message from WebGL? I'm looking for something like gl.getErrorMessage() which would return a string. What I've tried WebGL errors don't throw JavaScript errors, so it's not possible to catch them to get their message property. gl.getError() only returns an ErrorCode enum value, such as INVALID_VALUE. gl.getShaderInfoLog() only provides error messages relating to a specific shader (eg. compilation errors). gl.getProgramInfoLog() only provides error messages relating to a specific program (eg. linking errors). Khronos have created a debugging wrapper called WebGLDebugUtils, but it seems the only method relating to error messages is glEnumToString(), which converts an enum value (eg. INVALID_VALUE) to a string.

http://stackoverflow.com/a/26474003
answers question: http://stackoverflow.com/q/26473912
type: Answer
accepted answer of: http://stackoverflow.com/q/26473912
has body: create.setAttribute('name', "\"red[" + i + "]"); should be create.setAttribute('name', "red[" + i + "]"); No need to escape.
has comment: http://stackoverflow.com/comment/41586042
has comment: http://stackoverflow.com/comment/41585864
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41586200

http://stackoverflow.com/q/26401556
possible better answer: http://stackoverflow.com/a/26401631
has answer: http://stackoverflow.com/a/26401631
tagged with: javascript
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/26417580
upvote count: 0
has comment: http://stackoverflow.com/comment/41453038
has comment: http://stackoverflow.com/comment/41453234
has comment: http://stackoverflow.com/comment/41452850
favorite count: 0
linked to: http://stackoverflow.com/q/11591784
accepted answer: http://stackoverflow.com/a/26417580
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41452879
has title: New line in JSON String wont work in chrome emulator
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41453404
downvote count: 1
has body: I am trying to insert newline between strings in json,but didnt work.Here is the code { id: 0, address: "First line\r\nsecond line" },
type: Question

http://stackoverflow.com/comment/41384619
type: AnswerComment
comment on: http://stackoverflow.com/a/26363443
type: Comment
has text: thanks, that looks great! also is there anyway to make the red height: 100%?. rather than a strip of red? thanks again
score: 0

http://stackoverflow.com/comment/41449187
comment on: http://stackoverflow.com/q/26398507
has text: Arif you are right I tried without data. Now could you please let me know why the data is not going? I am following very basic textbook code here :(
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41459290
has text: @ musefan i tried this fiddle http://jsfiddle.net/sELst/8/ it is not working, i am doing wrong??
score: 0
comment on: http://stackoverflow.com/q/26405072
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26466555
tagged with: javascript
score: 0
has body: I've got a simple rest service which provides a Route in my Ember app with some basic model data. Here is my attempt to make it available: model: function () { var promise = new Em.RSVP.Promise (function (resolve, reject) { var request = new XMLHttpRequest(); request.open("GET", "https://myStupidService/bla"); request.onreadystatechange = handler; request.setRequestHeader("Accept", "application/json"); request.setRequestHeader("Authorization", authHeader); request.send(); function handler () { if (this.readyState === this.DONE) { if (this.status === 200) { resolve(this.response); } else { reject(this); } } } }); return promise; } When I mock the resolve method like this ... // ... if (this.status === 200) { resolve({testProp: "RESOLVED"}); } else { // ... ... testProp can be rendered. I also know that there are no errors in the template and that the promise _data prop contains everything needed when logged. After several different, non-working variations (also tried jquery) I think its time for some insight. Thanks in advance!
tagged with: ember.js
type: UnansweredQuestion
tagged with: rsvp.js
has title: Ember and RSVP: Promise from Model hook not available in template
answer count: 0
has comment: http://stackoverflow.com/comment/41574546
has comment: http://stackoverflow.com/comment/41590090
has comment: http://stackoverflow.com/comment/41574789
type: Question

http://stackoverflow.com/q/26472617
has answer: http://stackoverflow.com/a/26476625
score: 0
accepted answer: http://stackoverflow.com/a/26476625
has title: Attempting to test require module returns undefined for anything
has comment: http://stackoverflow.com/comment/41588998
tagged with: requirejs
has body: I'm new at unit testing but I've tried many methods of getting my script (require module) loaded for use with my mocha test script. No matter what I do I always get undefined when I try to read a property or function or anything. Can anyone help point out what may be causing this? rmq.js (script to test) define(['bx_slider/1/bx_slider'], { ... ansrTotal: 0, ... init: function(settings) { var self = this; // do some stuff return self; } }); test-bootstrap.js require.config({ paths: { 'chai': '/node_modules/chai/chai', 'bx_slider/1/bx_slider': '/test/lib/bx_slider' }, baseUrl: '/', nodeRequire: require }); mocha.setup({ ui: 'bdd' }); require(['test/test'], function() { if (window.mochaPhantomJS) { mochaPhantomJS.run(); } else { mocha.run(); } }); test.js define(['chai'], function(chai) { var expect = chai.expect; var rmq = require(['../src/js/rmq']); describe('rmq test suite', function() { before(function() { return rmq.init(); }); it('should blah', function() { expect(rmq.ansrTotal).to.equal(0); }); }); }); If it helps, my directory structure is . /node_modules /src /js rmq.js /test /lib bx_slider.js require.js test-bootstrap.js test.js The exact error (for what I have currently written and posted here) in my CLI is Testing: test/test.js rmq test suite "before all" hook 'undefined' is not a function (evaluating 'rmq.init()')
has comment: http://stackoverflow.com/comment/41623553
type: Question
type: AnsweredQuestion
answer count: 1
tagged with: javascript
tagged with: mocha.js

http://stackoverflow.com/q/26468093
has comment: http://stackoverflow.com/comment/41574076
has answer: http://stackoverflow.com/a/26468180
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41574013
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26468262
has comment: http://stackoverflow.com/comment/41573890
score: 2
has comment: http://stackoverflow.com/comment/41573952
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/41573909
upvote count: 2
type: UnansweredQuestion
has title: Spinner not working
has body: I cannot seem to get this spinner to work. Any help is appreciated. I want this to display as the page is loading. .spinner { position: fixed; top: 50%; left: 50%; margin-left: -50px; /* half width of the spinner gif */ margin-top: -50px; /* half height of the spinner gif */ text-align:center; z-index:1234; overflow: auto; width: 100px; /* width of the spinner gif */ height: 102px /* height of the spinner gif +2px to fix IE8 iss */ } &lt;div id="spinner" class="spinner" style="display:none;"&gt; &lt;img id="img-spinner" src="https://www.cmfgroup.com/images/list-graphics/loader.gif? Status=Temp&amp;sfvrsn=2" alt="Loading"/&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#spinner").bind("ajaxSend", function() { $(this).show(); }).bind("ajaxStop", function() { $(this).hide(); }).bind("ajaxError", function() { $(this).hide(); }); }); &lt;/script&gt; Nothing is displayed with the page is loading

http://stackoverflow.com/comment/41387632
has text: It doesn't work with $evalAsync. My fillEditForm variable is initialized in my controller Angular, I'm calling a form by AJAX then I would like to set Angular variable from form input in view.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26364474

http://stackoverflow.com/a/26362126
has comment: http://stackoverflow.com/comment/41398120
answers question: http://stackoverflow.com/q/26361829
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26361829
score: 1
has body: I would save the xml file in a temp folder, then do an ajax get that runs the file from a specific off-set for (e.g.) 100 records: function processScript(offset) { $.ajax({ type: "POST", url: "some.php", data: { offset:offset }, dataType:'json', success: function(data) { var o = parseJSON(data); if(o.offset &gt; 0) { processScript(o.offset); } } }) } processScript(0); In some.php you would want to return a json object with a property 'offset' containing the next block of elements you want to process. When the xml file is complete, set offset to 0. The above code is enough to get you started. You will also want to do some sort of error cheching in the success function, as well as give a progress notification to the user (e.g. "3,600 of 38,000 lines process"?).
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/69167945
has text: The author @sean-owen might want to know about this, but to me it sounds like a problem with the browser. Have you tried another one? Don't forget to reset your default actions if you do...
comment on: http://stackoverflow.com/a/29931389
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/a/26380587
downvote count: 0
type: AcceptedAnswer
upvote count: 3
answers question: http://stackoverflow.com/q/26364037
accepted answer of: http://stackoverflow.com/q/26364037
has comment: http://stackoverflow.com/comment/43509813
has body: element.all(by.repeater('user in users')).filter(function(el, index){ should be return element.all(by.repeater('user in users')).filter(function(el, index){
type: Answer
score: 3

http://stackoverflow.com/comment/41431612
type: QuestionComment
comment on: http://stackoverflow.com/q/26388789
has text: Could you use RSS? Implementation would be a lot easier (there are numerous canned scripts) and it's well supported.
score: 0
type: Comment

http://stackoverflow.com/q/26456153
has answer: http://stackoverflow.com/a/26456188
type: Question
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/41552824
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26456341
has comment: http://stackoverflow.com/comment/41553332
answer count: 3
has body: Is there any way to detect with JavaScript/jQuery if an element is strike-through and underlined. So let's say we have: text here.other text here. Is it possible to detect if the text within is also underlined? *Ideally, it would not be allowed to look if has any children. I've been toying around with it and it seems peculiar that both styles use the same CSS property, which in turn makes me wonder how it even works in the first place. To make my problem clearer: I'm playing around with a self-made wysiwyg editor, for usability reasons I'm trying to implement a listener on the text which alters (lights up) editing buttons. e.g. when a part of text is bold the "B" button changes to an active state. I'm currently handling this by getting the element at the cursor and checking if the element is bold or inherits it. The problem with underline and striketrough is that they are neither overwriting the text-decoration attribute of each other, and are not visible in css when I put the cursor on a underlined text-fragment, the text-decoration property only shows as underline, while the text is both underline and line-through. In such situations I cannot know what the exact relation is between the element and the element; the element could be 100 parents back as far as I could know. A lot of text, but I hope it kinda clears up my situation.
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/26456362
has title: detect underline and strike through
has comment: http://stackoverflow.com/comment/41553349
has comment: http://stackoverflow.com/comment/41552856
accepted answer: http://stackoverflow.com/a/26456341
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26456188
has comment: http://stackoverflow.com/comment/41553180

http://stackoverflow.com/comment/41521116
type: Comment
comment on: http://stackoverflow.com/a/26438500
type: AnswerComment
has text: and i dnt want fixed 3 secs interval.. it shud get doubled after every time called
score: 0

http://stackoverflow.com/comment/41395024
comment on: http://stackoverflow.com/a/26367166
type: Comment
has text: How can I compare the rows and columns from H and F?
score: 0
type: AnswerComment

http://stackoverflow.com/a/26535279
has body: I had to do something similar recently, but what I ended up doing was to not prevent a second person from accessing a submitted application, but to notify them that someone else is currently working on it when they view it (passive feedback) and if they attempt to modify it, prevent them from doing so, either after the postback occurs and possibly rendering the UI in a readonly fashion (active feedback). I tracked the activity of who was using what with SignalR, this way I could dynamically update the list of applications when someone accessed one for the first time, or release an application when they leave the page, without forcing the user viewing the list of projects to refresh the page to be made aware of the change. I setup a signalR Hub in my code to track which project was claimed by whom. I implemented the tracking using ConcurrentDictionary class to tackle any sort of concurrency problems of modifying the collection. public class RetainedApplicationsHub : Hub { private static readonly ConcurrentDictionary&lt;Guid, RetainedApplication&gt; RetainedApplications = new ConcurrentDictionary&lt;Guid, RetainedApplication&gt;(); public static bool IsApplicationRetained(Guid applicationId) { return RetainedApplications.ContainsKey(applicationId); } public void RetainApplication(Guid applicationId, Guid personId) { var retainedSuccessfully = RetainedApplications.TryAdd(applicationId, new RetainedApplication{ConnectionId = Context.ConnectionId, PersonId = personId}); if(retainedSuccessfully) Clients.All.applicationRetained(applicationId); } public void ReleaseApplication(Guid applicationId) { RetainedApplication temp; RetainedApplications.TryRemove(applicationId, out temp); Clients.All.applicationReleased(applicationId); } public ICollection&lt;Guid&gt; GetRetainedApplicationIds() { return RetainedApplications.Keys; } public override Task OnDisconnected(bool stopCalled) { RetainedApplication temp; var applicationId = RetainedApplications.Single(x =&gt; x.Value.Connect…
has comment: http://stackoverflow.com/comment/41707858
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41707769
upvote count: 1
answers question: http://stackoverflow.com/q/26393713
score: 1

http://stackoverflow.com/a/26402963
type: Answer
has comment: http://stackoverflow.com/comment/41456866
answers question: http://stackoverflow.com/q/26401923
accepted answer of: http://stackoverflow.com/q/26401923
has body: Totally agree with New Dev answer. In the server, you handle state in the form of current logged user, data, and so on. In the client, your state will be the application state (which "page" or screen they're on, which is the currently selected item in a list, and so on). Think of the server (if it's implemented using a REST API) as your database+authentication, and your client as a desktop app (the UI state is what you're handling). This way of thinking really helped me initially with Backbone. Translate your SELECT to a collection.fetch, INSERT/UPDATE to a model.save() and DELETE to a model.destroy(). In a SPA, your API is your database and your SQL is HTTP and JSON -and probably more, but it may help to think it that way.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26380697
accepted answer of: http://stackoverflow.com/q/26380557
answers question: http://stackoverflow.com/q/26380557
type: Answer
has comment: http://stackoverflow.com/comment/41418276
score: 1
has comment: http://stackoverflow.com/comment/41416527
has comment: http://stackoverflow.com/comment/41416344
upvote count: 2
has comment: http://stackoverflow.com/comment/41418783
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/41417518
has body: This should work: var filename=$1.match(/(src=['"])?(.+\/)?([^."']+)/)[3]

http://stackoverflow.com/comment/41489745
comment on: http://stackoverflow.com/a/26420078
type: Comment
has text: Thank you very much for your quick reply, your code is working fine, Thnak you so much agin.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41495694
comment on: http://stackoverflow.com/a/26425223
score: 0
has text: or better use padding on parent element
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41457207
type: QuestionComment
comment on: http://stackoverflow.com/q/26388789
score: 0
has text: I'm very familiar with MAMP/XAMP but on this case I cannot install additional software in my machine.
type: Comment

http://stackoverflow.com/comment/41620432
comment on: http://stackoverflow.com/q/26493336
score: 0
type: Comment
has text: When you click edit, assuming you have a jquery on "click" event listener bound to the button, you can get the table row by: var $parentTr = $(this).closest('tr'); If you have a jsfiddle, I can probably be more specific
type: QuestionComment

http://stackoverflow.com/comment/61251037
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26429263
score: 2
has text: Because target should always have a value attribute (input/textarea), I would rather use `event.target.selectionEnd = event.target.value.length`;

http://stackoverflow.com/q/26448896
has comment: http://stackoverflow.com/comment/41542499
has answer: http://stackoverflow.com/a/26449796
has answer: http://stackoverflow.com/a/26448937
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26448920
has answer: http://stackoverflow.com/a/26449149
score: 0
tagged with: jquery-events
accepted answer: http://stackoverflow.com/a/26449149
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41570993
favorite count: 0
has title: How to replace onClick event dynamically?
answer count: 5
has body: I have following page: foo My expectations of this code execution following: I click on link and see 0, then click one more time and see 1, then click one more time and see 2....then 3....4...5....6 But actual result: I click on link and see 0, I click on link and see 0 and then 1 twice, I click on link one more time and see 0 2 2 2 2 and 1. Please help to understand what does happen and and how to rewrite it? Update Key of the question is invocation of old function with new argument on onclick action!
has comment: http://stackoverflow.com/comment/41570962
has comment: http://stackoverflow.com/comment/41565470
has answer: http://stackoverflow.com/a/26458801
downvote count: 1
possible better answer: http://stackoverflow.com/a/26448920
has comment: http://stackoverflow.com/comment/41541044
type: AnsweredQuestion
tagged with: onclick
type: Question
has comment: http://stackoverflow.com/comment/41543351

http://stackoverflow.com/a/26486187
answers question: http://stackoverflow.com/q/26486119
has body: $("div &gt; a").first().on("click", function(e){ e.preventDefault(); $(this).next("a").trigger("click"); }); Something like this?
accepted answer of: http://stackoverflow.com/q/26486119
type: Answer
has comment: http://stackoverflow.com/comment/41653638
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/41653943
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26411271
has title: check if user cursor between two tokens in textarea
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41473659
has comment: http://stackoverflow.com/comment/41471726
type: Question
has answer: http://stackoverflow.com/a/26411768
answer count: 1
has body: I am trying to design a special textarea which often has blocks of code. These code blocks are denoted by two ``` tokens, eg: ``` if __name__ == '__main__': name = raw_input("what's your name? ") print("Hello, {}!".format(name)) ``` I want two events to happen: when a user's cursor is in between fenced code blocks, and when a user's cursor leaves the fenced code blocks. When a user enters a code block, I want to enable code editting like converting the tab button to four spaces. When they leave the code block, I want to make an ajax call to render it. My main problem is trying to find whether the user's cursor is in one of these fenced code blocks and when their cursor leaves code blocks. How would this be handled in an efficient manner?
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/481076

http://stackoverflow.com/a/26500625
has body: Here is how you do that by using JavaScript Closures; var obj = (function() { var x = 'hello'; return { get: function() { return x; }, set: function(v) { x = v; } } })(); obj.get(); // hello obj.set('world'); obj.get(); // world You can only the change the value of the variable using the get and set functions.
score: 0
answers question: http://stackoverflow.com/q/26500511
type: Answer

http://stackoverflow.com/q/26364125
has answer: http://stackoverflow.com/a/26364939
type: Question
tagged with: javascript
tagged with: braintree
has title: Braintree Drop-In UI requires reload to work properly
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/26364939
favorite count: 0
tagged with: ruby
possible better answer: http://stackoverflow.com/a/29835433
has answer: http://stackoverflow.com/a/29835433
tagged with: ruby-on-rails
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I'm just getting started with the Braintree drop-in UI. Client side is javascript, server side is ruby on rails. My system is very simple right now. The user is given a list of invoices that pertain to them. When the invoices have not yet been paid, they can click 'pay' and be taken to a new page that includes the Braintree Drop-In UI. My issue is this: When the user is taken to the 'pay' page, the drop-in UI does not appear. If the user reloads the page, the drop-in UI appears. Why? Here's some relevant code. It's pretty vanilla and not done yet - just roughed in. From invoices/index.html.erb <% if invoice.paid %> <%= 'Paid' %> <% else %> <%= link_to 'Pay', payment_path(invoice.id) %> <% end %> From payments_controller: class PaymentsController < ApplicationController skip_before_action :verify_authenticity_token before_action :set_invoice, only: [:pay, :checkout] def pay Braintree::Configuration.environment = :sandbox Braintree::Configuration.merchant_id = 'merchant id' Braintree::Configuration.public_key = 'public key' Braintree::Configuration.private_key = 'private key' gon.client_token = Braintree::ClientToken.generate() end def checkout nonce = params[:payment_method_nonce] result = Braintree::Transaction.sale :amount => @invoice.amount, :payment_method_nonce => "nonce-from-the-client" if result.success? message='Payment processed successfully. Thank you!' @invoice.paid=true @invoice.save else message='Unable to process payment. Reason = ' + result.message end redirect_to invoices_path, notice: message end private def set_invoice @invoice = Invoice.find(params[:id]) end end pay.html.erb: Payments Invoice #: <%= @invoice.id %> Date: <%= @invoice.date %> Description: <%= @invoice.description %> Amount: <%= @invoice.amount %> New Transaction <%= form_tag payments_checkout_path do%> <%= hidden_field_tag 'id', @invoice.id %> Please enter your payment details: <%=submit_tag "Pay #{@invoice.amount}$", class: "button mt1" %> <%end%> and layouts/application.html.erb Ac…

http://stackoverflow.com/comment/41615151
has text: @AbraCadaver :)) you are right
score: 0
comment on: http://stackoverflow.com/q/26490452
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41485788
type: Comment
score: 0
type: QuestionComment
has text: i want the number 2 to be returned. when i execute those three lines of console.log(...)
comment on: http://stackoverflow.com/q/26419744

opencv
type: Tag
tag name: opencv
tags question: http://stackoverflow.com/q/26436508

http://stackoverflow.com/comment/41479989
type: QuestionComment
comment on: http://stackoverflow.com/q/26416356
score: 3
type: Comment
has text: Do not do what you are trying to do with `echo`, use http://www.php.net/json_encode

http://stackoverflow.com/q/26468829
accepted answer: http://stackoverflow.com/a/26469286
type: Question
tagged with: javascript
score: 0
has body: My goal is to check if a specific date object is within a time frame, and then show the right button on the page as a result. Currently, I have this: ng-if="payment.TransactionDateTime &lt;= *Six PM on the same day* &amp;&amp; payment.TransactionDateTime &gt;= *Six PM The Day before the payment.TransactionDateTime*" What should I do to make this work? I need to check if a payment occured between 6pm the day prior to the TransactionDateTime property of payment and 6pm the same day as the TransactionDateTimeProperty.
answer count: 1
has answer: http://stackoverflow.com/a/26469286
tagged with: angularjs
tagged with: datetime
has title: Compare a given Date object to a specific time on the same day
type: AnsweredQuestion

http://stackoverflow.com/q/26477657
has body: How come these are not the same?: var now = new Date(); now.setDate(3); console.log(now) //returns formatted date depending on current date And ... var now = new Date(); var day = now.setDate(3); console.log(day) //returns just numbers ??! JSFiddle
upvote count: 0
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/41592204
downvote count: 3
tagged with: date
has title: setDate method within another var returning a different value
type: Question
has answer: http://stackoverflow.com/a/26477690
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/41373964
score: 0
type: Comment
type: QuestionComment
has text: can you share the relevant html as well.. also the result of the console logging I asked above
comment on: http://stackoverflow.com/q/26357653

http://stackoverflow.com/a/26504859
type: Answer
has body: Colon is used for object notation (when you pass an object of properties). So one more version to set css property: $("#info").css({'font-size': fontsX + 'px'}); or even shorter $("#info").css({fontSize: fontsX + 'px'}); since jQuery will normalize snake-case names to cameCase.
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26504797
upvote count: 2

http://stackoverflow.com/comment/41401314
has text: Look into JSLint or JSHint
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26372134
type: Comment

http://stackoverflow.com/comment/41409802
has text: Yes, that's correct :) I'm interested in pros/cons of both
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26377108
type: QuestionComment

http://stackoverflow.com/comment/41466005
comment on: http://stackoverflow.com/a/26407990
score: 0
type: AnswerComment
has text: Welp, that stinks. Thanks!
type: Comment

http://stackoverflow.com/q/26470418
has body: As per the below screen shot, I'm trying to access the data held in the highlighted Div. (With a ID of "category". At the moment, this is returning a blank result, categorySelected = $('div#category.tag.categorylabel').val(); I presume that I'm not targeting the div correctly to get the data? What do I need to change to achieve this? In the example below, I want to capture the word "Work" to save to the Db in a later section of code. Here is the code, query used to return the results. var GlobalBadges = Parse.Object.extend("Global_Badges"); var query = new Parse.Query(GlobalBadges); query.exists("Global_Badges_img"); query.find({ success: function(results) { var friends = []; for (var i = 0; i &lt; results.length; i++) { friends.push({ imageURL: results[i].get('Global_Badges_img'), //friendRequestId: results[i].id, badgename: results[i].get('BadgeName'), category: results[i].get('category'), }); } // TW: replaced dynamic HTML generation with wrapper DIV that contains IMG and name DIV _.each(friends, function(item) { // using a wrapper so the user can click the pic or the name var wrapper = $('&lt;div&gt;&lt;/div&gt;'); wrapper.append('&lt;img class="images BadgeImgOutline responsive-image" src="' + item.imageURL + '" /&gt;'+ '&lt;br&gt;'); wrapper.append('&lt;div class="tag badgelabel" &gt;'+ item.badgename + '&lt;/div&gt;'+ '&lt;br&gt;'); wrapper.append('&lt;div id="category" class="tag categorylabel" &gt;'+ item.category + '&lt;/div&gt;'+ '&lt;br&gt;'+ '&lt;br&gt;' ); $('#container').append(wrapper); }); }, error: function(error) { alert("Error: " + error.code + " " + error.message); } });
possible better answer: http://stackoverflow.com/a/26470509
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26470509
has answer: http://stackoverflow.com/a/26470519
has comment: http://stackoverflow.com/comment/41580847
has answer: http://stackoverflow.com/a/26470439
type: Question
has comment: http://stackoverflow.com/comment/41580809
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41578605
has title: How to access a value stored within a DIV?
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41581077
accepted answer: http://stackoverflow.com/a/26470439
has comment: http://stackoverflow.com/comment/41581139
tagged with: parse-platform

http://stackoverflow.com/comment/41428488
type: Comment
type: QuestionComment
has text: Do you have the three script lines in your ` ` tag?
comment on: http://stackoverflow.com/q/26387096
score: 0

http://stackoverflow.com/q/26500065
has comment: http://stackoverflow.com/comment/41632886
score: 0
answer count: 1
has title: AJAX - Javascript is breaking whenever the AJAX script is called
has comment: http://stackoverflow.com/comment/41632665
tagged with: ajax
has comment: http://stackoverflow.com/comment/41632930
has body: I hired a developer to help with some work, he was mostly PHP focused and attempted this javascript. The following AJAX script breaks the page whenever it reloads the HTML into the DOM. It called a function via Codenigniter to reload the view within the page. Once this happens, all of the javascript no longer works. I can't seem to find a solution that helps solve this issue. Please help. Note: Ideally I would of rather the code only loaded the data and not refresh the HTML, but for now this will need to do as I am up against a timeline. The code: $(document).ready(function () { // Ajax Form Submit $('body').on('click', '.submitForm', function () { var formid = $(this).parents('form').attr('id'); var validationResult = $('#' + formid).validationEngine('validate'); if (!validationResult) { return false; } var url = $('#' + formid).attr('action'); var formdata = $('#' + formid).serialize(); if ($('#' + formid).find('.submitForm').hasClass('loading')) { $(this).hide(); $('#' + formid).find('.loader').show(); } $.ajax({ type: "POST", cache: false, url: url, data: formdata, dataType: 'json', success: function (data) { if ($('#' + formid).find('.submitForm').hasClass('loading')) { $('#' + formid).find('.submitForm').css('display', 'inline'); $('#' + formid).find('.loader').hide(); } if (data.type == 'add') { if (data.html) { var newhtml = "&lt;tr&gt;" + data.html + "&lt;/tr&gt;"; $('.tab-pane.active table').append(newhtml); } $('#' + formid).find('.message').html(data.msg).show(); $('#' + formid).trigger('reset'); setInterval(function () { $('#' + formid).find('.message').hide(); }, 5000); } else { if (data.error) { $('#' + formid + ' .message').show().html(data.error); } else { $('#' + formid + ' .message').show().html(data.msg); if (data.reload_loc) { window.setTimeout(function () { window.location.href = data.reload_loc; }, 4 * 1000); } } } } }); }); // Generic Save Form Data $('body').on('click', '#saveFormdata', function () { var formid = $(this).parents('form').attr…
has answer: http://stackoverflow.com/a/26500485
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41632691
has comment: http://stackoverflow.com/comment/41641572
type: Question
has comment: http://stackoverflow.com/comment/41632942
has comment: http://stackoverflow.com/comment/41632902
accepted answer: http://stackoverflow.com/a/26500485
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26416870
score: 3
has comment: http://stackoverflow.com/comment/41480965
upvote count: 3
has comment: http://stackoverflow.com/comment/41481125
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41481084
accepted answer of: http://stackoverflow.com/q/26416766
answers question: http://stackoverflow.com/q/26416766
downvote count: 0
has body: Remove the flex-direction: column; from .row-fluid JSFiddle - DEMO .row-fluid > div { border:1px solid red; } @media only screen and (min-width: 764px) and (max-width: 925px) { .row-fluid { display: flex; flex-wrap: wrap; } .span2 { order: 1; } .span7 { order: 3; } .span3 { order: 2; } .row-fluid > .span2 { width: 45%; height: 360px; } .row-fluid > .span3 { width: 48%; height: 360px; } .row-fluid > .span7 { width: 100%; } } span2 span7 span3

http://stackoverflow.com/q/26504540
has comment: http://stackoverflow.com/comment/41642315
tagged with: captcha
answer count: 0
has comment: http://stackoverflow.com/comment/41663594
has comment: http://stackoverflow.com/comment/41640275
type: Question
has comment: http://stackoverflow.com/comment/41640683
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41659299
has title: Audio captcha not working on IE - Angular
tagged with: recaptcha
tagged with: angularjs
type: UnansweredQuestion
has body: I have a captcha webservice that returns audio but as doesn't play on IE. I suspect that's because if I hit the webservice on my IE browser directly, it prompts me to open or save while for my firefox it automatically loads and plays the audio captcha. Is there any way I can load the audio automatically on the browser before play it for the user? This is what I have tried inside my js file but no luck :( $scope.audio = document.createElement('audio'); $scope.audio.src="http://xx.xx.xx.xx:yyyy/.../getSound"; //webservice call $scope.audio.load(); $scope.audio.play();
has comment: http://stackoverflow.com/comment/41707383

http://stackoverflow.com/q/26387803
favorite count: 0
has answer: http://stackoverflow.com/a/26885748
has comment: http://stackoverflow.com/comment/42317318
has body: I am having a problem getting the knockout model to update when a user uses the PageDown button bar to make changes to the editor text. Any typing, pasting, or cutting works fine but the button bar actions do not. I have tried adding a hook for onPreviewRefresh to the editor but that never seems to fire. Here is a Fiddle showing the issue. If you type test into the editor, test will show up in the preview section. However, if you type test into the editor and then use the menu bar to make test bold then the preview section does not see this update until you type another character. This is the custom binding that I am using to initialize the PageDown editor: var ME = {}; ME.MarkdownConverter = Markdown.getSanitizingConverter(); ME.MarkdownCounter = 0; ko.bindingHandlers.markdownEditor = { init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { ++ME.MarkdownCounter; // Create the elements needed for a new PageDown editor. $(element).append($('&lt;div id="wmd-button-bar-' + ME.MarkdownCounter + '" class="wmd-button-bar"&gt;&lt;/div&gt;')); $(element).append($('&lt;textarea id="wmd-input-' + ME.MarkdownCounter + '" class="wmd-input"&gt;&lt;/textarea&gt;')); // Make sure the textarea is properly binded up so that the view model is updated. var newBindings = { textInput: valueAccessor }; ko.applyBindingAccessorsToNode($('#wmd-input-' + ME.MarkdownCounter)[0], newBindings, viewModel); // Create the editor and apply to the new elements ensuring that we detect all // changes from the wmd-button-bar. var editor = new Markdown.Editor(ME.MarkdownConverter, "-" + ME.MarkdownCounter); editor.hooks.chain("onPreviewRefresh", function () { var value = valueAccessor(); debugger; value($('#wmd-input-' + ME.MarkdownCounter).val()); }); editor.run(); return { controlsDescendantBindings: true }; } };
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: pagedown
accepted answer: http://stackoverflow.com/a/26885748
tagged with: knockout.js
type: Question
tagged with: custom-binding
tagged with: javascript
downvote count: 0
answer count: 1
has title: Why isn't the PageDown Editor triggering Knockout value update when using the button bar?

http://stackoverflow.com/q/26513403
accepted answer: http://stackoverflow.com/a/26513585
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26513784
has comment: http://stackoverflow.com/comment/41656786
has answer: http://stackoverflow.com/a/26513784
has title: Grabbing inner html tags with Javascript
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41656799
favorite count: 0
has answer: http://stackoverflow.com/a/26513585
type: Question
has body: I am trying to get the objects for the inner for this html. The one with the id=config_# Chrome 29 Chrome 31 Chrome 33 Chrome 35 Firefox 11 Firefox 15 Internet Explorer 8 My code: var list = document.getElementsByClassName("browser_list"); console.log(list); for (var i = 0; i < list.length; i++) { var items = list.getElementsByTagName("li"); console.log(items); } console.log(list) works fine but when I try to getElementsByTagName("li") I get the error: Uncaught TypeError: undefined is not a function I feel as though I am missing something but as I am new to JS I am not sure what it is
answer count: 2
upvote count: 1

http://stackoverflow.com/q/26490594
upvote count: 1
has comment: http://stackoverflow.com/comment/41619313
has body: I have a large table with a lot of data. Basically I'm trying to check, if a letter was pressed while someone was hovering over a &lt;tr&gt;. What I'm trying to do is basically blackout on the whole screen except for the hovered row when someone presses the letter f so that it can basically just focus on that row. Easier to see in the midst of a lot of data. Here's what I have so far. Don't know if I'm in the right direction, but it's not detecting me pressing the letter. Also, if they press f again or esc or click outside of the row, I'd like it to go back to normal. $(function(){ $('#report tr').on('mouseover',function(){ $('#report tr').removeClass('sel'); $(this).addClass('sel'); $(this).keypress(function(event){ if(event==70){ alert('hello'); } }); }); });
score: 1
has answer: http://stackoverflow.com/a/26491041
type: Question
has comment: http://stackoverflow.com/comment/41619684
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26502804
answer count: 3
has answer: http://stackoverflow.com/a/26492285
favorite count: 0
type: UnansweredQuestion
has title: How do I onmouseover in a check to see if a key was pressed

http://stackoverflow.com/q/26391522
has answer: http://stackoverflow.com/a/26391558
type: UnansweredQuestion
has body: I am trying to get the height and width of the browser widow so it returns null the example code is below I also used $("window").load(function()) that I found in stackoverflow and still it returns null.
has comment: http://stackoverflow.com/comment/41436304
has comment: http://stackoverflow.com/comment/41436232
has comment: http://stackoverflow.com/comment/41436210
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26391584
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: jquery alert($("window").height() + " " + $("document").height() + " " +$("window").width()); returns all values as null
favorite count: 0

http://stackoverflow.com/comment/41427408
comment on: http://stackoverflow.com/a/26386509
score: 0
type: AnswerComment
type: Comment
has text: Thanks buddy and for the effort - works like a charm!

http://stackoverflow.com/comment/74664530
score: 1
has text: Please look at this [issue](https://github.com/chjj/marked/issues/504) where I posted my solution.
comment on: http://stackoverflow.com/q/26507341
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26372401
has title: how to update clipPath attributes in D3.js
has body: I want to change the dimensions of a clipPath in a svg element. I don't want to create a new clipPath, so I tried using d3 to update or create the clipPath if not exists. var svgCanvas = d3.select(this).selectAll("svg").data([d]); svgCanvas.enter().append("svg"); svgCanvas.attr("width", width).attr("height", height); svgCanvas.selectAll('clipPath').data([1]); svgCanvas.enter().append('clipPath') .attr("id", "clip-area") .append("rect") .attr("x", 0) .attr("y", 0) .attr("width", width) .attr("height", height); // Now I can reference the clipped area with #clip-area The problem comes once I have already created the clipPath and I try to retrieve it with svgCanvas.selectAll('clipPath'). The selection is empty and a new clipPath is created instead of modify the existing one. How can I update the clipPath?
has comment: http://stackoverflow.com/comment/41425376
has comment: http://stackoverflow.com/comment/41409553
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41401592
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41410595
type: Question

http://stackoverflow.com/q/26357243
answer count: 0
type: Question
tagged with: if-statement
has comment: http://stackoverflow.com/comment/41373618
has title: Two event handlers clicking each other, without endless loop?
tagged with: javascript
score: 0
tagged with: logical-operators
has comment: http://stackoverflow.com/comment/41373476
has body: New user here, trying to learn something that I reckon is pretty basic. But I've run into this scenario where I wanted to populate a list of google map markers from an array already prepared. So what I wanted to do was to zoom in on the marker in the map, as well as highlight the corresponding element in the list. And let both the map marker and the list element be clickable, and do the same thing. Clicking each other. Without them looping forever. In this case, I ran independent functions for each handler that did the actual work. And that's the correct way of doing it. But it made me think of how poorly I understand logical operators. Instead of throwing in all the code here, I've simplified it to these basics and created a CodePen to illustrate: http://codepen.io/anon/pen/amiuy Here's the code as well: Html: Button 1 Button 2 Item 1 Javascript: $(document).on('click', '#button1', function(e) { console.log('clicked button 1'); $(this).css('color', 'red'); $('#button2').trigger('click'); populateList('button1'); }); $(document).on('click', '#button2', function(e) { console.log('clicked button 2'); $(this).css('color', 'button'); $('#button1').trigger('click'); populateList('button2'); }); function populateList (button) { var list = $_('#list'); list.append(' New item from: ' + button + ' ') } I know I can solve this by creating variables for each click handler, setting it to true or false accordingly. But it's this logic that I'm having trouble with. When should they be set to true and when should they be set to false? Edit: I also understand that I should run functions in click handlers, and let the two click handlers run the same functions, not triggering each other. But this is just the basic understanding of logical operators I guess. I just need to learn this, regardless of this example being stupid. Because I might run into scenarios similar to this in the future. And these things always throw me off.
type: UnansweredQuestion

http://stackoverflow.com/comment/41641430
score: 0
type: QuestionComment
type: Comment
has text: Tell me which the heading is
comment on: http://stackoverflow.com/q/26502054

http://stackoverflow.com/q/26402852
has title: google maps api after page loading call
has comment: http://stackoverflow.com/comment/41464744
score: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29417510
has answer: http://stackoverflow.com/a/26408083
has body: I want to set up internationalization on a google place autocomplete. By selecting a language, the app should load the correct google api for that language. For now I have this js code : function loadScript(src) { var script = document.createElement("script"); document.body.appendChild(script); script.src = src; }; $('#' + country_id).change(function(){ delete google.maps; $('script').each(function () { if (this.src.indexOf('googleapis.com/maps') &gt;= 0 || this.src.indexOf('maps.gstatic.com') &gt;= 0 || this.src.indexOf('earthbuilder.googleapis.com') &gt;= 0) { // console.log('removed', this.src); $(this).remove(); } }); loadScript("http://maps.googleapis.com/maps/api/js?libraries=places&amp;sensor=false&amp;language=" + this.value); setTimeout(function(){ google_address(input_id, options_type, country_id, auto_complete) }, 2000); }); where google_address is the function to set up the autocomplete. this solution doesn't work and throw me the error on chrome : Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened. also tried to use google.load but with no more success... Any idea will be very welcome.
type: Question
answer count: 2
tagged with: google-maps
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: google-maps-api-3

http://stackoverflow.com/q/26480137
has answer: http://stackoverflow.com/a/26480355
downvote count: 1
has comment: http://stackoverflow.com/comment/41596600
favorite count: 0
possible better answer: http://stackoverflow.com/a/49477512
upvote count: 0
has comment: http://stackoverflow.com/comment/41596419
has comment: http://stackoverflow.com/comment/41596543
has body: I want to know how to set values to java variable from jquery. Html Code: TEST Java code public class method(){ String paymentId; public void setPaymentId(String paymentId) { this.paymentId = paymentId; } public String getPaymentId() { return paymentId; } } But i did not get any value while submitting the form. I am getting null value from bean.
has title: How to set java bean values from jquery
type: AnsweredQuestion
tagged with: jsf
accepted answer: http://stackoverflow.com/a/26480355
has answer: http://stackoverflow.com/a/49477512
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: -1

http://stackoverflow.com/comment/41544548
has text: Isn't it `Meteor.user()`?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26451579

http://stackoverflow.com/q/26486482
score: 0
has title: JavaScript loop with
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26487106
has body: I´m trying to make a calender for a school assignment using JavaScript, in my Function Kalander loop i tried to generate the days of the month inside and . I'm not quite sure how i fit in the openening inside the loop. i'd like to have rows of 7 days. HMTL: html> Vorige Volgende JavaScript: var dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; var today = new Date(); var dag = today.getDay(); var myMonth = today.getMonth(); var jaar = today.getFullYear(); var VolgendeFunc = function(){ myMonth = myMonth + 1; Kalender(); } var VorigeFunc = function(){ myMonth = myMonth -1; Kalender(); } function Kalender(){ var myHTML =''; myHTML+=monthNames[myMonth] + " " + jaar + " "; for (var i=1; i <= monthLength[myMonth]; i++) { myHTML+=" " + i + "</ "; if (i%7 == 0) { myHTML += " "; } } document.getElementById('div').innerHTML = myHTML; } window.onload=Kalender();
has comment: http://stackoverflow.com/comment/41607267
upvote count: 1
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26487106
has comment: http://stackoverflow.com/comment/41607365
type: Question
has comment: http://stackoverflow.com/comment/41607890
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/41634656
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26484154
score: 0
has text: It doesn't need, actually, to combine two directives. I don't know how many directives we would need. It was just what I was thinking, maybe we need 2 directives combined. So the question is, how can I achieve that HTML markup implementing my own directive/s in AngularJS? Thanks for replying, by the way.

http://stackoverflow.com/a/26479402
has comment: http://stackoverflow.com/comment/41618399
has body: The minification process uses uglify-js to minify the sources. You could create your own minification process using uglify-js or some other node module. The source for the minification and concatenation steps is in the enyo/tools directory. You can perhaps even do a better job minifying if you can identify moonstone modules you definitely don't need and leave them out of the build.
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26469632
has comment: http://stackoverflow.com/comment/41620011
accepted answer of: http://stackoverflow.com/q/26469632
has comment: http://stackoverflow.com/comment/41649123
type: Answer
has comment: http://stackoverflow.com/comment/41630998
downvote count: 0
has comment: http://stackoverflow.com/comment/41620033
score: 1

http://stackoverflow.com/a/26371362
upvote count: 1
has comment: http://stackoverflow.com/comment/41440628
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41438738
score: 1
has comment: http://stackoverflow.com/comment/41409179
answers question: http://stackoverflow.com/q/26369858
has comment: http://stackoverflow.com/comment/41429322
has comment: http://stackoverflow.com/comment/41400864
has body: ...so, considering I get the problem as you describe it, you can avoid javascript and do it using pure css and media queries: @media (max-width:500px) { #foo { display:block; } #foo2 { display:none; } } @media (min-width:501px) { #foo2 { display:block; } #foo { display:none; } } edit: ..this will definately have nothing to do with scrolling and will certainly be faster and cleaner
has comment: http://stackoverflow.com/comment/41400364

http://stackoverflow.com/q/26438056
tagged with: javascript
has answer: http://stackoverflow.com/a/26438084
upvote count: 1
has body: Was wondering if there was a way to condense this and have it go on li:nth-child(1){ background-image: url(1.jpg); } li:nth-child(2){ background-image: url(2.jpg); } li:nth-child(3){ background-image: url(3.jpg); } li:nth-child(4){ background-image: url(4.jpg); } li:nth-child(5){ background-image: url(5.jpg); } And so on and so on. Would there be a way to have this go on with pure css variables or is there an easier solution with javascript?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26438127
favorite count: 0
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26438084
has answer: http://stackoverflow.com/a/26438127
has comment: http://stackoverflow.com/comment/41520285
type: Question
answer count: 2
tagged with: css-selectors
downvote count: 0
has title: Having a specific background image for each and every list item

http://stackoverflow.com/a/26388019
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26387725
has comment: http://stackoverflow.com/comment/41463142
answers question: http://stackoverflow.com/q/26387725
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: There are two ways to accomplish this: 1) is you can accomplish this with js and cookies... https://developer.mozilla.org/en-US/docs/Web/API/document.cookie the idea is to create a cookie when the user leaves the page saving the form data, and then when the same page is loaded again, check if there is a cookie and if so then set the form fields to the cookie data.... it's pretty simple just look at a couple examples. 2) coordinate the form with a server using php or AJAX and have the page rendered with a context containing the data from the first submit and repopulating the form with the context data

http://stackoverflow.com/comment/41487271
comment on: http://stackoverflow.com/a/26420582
score: 0
type: AnswerComment
type: Comment
has text: That might be the answer i have been looking for! I am sending them to a dynamically generated page but I suppose I shouldn't try to make the happen at the same time I POST the data.

http://stackoverflow.com/a/26500276
type: Answer
downvote count: 0
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26499893
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26499893
has body: The ^ sign is the exponent function not the square root so use Math.pow to calculate it var yield = 9.89; var coupon_frequency= 4.00; var coupons_until_maturity = 15.00 var calcValueOne = (1 - Math.pow((1 + (yield/100) / coupon_frequency), - coupons_until_maturity)) / ( (yield/100) / coupon_frequency); document.body.innerHTML = calcValueOne;

http://stackoverflow.com/a/26444174
has comment: http://stackoverflow.com/comment/41535620
accepted answer of: http://stackoverflow.com/q/26444027
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26444027
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41538250
has body: The answer will depend on what you intend to do with the token from your server. If you just need to make a couple quick service calls, it's usually sufficient just to write some JS that sends the token to your server. If you want to hold on to the token for more than an hour, everything changes. The access token itself will expire so what you really need is an auth code which can be used to get a long-term refresh token which can in turn be used to get short-term access tokens. Read more about this at http://msdn.microsoft.com/en-us/library/hh243649.aspx and check out the SDK samples here: https://github.com/liveservices/LiveSDK-for-Windows/tree/master/src/Web Fwiw, the reason your server doesn't see the access token in the redirect is because it appears after the '#' in the URL. This is intentional for security reasons. While all of this sounds complicated it is actually a textbook implementation of OAuth 2.0 so if you may find value in reading that spec.

http://stackoverflow.com/comment/41411819
type: QuestionComment
has text: Try it this way **var eq = (str1 == str2);**
score: 0
comment on: http://stackoverflow.com/q/26378276
type: Comment

d3.js
tags question: http://stackoverflow.com/q/26406151
tags question: http://stackoverflow.com/q/26417273
tags question: http://stackoverflow.com/q/26359563
tags question: http://stackoverflow.com/q/26382950
tags question: http://stackoverflow.com/q/26409078
tags question: http://stackoverflow.com/q/26511748
tags question: http://stackoverflow.com/q/26453916
tags question: http://stackoverflow.com/q/26511142
tags question: http://stackoverflow.com/q/26375592
tags question: http://stackoverflow.com/q/26496083
tags question: http://stackoverflow.com/q/26419622
tags question: http://stackoverflow.com/q/26508333
tags question: http://stackoverflow.com/q/26444866
tags question: http://stackoverflow.com/q/26443251
tags question: http://stackoverflow.com/q/26409687
tags question: http://stackoverflow.com/q/26414561
tags question: http://stackoverflow.com/q/26418777
tags question: http://stackoverflow.com/q/26399510
tags question: http://stackoverflow.com/q/26482265
tags question: http://stackoverflow.com/q/26433413
tags question: http://stackoverflow.com/q/26391508
tags question: http://stackoverflow.com/q/26387209
tags question: http://stackoverflow.com/q/26461840
tags question: http://stackoverflow.com/q/26415057
tags question: http://stackoverflow.com/q/26483264
tags question: http://stackoverflow.com/q/26472294
tags question: http://stackoverflow.com/q/26424301
tags question: http://stackoverflow.com/q/26363258
tags question: http://stackoverflow.com/q/26477860
tags question: http://stackoverflow.com/q/26437093
tags question: http://stackoverflow.com/q/26421664
type: Tag
tags question: http://stackoverflow.com/q/26467658
tags question: http://stackoverflow.com/q/26362757
tags question: http://stackoverflow.com/q/26371410
tags question: http://stackoverflow.com/q/26394120
tags question: http://stackoverflow.com/q/26420786
tags question: http://stackoverflow.com/q/26499844
tags question: http://stackoverflow.com/q/26371221
tags question: http://stackoverflow.com/q/26466644
tags question: http://stackoverflow.com/q/26441646
tags question: http://stackoverflow.com/q/26359982
tags question: http://stackoverflow.com/q/26506210
tags question: http://stackoverflow.com/q/26406694
tags question: http://stackoverflow.com/q/26410662
tags question: http://stackoverflow.com/q/26406881
tags question: http://stackoverflow.com/q/26471497
tags question: http://stackoverflow.com/q/26371794
tags question: http://stackoverflow.com/q/26426971
tags question: http://stackoverflow.com/q/26506445
tags question: http://stackoverflow.com/q/26416369
tags question: http://stackoverflow.com/q/26427603
tags question: http://stackoverflow.com/q/26392398
tags question: http://stackoverflow.com/q/26495048
tags question: http://stackoverflow.com/q/26373133
tags question: http://stackoverflow.com/q/26378960
tag name: d3.js
tags question: http://stackoverflow.com/q/26365420
tags question: http://stackoverflow.com/q/26390847
tags question: http://stackoverflow.com/q/26378931
tags question: http://stackoverflow.com/q/26379159
tags question: http://stackoverflow.com/q/26453769
tags question: http://stackoverflow.com/q/26433184
tags question: http://stackoverflow.com/q/26355017
tags question: http://stackoverflow.com/q/26503407
tags question: http://stackoverflow.com/q/26468152
tags question: http://stackoverflow.com/q/26495966
tags question: http://stackoverflow.com/q/26476196
tags question: http://stackoverflow.com/q/26379778
tags question: http://stackoverflow.com/q/26481750
tags question: http://stackoverflow.com/q/26372401
tags question: http://stackoverflow.com/q/26421388
tags question: http://stackoverflow.com/q/26499849
tags question: http://stackoverflow.com/q/26483714
tags question: http://stackoverflow.com/q/26488880
tags question: http://stackoverflow.com/q/26392581
tags question: http://stackoverflow.com/q/26509520
tags question: http://stackoverflow.com/q/26432341
tags question: http://stackoverflow.com/q/26395104
tags question: http://stackoverflow.com/q/26490861

http://stackoverflow.com/comment/41552488
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26455931
type: Comment
has text: [`R.zipWith(R.add)`](http://ramda.github.io/ramdocs/docs/)

http://stackoverflow.com/comment/41442061
has text: A further improvement might be to only evaluate `$(window).scrollTop()` once, in case it is somewhat expensive (I tend to think of most DOM operations as expensive, especially ones to do with position information).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26394937
type: Comment

http://stackoverflow.com/comment/41619554
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26492612
has text: In that case you cannot use `getElementByID`. You might have better results using [`querySelector`](https://developer.mozilla.org/en-US/docs/Web/API/Document.querySelector). http://jsfiddle.net/hjb2kqz9/2/
type: Comment

http://stackoverflow.com/comment/41539465
comment on: http://stackoverflow.com/a/26448891
has text: No, it doesn't. It picks everything up.
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/26382041
upvote count: 1
linked to: http://stackoverflow.com/q/25359247
tagged with: phantomjs
score: 1
tagged with: web-scraping
has body: I use Phantomjs to scrape websites that use JavaScript and Ajax to load dynamic content. I have the following code: var page = require('webpage').create(); page.onError = function(msg, trace) { var msgStack = ['ERROR: ' + msg]; if (trace &amp;&amp; trace.length) { msgStack.push('TRACE:'); trace.forEach(function(t) { msgStack.push(' -&gt; ' + t.file + ': ' + t.line + (t.function ? ' (in function "' + t.function +'")' : '')); }); } console.error(msgStack.join('\n')); }; page.onConsoleMessage = function(msg, lineNum, sourceId) { console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")'); }; page.open('http://www.betexplorer.com/soccer/germany/oberliga-bayern-sud/wolfratshausen-unterhaching-ii/x8rBMAB8/', function () { console.log(page.content); phantom.exit(); }); The problem is that this code doesn't retrieve the source code i want. If you enter the URL through a web browser(like chrome) and read the source code(the dynamic source code, after the JavaScript and Ajax calls were made) of the page, you will see that the web browser source code and the Phantomjs source code are completely different. But in this case i need the web browsers source code. Usually this Phantomjs code retrieves the source code i need, but in the case of this url(any many others) Phantomjs does not retrieve the correct source code. I assume Phantomjs doesn't know how to handle the JavaScript and Ajax calls that load dynamic content into this page. I get these errors when i run the code: ERROR: TypeError: 'undefined' is not a function (evaluating 'function(e){ this.pointer.x = e.pageX; this.pointer.y = e.pageY; }.bind(this)') TRACE: -&gt; http://www.betexplorer.com/gres/tooltip.js?serial=1410131213: 207 -&gt; http://www.betexplorer.com/gres/tooltip.js?serial=1410131213: 157 -&gt; http://www.betexplorer.com/gres/tooltip.js?serial=1410131213: 310 (in function "tooltip") -&gt; http://www.betexplorer.com/soccer/germany/oberliga-bayern-sud/wolfratshausen-unterhaching-ii/x8…
type: Question
has comment: http://stackoverflow.com/comment/41419815
tagged with: javascript
tagged with: ajax
has answer: http://stackoverflow.com/a/26383058
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Phantomjs page.content isn't retrieving the page content

http://stackoverflow.com/comment/41615237
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26416823
has text: also... [starting on page 19](https://images-na.ssl-images-amazon.com/images/G/02/mwsportal/doc/en_US/offamazonpayments/AmazonPaymentsAdvancedIntegrationGuide.pdf) this has more details about the process than I found anywhere else online so far. Sometimes errors aren't exactly spot on, it could be some other info missing, too.

http://stackoverflow.com/comment/41476509
comment on: http://stackoverflow.com/a/26414099
score: 0
has text: You should use `console.log()` instead of `alert()`. And someone made a good performance test [here](http://jsperf.com/browser-diet-jquery-each-vs-for-loop)
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26430584
has body: I am trying to find out the best way to implement nextId() in a Javascript app that issues unique IDs for its objects. If it matters, it's a program that I am doing as a learning experience that's pure JS, HTML, and CSS (no libraries, frameworks, DBMS, etc.). I saw a similar question on here on SO (although I wasn't able to find it again for the link) with answers that included not only storing a list of possible ids paired with a boolean value to determine if the id is used, but also storing deleted ids in a recycling list to use for future objects that need it. I think the latter option sounds better, but I'm sure there are even more ways to do it. Does anyone know if there is a pattern, algorithm, or otherwise best practice for this task? EDIT: I would like to allow users to share data at some point soon in the application's life, so IDs that already exist would likely become an issue at some point. I would like the IDs to be permanent as I will be persisting data with LocalStorage. A simple integer will work which I will prefix with a letter or two to identify the type of object. It would also be nice to fill in the holes, so the integer doesn't get too high when users use it long-term (wishful thinking). Also, all objects are constructed from strings at the beginning of the program (I know it's insane).
possible better answer: http://stackoverflow.com/a/26430624
has answer: http://stackoverflow.com/a/26430725
score: 0
has answer: http://stackoverflow.com/a/26430624
has comment: http://stackoverflow.com/comment/41509572
has comment: http://stackoverflow.com/comment/41506023
has title: How do I find the next ID?
tagged with: design-patterns
type: Question
accepted answer: http://stackoverflow.com/a/26430725
has answer: http://stackoverflow.com/a/26431180
tagged with: algorithm
has answer: http://stackoverflow.com/a/26430800
has comment: http://stackoverflow.com/comment/41508481
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/26433261
has comment: http://stackoverflow.com/comment/41506759
has answer: http://stackoverflow.com/a/26430656
has comment: http://stackoverflow.com/comment/41507178
type: AnsweredQuestion

http://stackoverflow.com/comment/41560416
type: Comment
has text: Thanks for the explanation Dr.Molle. Also, thanks for the solution you proposed. I will dive into the issue within few days and I will post other questions I have eventually.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26372631

http://stackoverflow.com/a/26480109
has comment: http://stackoverflow.com/comment/41605569
has comment: http://stackoverflow.com/comment/41603775
upvote count: 2
has comment: http://stackoverflow.com/comment/41597108
type: Answer
score: 2
has body: you can use a regex like ^(http:\/\/)?(www\.)?\w+\.(com|net|org)$ see the example http://regex101.com/r/uQ9aL4/1 how it works? ^ anchors the regex at the begining of the line. (http:\/\/)? mathces 0 or 1 occurence of http:// (www\.) matches 0 or 1 occurence of www. \w* mathces any number of alphanum .(com|net|org)$ matches .com or .net or .org $ anchors the regex at the end of the string.
has comment: http://stackoverflow.com/comment/41598134
has comment: http://stackoverflow.com/comment/41607023
has comment: http://stackoverflow.com/comment/41597209
downvote count: 0
has comment: http://stackoverflow.com/comment/41606321
answers question: http://stackoverflow.com/q/26479889

http://stackoverflow.com/comment/41657557
has text: I apologize, I'm not looking for someone to just do my work for free. What I'm looking for is a nudge in the right direction of building the `ItemInputControl()` object, and how the callbacks can be designated within it. I'm fine writing out the necessary HTML. I built the control once already with HTML and JS, but it was specific to that location on the site. I'd like functionality so that I can say "okay, take this basic concept, and apply it on another page, and another page"
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26512408
type: QuestionComment

http://stackoverflow.com/comment/41652285
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26500548
has text: @Gustav - As Steve suspected and was correct I did not have the correct return type in the error function when I had previously added the error function after the `}`. That's why I couldn't get it to compile.

http://stackoverflow.com/a/26384881
score: 0
has body: One way; str = str.replace(/(^name=\")(.*\.)/, "$1");
type: Answer
answers question: http://stackoverflow.com/q/26384721

web-services
type: Tag
tags question: http://stackoverflow.com/q/26417705
tags question: http://stackoverflow.com/q/26440590
tags question: http://stackoverflow.com/q/26354985
tags question: http://stackoverflow.com/q/26381696
tag name: web-services
tags question: http://stackoverflow.com/q/26437261

http://stackoverflow.com/comment/41640254
type: Comment
comment on: http://stackoverflow.com/a/26504344
score: 0
has text: For IE11: for both `input` and `select` it works. For Firefox: for both `input` and `select` it doesn't work. For Opera and Chrome: for`input` it works, for `select` it doesn't work.
type: AnswerComment

http://stackoverflow.com/q/26361673
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: While testing no-js fallbacks on my site in Chrome 37.0, I open up Developer Tools, hit the Settings icon and check "Disable Javascript". But then when I refresh to see my no-js site, "Disable Javascript" becomes unchecked and my scripts still run. (Changing chrome://settings/ still works, though.) Has anyone else seen this issue? Is it a bug with 37.0? How do I fix this?
accepted answer: http://stackoverflow.com/a/27691328
has comment: http://stackoverflow.com/comment/41381457
score: 2
has title: Chrome's "Disable Javascript" feature resets on refresh
upvote count: 2
tagged with: google-chrome
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/43961179
has comment: http://stackoverflow.com/comment/41384048
has answer: http://stackoverflow.com/a/27691328

http://stackoverflow.com/a/29672294
type: Answer
answers question: http://stackoverflow.com/q/26469201
accepted answer of: http://stackoverflow.com/q/26469201
score: 0
type: AcceptedAnswer
has body: Found it! Yay! You can use Polymer's helper onMutation function (or perhaps vanilla MutationObserver) ready: function(){ this.onMutation(this.shadowRoot, function(observer, mutations){ console.log('template should have updated'); }); }, Note that you need to listen on the element's shadowRoot and not the element itself as apparently change events don't pierce shadow boundaries. I didn't notice at first but it is stated in the docs that it's only for listening changes in the light dom.

http://stackoverflow.com/comment/41638158
has text: @T.J.Crowder it means exactly that, OP can't change the code of the function. Like elclanrs said, a polyfill is needed here.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26503202

http://stackoverflow.com/comment/41524821
score: 0
comment on: http://stackoverflow.com/q/26438458
type: Comment
has text: @RickHitchcock do you want to print the `data` variable for you, maybe you can test or somethign?
type: QuestionComment

http://stackoverflow.com/comment/41525028
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26440773
has text: Well, how you would handle the http errors is probably depending on the usecase i guess. You inject $q where you inject $http, in controller and/or service. Where ever you have implemented the getData function.

http://stackoverflow.com/comment/41563959
type: Comment
type: QuestionComment
has text: You should read more about factories and services. I'd advise against storing data in $rootScope as it might quickly get unmaintainable, services will provide you with same functionality but will separate data in nice namespaced manner
comment on: http://stackoverflow.com/q/26462454
score: 0

http://stackoverflow.com/q/26461209
has title: How to decrypt in Java strings that have been encrypted using JS crypto
downvote count: 0
score: 1
tagged with: java
has comment: http://stackoverflow.com/comment/41611272
type: Question
has comment: http://stackoverflow.com/comment/41561672
has answer: http://stackoverflow.com/a/44179348
tagged with: javascript
has comment: http://stackoverflow.com/comment/41606463
has comment: http://stackoverflow.com/comment/41606069
answer count: 2
has answer: http://stackoverflow.com/a/26499496
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41562562
type: UnansweredQuestion
has body: What would be the equivalent of this JS code in Java, using javax.crypto.xxx? encryptString : function encryptString(str, password) { var cipher = crypto.createCipher("aes128", password); return cipher.update(str, "binary", "base64") + cipher.final("base64"); }, decryptString : function decryptString(str, password) { var desipher = crypto.createDecipher("aes128", password); return desipher.update(str, "base64", "binary") + desipher.final("binary"); } I'll be encoding in JS to decode in Java, and vice versa. Both 'str' and 'password' variables are strings, 'password' being 16 chars long. Looks like this createCipher(algorithm, password) method uses some method to generate raw key and IV, which is not standard across the board. I think using createCipheriv(algorithm, key, iv) will be a more portable approach. More here: http://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv I'll update the latest soon.
tagged with: encryption
has comment: http://stackoverflow.com/comment/41631167

http://stackoverflow.com/a/45837213
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26384399
has body: You have to added in the client routes:modules/"application-module"/client/config/client.routes.js. refer to the below code. .state('dashboards.dashboard_2', { url: "/dashboard_2", templateUrl: "views/dashboard_2.html", data: { pageTitle: 'Dashboard 2' }, resolve: { loadPlugin: function ($ocLazyLoad) { return $ocLazyLoad.load([ { serie: true, name: 'angular-flot', files: [ 'js/plugins/flot/jquery.flot.js', 'js/plugins/flot/jquery.flot.time.js', 'js/plugins/flot/jquery.flot.tooltip.min.js', 'js/plugins/flot/jquery.flot.spline.js', 'js/plugins/flot/jquery.flot.resize.js', 'js/plugins/flot/jquery.flot.pie.js', 'js/plugins/flot/curvedLines.js', 'js/plugins/flot/angular-flot.js' ] }, { serie: true, files: ['js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js', 'js/plugins/jvectormap/jquery-jvectormap-2.0.2.css'] }, { serie: true, files: ['js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js'] }, { name: 'ui.checkbox', files: ['js/bootstrap/angular-bootstrap-checkbox.js'] } ]); } } })

http://stackoverflow.com/a/26361164
has comment: http://stackoverflow.com/comment/41381000
has comment: http://stackoverflow.com/comment/41382376
has comment: http://stackoverflow.com/comment/41381809
has comment: http://stackoverflow.com/comment/41381240
has body: Try this: birds.php Searching <input type="button" value="Search" onClick="loadData(<?php $_POST['page'] ?>);" /> And your search query should be generated as follows: $searchPar = ''; if(!empty($search)){ $searchPar = "WHERE (`species` LIKE '%".$search."%') OR (`location` LIKE '%".$search."%')"; } $query = "SELECT * from birds $searchPar LIMIT $start, $per_page";
downvote count: 0
has comment: http://stackoverflow.com/comment/41381896
answers question: http://stackoverflow.com/q/26358153
has comment: http://stackoverflow.com/comment/41382079
has comment: http://stackoverflow.com/comment/41382049
type: Answer
has comment: http://stackoverflow.com/comment/41381761
has comment: http://stackoverflow.com/comment/41382555
score: 1
has comment: http://stackoverflow.com/comment/41380757
upvote count: 1

http://stackoverflow.com/comment/41782962
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26487273
has text: Thanks a lot @m.brand, it works! Just a single doubt. How do I check what the `loginStatus` variable contains depending on whether the promise was rejected or resolved? Should I ask a new question for it?
type: AnswerComment

http://stackoverflow.com/comment/41473725
type: Comment
type: QuestionComment
has text: thanks guys, that was the problem, the additional comma!
score: 0
comment on: http://stackoverflow.com/q/26412582

http://stackoverflow.com/comment/41494620
comment on: http://stackoverflow.com/a/26424629
has text: Try again with comparing to boolean strings instead of clean booleans as in my edited answer
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41376565
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26359133
score: 0
has text: @NiravGandhi That's no duplicate. The OP evidently knows *how* to target multiple elements.

http://stackoverflow.com/a/26370079
has comment: http://stackoverflow.com/comment/41397325
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26369940
score: 3
has body: This is just a guess, but there's a good chance that the browser is just caching the file. You could add cache control headers on the server, or else add a nonce parameter each time you change the background: var counter = 1, refreshId = setInterval(function() { $container.css("background-image", "url(bg.php?_=" + counter++ + ")"); }, 9000); It's probably a good idea to go ahead and set the cache headers properly anyway, just to avoid having client browsers needlessly cache the same image over and over again.
has comment: http://stackoverflow.com/comment/41397382
upvote count: 3

http://stackoverflow.com/a/53468476
type: Answer
upvote count: 4
has body: When you want to create interval store promise to variable: var p = $interval(function() { ... },1000); And when you want to stop / clear the interval simply use: $interval.cancel(p);
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/26447923

http://stackoverflow.com/comment/41438815
comment on: http://stackoverflow.com/q/26388960
has text: Here's my fiddle: http://jsfiddle.net/o7z1pnfx/ Just scroll to the bottom and click the button. It will display that the scroll position is 0 (which is obviously incorrect).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26439957
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26440067
tagged with: backbone.js
type: UnansweredQuestion
has title: Backbone.js doesn't save variable in collection
type: Question
has body: I've got a few list elements with some movie titles in them. When a user clicks on a list element containing a movie title I want to save that movie title into the Backbone collection so that the movie title is added to the users record. This is my indexView class Movieseat.Views.MovieseatsIndex extends Backbone.View template: JST['movieseats/index'] initialize: -&gt; @collection.on('reset', @render, this) render: -&gt; $(@el).html(@template(movies: @collection)) this events: -&gt; "click li": "showtext" showtext: (e) -&gt; movie_title = $(e.target).text() @collection.create title: $('movie_title').text() My Collections class Movieseat.Collections.Movieseats extends Backbone.Collection url: '/api/movies' defaults: title: "" And my template &lt;% for movie in @movies.models: %&gt; &lt;div class="movie-frame"&gt;&lt;%= movie.get('title') %&gt;&lt;/div&gt; &lt;% end %&gt; I had this working using backbone models, but I since then I've been following the RailsCast backbone video's and there he's using collections so I'm switching over. On my homepage (where I render the template) I have a few .movie-frame elements filled with a movie title from when I was using models. But when I click on a element now, I do get a new .movie-frame element, but it doesn't have any content. So I'm guessing the problem is within this part showtext: (e) -&gt; movie_title = $(e.target).text() @collection.create title: $('movie_title').text() I've been looking in this code for to long and feel I'm missing something obvious.

http://stackoverflow.com/a/26419856
type: Answer
has comment: http://stackoverflow.com/comment/41486029
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26419766
answers question: http://stackoverflow.com/q/26419766
has body: You need to escape the quote on client-side, which means you need to escape a \ before the quote on the server-side, e.g. string myHyperlink = "Click Me!"; Will print: Click Me!
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26499165
tagged with: css
has body: If you do not know what position:sticky is, watch this 20 second long video: https://www.youtube.com/watch?v=jA67eda5i-A . This CSS feature was in talks in W3 and implemented in gecko I believe. But that is besides the point, the point is that not all browsers support it and I really want that functionality. Is there any way I can get this using a mix of CSS and/or javascript and/or jquery?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/60989450
has answer: http://stackoverflow.com/a/60989450
type: Question
accepted answer: http://stackoverflow.com/a/26499212
score: 0
answer count: 2
has title: What can I do to simulate Position:Sticky?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26499212
tagged with: sticky
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41584630
type: QuestionComment
has text: To clarify @HarishR's comment in case it's not obvious, use `ng-repeat: verb in verbs track by verb.id`
comment on: http://stackoverflow.com/q/26472079
score: 0
type: Comment

http://stackoverflow.com/q/26379209
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41413671
upvote count: 0
has comment: http://stackoverflow.com/comment/41414599
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41413714
has title: passing value to textbox
score: -1
has answer: http://stackoverflow.com/a/26379314
has answer: http://stackoverflow.com/a/26379425
tagged with: iframe
answer count: 2
downvote count: 1
has body: I'm working on project. I want to pass value of textbox1 to form 1 and form 3, but it passes value only to that form which comes first(here form1). < script type = "text/javascript" > submitForms = function() { var answer = document.getElementById("textbox1").value; var q = document.getElementById('q'); q.value = answer; var q1 = document.getElementById('q1'); q1.value=answer; document.forms["form1"].submit(); document.forms["form3"].submit(); } < /script>
has comment: http://stackoverflow.com/comment/41414490

header
type: Tag
tag name: header
tags question: http://stackoverflow.com/q/26433342

http://stackoverflow.com/comment/41525423
type: Comment
has text: I get the error: TypeError: jsontext.switches is not an object - Through Firefox when testing..
type: AnswerComment
comment on: http://stackoverflow.com/a/26441061
score: 0

http://stackoverflow.com/comment/41596070
has text: I added moveTopId because it wasn't defined.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26442642
type: AnswerComment

http://stackoverflow.com/q/26459382
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26459481
has body: I have the following code snippet. For some reason the validation is not working. I am trying to validate two things: that no textfield is left empty that the password field has at least 8 characters if any of these is false, I should get an error. But this error message is never being shown. Below is the snippet: function validate() { if (document.getElementById("name").value == '') { document.getElementById("errorMsg").value=="You have forgotten to enter your name"; } else if (document.getElementById("surname").value == '') { document.getElementById("errorMsg").value == "You have forgotten to enter your surname"; } else if (document.getElementById("email").value == '') { document.getElementById("errorMsg").value == "You have forgotten to enter your email address"; } } * { margin: 0px; padding: 0px; } #title{ font: bold 20px Tahoma; color: white; margin: 10px; text-align: left; width: 80%; } #header{ padding: 80px; font: 14px Tahoma; } body{ width:100%; display:-webkit-box; -webkit-box-pack: center; } #main_container{ max-width: 1000px; margin: 10px 0px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-box-flex: 1; } #control-container{ display:-webkit-box; -webkit-box-orient: horizontal; } #label-container{ -webkit-box-flex: 1; margin: 10px; } p { font: 14px Tahoma; margin: 20px; width: 350px; height: 30px; } #element-container{ width: 500px; margin: 20px 0px; display: -webkit-box; -webkit-box-orient: vertical; } #name{ font: 14px Tahoma; margin: 10px; width: 350px; height: 30px; } #surname{ font: 14px Tahoma; margin: 10px; width: 350px; height: 30px; } #email{ font: 14px Tahoma; margin: 10px; width: 350px; height: 30px; } #password{ font: 14px Tahoma; margin: 10px; width: 350px; height: 30px; } input[type="text"]:focus{ outline: none; box-shadow: 0px 0px 5px #7f0000; border:1px solid #b20000; } input[type="text"]:hover{ border: 1px solid #999; } input[type="text"]:focus:hover{ outline: none; box-shadow: 0px 0px 5px #7f0000; border:1px solid #b20000; } …
has comment: http://stackoverflow.com/comment/41559667
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41558463
score: 1
has comment: http://stackoverflow.com/comment/41558483
type: Question
has answer: http://stackoverflow.com/a/26459481
tagged with: javascript
tagged with: verification
has answer: http://stackoverflow.com/a/26460071
answer count: 2
has title: Javascript not validating fields
accepted answer: http://stackoverflow.com/a/26460071
upvote count: 1

http://stackoverflow.com/q/26477604
has comment: http://stackoverflow.com/comment/41598681
type: Question
has body: I have an excel sheet with a column of numbers(has only one column). I'm trying to write a script which reads the number from a spreadsheet but the next time it should not use(read) that value. One number from the column can be used only once. Seems a simple problem but not sure how exactly to go with this: My approach is: Have a step in the script that updates the excel list for flagging(used flag on) i.e., flag on if the number is used and pick a new number with used flag off. Not sure exactly about this approach. My scripting options are jython, groovy or javascript. I'm trying in jython since i wrote other scripts in the same and they worked fine.
tagged with: jython
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41594060
tagged with: groovy
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: excel
has title: Script for reading unused values from excel sheet
score: 1

http://stackoverflow.com/comment/69549399
has text: @RnMss - look at redux and reducers (http://redux.js.org/docs/basics/Reducers.html) and also reselect (https://github.com/reactjs/reselect).
type: AnswerComment
comment on: http://stackoverflow.com/a/26414427
score: 0
type: Comment

http://stackoverflow.com/comment/41521525
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26429337
has text: Thanks, but i finally decided to go with JQ
type: Comment

http://stackoverflow.com/a/26459440
accepted answer of: http://stackoverflow.com/q/26459042
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: You can simply add a or whatever to your HTML: First name: Last name: Age: Gender: City: Locality: Address: 0% completed And in your js file, on each change of input field, you count the required fields and the filled required fields to get the actual percentage. If you add required fields, you don't have to change anything in the js file. $(document).ready(function(){ $('input').on('change', function(){ var cntreq = 0; var cntvals = 0; $('input').each(function(i, val) { if($(this).attr('required') == 'required') { cntreq++; if($(this).val() != '') { cntvals++; } } }); var count = (cntvals/cntreq)*100; $('#percentage').empty(); $('#percentage').append(count+'% completed'); }); }); You could also combine that with some validation. See fiddle here.
answers question: http://stackoverflow.com/q/26459042
type: Answer

http://stackoverflow.com/q/26480949
score: 1
has comment: http://stackoverflow.com/comment/41598516
has title: export data to xls using javascript with images and style formating
has comment: http://stackoverflow.com/comment/41599994
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41603535
has comment: http://stackoverflow.com/comment/41598220
type: Question
has comment: http://stackoverflow.com/comment/41603723
has comment: http://stackoverflow.com/comment/41602221
has comment: http://stackoverflow.com/comment/41601951
downvote count: 0
has comment: http://stackoverflow.com/comment/41602199
tagged with: javascript
has comment: http://stackoverflow.com/comment/41603486
favorite count: 0
has body: i stuck in a task where i have to export data to excel file with style formating and images using javascript. I am working with angularjs. i tried lots of example but not able to find the exact excel. thanks in advance
has comment: http://stackoverflow.com/comment/41598300
has comment: http://stackoverflow.com/comment/41598535

http://stackoverflow.com/q/26422491
has comment: http://stackoverflow.com/comment/41492055
linked to: http://stackoverflow.com/q/15664873
tagged with: jshint
type: Question
has body: I see several recommendations for adhering to an 80 character max line length when writing javascript, e.g. Google, npm, Node.js, Crockford. In certain cases, however, I don't see how best to do it. Take the example below MongoClient.connect('mongodb://localhost:27017/sampleDatabase', function(err, database) { if(err) { throw err; } db = database; }); That would throw a jshint warning since it exceeds 80 characters. Now, would you choose to ignore the warning in this instance, or instead opt for a solution such as MongoClient.connect('mongodb://localhost:27017/sampleDatabase', function(err, database) { if(err) { throw err; } db = database; } );
tagged with: jslint
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/26422741
downvote count: 0
has comment: http://stackoverflow.com/comment/41491903
favorite count: 0
has answer: http://stackoverflow.com/a/26425443
accepted answer: http://stackoverflow.com/a/26425443
upvote count: 2
has comment: http://stackoverflow.com/comment/41490558
score: 2
tagged with: coding-style
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41492129
has title: Adhering to a max length setting with jshint
has answer: http://stackoverflow.com/a/26422741
has comment: http://stackoverflow.com/comment/41490709

http://stackoverflow.com/comment/41632930
comment on: http://stackoverflow.com/q/26500065
score: 0
has text: You cannot replace these elements ".submitForm" and "#saveFormdata" by the new one. If after loading ajax, you replace these elements, It won't work again.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26505818
tagged with: http://stackoverflow.com/tag/html
has body: i have a container that is stick to top after a specific point. but its not enough for me. i have a footer in the page and when the screen is small the stick part is hiding under the footer. i want it to stop moving down in the footer top (to stop be fixed to 0 that point but be fixed to minus number that is the substraction between them). this is my code. what should i add for that goal? and when to call it? on resize? on ready? etc. thanks a lot window.onscroll = function (event) { fixDiv(); }; function fixDiv() { if (getBrowserHeight().width &gt; 1284) { var $div = $("#Container"); if ($(window).scrollTop() &gt; $div.data("top")) { $('#Container').css({ 'position': 'fixed', 'top': '0' }); } else { $('#Container').css({ 'position': 'static', 'top': 'auto' }); } } } $(document).ready(function () { $("#Container").data("top", $("#Container").offset().top); });
type: Question
tagged with: javascript
tagged with: jquery
tagged with: fixed
has title: stick part in a specific range
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26506976
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26507215

http://stackoverflow.com/a/31095960
has body: /*this code has two sections or html pages. Print.hmtl page execute the print task Example.html page has the table you want, in this case the table is tbl_show2. When you press the Print button in Example.html page btnPrint function calls Print.html page and send two arguments. contenido and titulo. When Print.html page loads init() function is called. In this function insert the HTML content of tbl_show2 in printTable div object. But HTML content has only the body section this is the reason we add and tags to complete the table object. Then after that. removefirstCol() remove the first column and then the document is printed.*/ /*----------------Print.html-----------*/ /*--------------------Example.html-----------------*/ columna 1 columna 2
has comment: http://stackoverflow.com/comment/50208353
has comment: http://stackoverflow.com/comment/50208539
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26401180

http://stackoverflow.com/q/26411004
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I'm posting json to my server and I want to return a csv response and have my browser automatically download the csv. I know there have been some questions on SO exactly about this topic on the past. So far, I've gathered the following solutions: Put the request into &lt;form&gt; element. This isn't possible because the JSON is nested and too large to be posted as a string. Save the csv file (get request) onto the server and then have a separate post request to download it. This is not ideal because I don't want to keep a bunch of useless csv files on my server. Is there a better solution? Can I make a Post request act like a form submission and automatically get the file to start downloading?
score: 2
tagged with: download
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41470887
has title: Download CSV from ajax post request
type: Question
downvote count: 0

http://stackoverflow.com/comment/41590598
type: AnswerComment
comment on: http://stackoverflow.com/a/26468795
has text: @c00000fd Javascript has no official documentation, but the Mozilla Developer Network is the most complete unofficial documentation, for example see [`Element.requestFullscreen`](https://developer.mozilla.org/en-US/docs/Web/API/Element.requestFullScreen)
type: Comment
score: 0

http://stackoverflow.com/a/26425456
has comment: http://stackoverflow.com/comment/41496718
answers question: http://stackoverflow.com/q/26425308
has comment: http://stackoverflow.com/comment/41496285
has comment: http://stackoverflow.com/comment/41495809
accepted answer of: http://stackoverflow.com/q/26425308
has comment: http://stackoverflow.com/comment/41496935
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41496587
has comment: http://stackoverflow.com/comment/41497795
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41496462
has body: You can either convert the strings into numbers using the PHP function intval() before sending the result: $string = '123'; $number = intval($string); // 123 $number2 = intval('456'); // 456 Or casting the variable directly on an assign statement: $string = '123'; $number = (int)$string; // 123 $number2 = (int)'456'; // 456 Or do it in AngularJS using the transformResponse method: $http({ method: "POST", url: "framework/actions/league.php?query=getDivision", transformResponse: function(data) { for (var i=0; i&lt;data.length; i++) { for(var k in data[i]) { if (data[i].hasOwnProperty(k)) { data[i][k] = isNaN(+data[i][k]) ? data[i][k] : +data[i][k]; } } } return data; }, success: function(data){ $scope.division = data; } });

http://stackoverflow.com/q/26442064
type: UnansweredQuestion
upvote count: 1
has title: displaying the ELEMENT NAME that triggered mouse event in javascript
score: 1
has body: I'm trying to get the alert box to display the element name (here is html) (without hard-coding obviously) that triggered the event onclick with ctrl pressed. function alertD(event) { if (event.shiftKey) { alert(event); } else if(event.ctrlKey) { alert("html"); //-- this is where it would say something like alert(document.element)??? } else { alert(); } }
type: Question
has comment: http://stackoverflow.com/comment/41527738
has comment: http://stackoverflow.com/comment/41527314
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: event-handling
has answer: http://stackoverflow.com/a/26442165
favorite count: 0
tagged with: ctrl

http://stackoverflow.com/q/26403173
has comment: http://stackoverflow.com/comment/41460005
type: Question
has comment: http://stackoverflow.com/comment/41459025
tagged with: javascript
has comment: http://stackoverflow.com/comment/41455696
has body: I want to redirect to a PHP file when a button on my initial screen is pressed. $stmt->bind_result($app_id, $user_id, $app_name, $app_desc,$api_key); while ($stmt->fetch()) { echo ' '.$app_name.' '.$app_desc.' Delete App View Details '; } } Javascript function: $(".appDeatilsButton").click(function (event) { $.ajax({ type: "POST", url: "appDetails.php", data: { ID: this.id} }) .done(function( msg ) { window.location(appDetails.php); }); }); appDetails.php <?php include_once 'includes/db_connect.php'; include_once 'includes/functions.php'; sec_session_start(); $appID = $_POST["appID"]; echo ' '; ?> I know I am completely wrong, please help me in doing this in a eaiser way. FYI I am a mobile developer with little insight on web programming so web experts please excuse my newbie language.
has comment: http://stackoverflow.com/comment/41455571
score: 0
has comment: http://stackoverflow.com/comment/41456159
has comment: http://stackoverflow.com/comment/41455713
has comment: http://stackoverflow.com/comment/41460312
answer count: 1
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26403924
has comment: http://stackoverflow.com/comment/41459282
has comment: http://stackoverflow.com/comment/41455600
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41455415
has comment: http://stackoverflow.com/comment/41456302
tagged with: php
has comment: http://stackoverflow.com/comment/41459823
has title: Redirect to a PHP file on a HTML button click with some data being sent via POST
has comment: http://stackoverflow.com/comment/41455851
has comment: http://stackoverflow.com/comment/41455690

http://stackoverflow.com/q/26402520
has answer: http://stackoverflow.com/a/26402830
type: Question
has comment: http://stackoverflow.com/comment/41454920
answer count: 2
possible better answer: http://stackoverflow.com/a/26403278
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26403278
has comment: http://stackoverflow.com/comment/41454636
favorite count: 0
accepted answer: http://stackoverflow.com/a/26402830
has body: I have a grid with button that has k-grid-cancel-changes class. I would like to create a directive that will attach a click event to that button and call method on the page scope .directive('kGridCancelChanges', function () { return { restrict: 'C', scope: { onCancelChanges: "&amp;" }, controller: function ($scope, $element, $attrs, $location) { $element.click(function () { $scope.onCancelChanges(); }); } } }); When I press button I can see $scope.onCancelChanges() fired from my directive but it never reaches function on the page scope. $scope.onCancelChanges = function () { alert('test'); } I would appreciate any suggestions
has comment: http://stackoverflow.com/comment/41454673
tagged with: angularjs
has title: angular directive to call scope method on click event
upvote count: 1
has comment: http://stackoverflow.com/comment/41454499
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/26367166
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41392127
type: AcceptedAnswer
has body: You can simplify your function like: function getCharIndexes(board, char) { var i, j, collection = []; for (i = 0; i &lt; board.length; i++) { for (j = 0; j &lt; board[i].length; j++) { if(board[i][j] == char) { collection.push({row:1, col:j}); // should be {row: i, col: j} } } } return collection; } To get 'F' call: getCharIndexes(board, 'F'); To get 'H' call: getCharIndexes(board, 'H'); etc.
accepted answer of: http://stackoverflow.com/q/26367002
has comment: http://stackoverflow.com/comment/41392039
answers question: http://stackoverflow.com/q/26367002
upvote count: 1
has comment: http://stackoverflow.com/comment/41395024
type: Answer
has comment: http://stackoverflow.com/comment/41392066

http://stackoverflow.com/comment/41387119
has text: why do you need to place it in subfolder?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26362107

http://stackoverflow.com/comment/41557069
type: Comment
has text: I just tested it... I recopied what was on pastebin. Updated the function and nothing else. It showed the box exactly as the image I have in my post.
comment on: http://stackoverflow.com/a/26457431
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41490498
has text: did you set it before in your factory? also, what is this expression supposed to do? can you try just rendering the {{interstellarService.routeToearth}} part?
comment on: http://stackoverflow.com/q/26421460
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26383138
has answer: http://stackoverflow.com/a/26383785
has answer: http://stackoverflow.com/a/26383372
type: AnsweredQuestion
tagged with: dynamic
tagged with: knockout.js
type: Question
has title: Dynamic amount of observables with knockout.js
tagged with: arrays
tagged with: javascript
has body: I have a basic question related to the knockout.js library. So far I am creating some input fields of the types number and range. When activating knockout.js I am just doing something like this.example1 = ko.observable("0.000"); this.example2 = ko.observable("0.000"); My problem is that the website receives a random amount of those input parameters. For some projects there are only 2 like in my example while others take like 8 parameters. How can I specify a dynamic amount of those observables in knockout? Thanks! EDIT: Solved. In continuation to the selected answer's solution: With the "attr" binding I was able to set different attribute values for each input.
accepted answer: http://stackoverflow.com/a/26383372
has comment: http://stackoverflow.com/comment/41542260
score: 0
possible better answer: http://stackoverflow.com/a/26383534
answer count: 3
has answer: http://stackoverflow.com/a/26383534
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41437227

http://stackoverflow.com/comment/41491207
score: 0
type: Comment
type: QuestionComment
has text: is the thing that is supposed to be returned. It's an array with objects inside
comment on: http://stackoverflow.com/q/26422807

http://stackoverflow.com/comment/41442755
type: Comment
type: QuestionComment
has text: That is usually triggered on a scroll function in a js file I think. You could search for that or post a link to your website and someone could take a look.
comment on: http://stackoverflow.com/q/26394911
score: 0

http://stackoverflow.com/a/26414238
type: Answer
answers question: http://stackoverflow.com/q/26414172
has comment: http://stackoverflow.com/comment/41476604
score: 5
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26414172
has body: Since you're looking for a single object out of an array, using _.reduce or _.reduceRight is a good candidate for getting the job done. Let's explore that. In this case, it's going to be hard to work from left to right, because it will require doing recursion to get to the innermost object and then working outward again. So let's try _.reduceRight: var common = ["a", "b", "c", "d"]; var innerValue = "some value"; _.reduceRight(common, function (memo, arrayValue) { // Construct the object to be returned. var obj = {}; // Set the new key (arrayValue being the key name) and value (the object so far, memo): obj[arrayValue] = memo; // Return the newly-built object. return obj; }, innerValue); Here's a JSFiddle proving that this works.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41477961

http://stackoverflow.com/q/26497461
has answer: http://stackoverflow.com/a/26500300
type: AnsweredQuestion
has body: I am trying to increase the height of TextField element in Ember.js. Even after binding the attributes during definition time, and using the size and/or maxlength attribute in the .hdb file, the size is not reflected when I view it.
type: Question
accepted answer: http://stackoverflow.com/a/26500300
tagged with: javascript
score: 0
tagged with: ember.js
answer count: 1
has title: Changing the textfield height in ember js using the attributes maxlength /size?
tagged with: handlebars.js
has comment: http://stackoverflow.com/comment/41631684

http://stackoverflow.com/comment/41377467
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26358153
has text: Do you have live demo of this page?
score: 0

http://stackoverflow.com/comment/41575033
comment on: http://stackoverflow.com/a/26468660
has text: good idea, did not think about doing that.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26483842
has answer: http://stackoverflow.com/a/26484236
tagged with: angularjs-ng-repeat
linked to: http://stackoverflow.com/q/16584346
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26484236
has answer: http://stackoverflow.com/a/26484450
type: Question
has title: Ternary not working properly for function call in angular expressions
answer count: 2
possible better answer: http://stackoverflow.com/a/26484450
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has body: I have to call a function on $last in ng-repeat, if I use, div(ng-repeat="note in notes") li: {{note}} {{$last ? 'true' : 'false' }} It prints false only on last li element, but for the same if I call a function instead of 'true', like below div(ng-repeat="note in notes") li: {{note}} {{$last ? update() : 'false' }} the function is called for each loop. For your information, I had tried "&amp;&amp;" kind of solution given in this link {{$last &amp;&amp; update() || '' }} also, but not working.

http://stackoverflow.com/comment/41478871
has text: The standard sort will do, but you'd have to build a comparator function that does what you need.
comment on: http://stackoverflow.com/q/26415675
type: Comment
type: QuestionComment
score: 6

http://stackoverflow.com/a/26462864
downvote count: 1
upvote count: 0
score: -1
has body: You'll have to loop through each element of the array and check to see if any objects have 'Critical' as the Type property value.
answers question: http://stackoverflow.com/q/26462832
type: Answer

http://stackoverflow.com/a/26372546
type: Answer
has body: It seems that (at least as of November 2013), it was not possible to be done using a single AJAX call. Source The answer is no - I'm sorry to say you cannot do that in DataTables at this time. The full range of options that are available in aoColumns cannot be represented in JSON (specifically functions) so there is no method for this in DataTables at this time. I might relax that in future, but at the moment you'll need to make an Ajax request to get the column information yourself. Allan You could solve the issue by issuing two consecutive AJAX calls: first for fetching data to populate table header columns, and the second - for the data itself. The link provides a sample call as well.
answers question: http://stackoverflow.com/q/26372469
accepted answer of: http://stackoverflow.com/q/26372469
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41581372
has text: your code snippet looks valid but nobody can tell you whether the sematics are correct because the context is not clear. Would you mind elaborating on what exactly the whole problem is? EDIT: oh yeah, and you have a typo 'bout "widowwidth" :-D
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26471834

http://stackoverflow.com/comment/41594589
has text: (Although it looks like, as I typed that, you had just fixed it, so nevermind.)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26478949
type: Comment

http://stackoverflow.com/q/26501785
has answer: http://stackoverflow.com/a/26559457
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41756219
accepted answer: http://stackoverflow.com/a/26559457
tagged with: css
type: AnsweredQuestion
downvote count: 3
upvote count: 1
has title: Dock panel not see correct in chrome
has body: I was download the dock panel html project from there and you see demo from there The structure of dock panel in downloaded html page not show in Google Chrome and my Google chrome version is 37.0.2062.124. please help me.please give your suggestion.
type: Question
tagged with: jquery-ui
score: -2

http://stackoverflow.com/comment/48539653
type: AnswerComment
score: 0
has text: You don't need to insert a new record to make this change. You can just edit your existing Google service configuration document in the `meteor_accounts_loginServiceConfiguration` collection.
type: Comment
comment on: http://stackoverflow.com/a/26388712

http://stackoverflow.com/comment/41563074
score: 0
comment on: http://stackoverflow.com/q/26462023
has text: check this: http://stackoverflow.com/questions/610336/javascript-retrieving-the-text-of-the-selected-option-in-select-element
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26357322
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26357460
has answer: http://stackoverflow.com/a/26357394
has body: I have a dropdown list which displays the directories. If i choose one and push the Button Submit, a action will be performed. Now I need a second Button Download, which compress the files and download the zip file. My problem is that I won't get the selected Item in PHP. Here's my code: Select a folder <?php foreach(glob('auswertung/*', GLOB_ONLYDIR) as $dir) { $dir = str_replace('auswertung/', '', $dir); echo ' '.$dir." \n"; } ?> <?php if (isset($_POST['download'])) { $dirs = $_GET['myDirs']; $files = array('auswertung/"'.$dirs.'"/Coordinates.txt', 'auswertung/"'.$dirs.'"/MagnetField.txt', 'auswertung/"'.$dirs.'"/Timestamps.txt'); /*$zipname = 'file.zip'; $zip = new ZipArchive; $zip->open($zipname, ZipArchive::CREATE); foreach ($files as $file) { $zip->addFile($file); } $zip->close(); header('Content-Type: application/zip'); header('Content-disposition: attachment; filename='.$zipname); header('Content-Length: ' . filesize($zipname)); readfile($zipname);*/ } ?> I am new to PHP. I get the following error message: Notice: Undefined index: myDirs in C:\PATH\htdocs\folder.php on line 20 What I am doing wrong?
possible better answer: http://stackoverflow.com/a/26357460
type: Question
has answer: http://stackoverflow.com/a/26357553
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26357652
tagged with: http://stackoverflow.com/tag/html
has title: PHP get text from Dropown List
answer count: 4
accepted answer: http://stackoverflow.com/a/26357553
tagged with: php

http://stackoverflow.com/comment/41406954
comment on: http://stackoverflow.com/a/26375493
type: Comment
has text: Ah! You beat me to it. It came to me seconds after I posted the question. Will be accepting this answer after the 15 minutes.
type: AnswerComment
score: 0

http://stackoverflow.com/a/26477396
answers question: http://stackoverflow.com/q/26477322
has body: You could remove the listener once the function has been called: $(window).on('scroll', function(e) { if( ...window at scrollTop ) { $(window).off('scroll') .... Drop your pin } }) Esteban Felix's Comment brings up a good point. This will remove all scroll handlers. If that's not something that works for you, you can move the function outside the handler, and only remove that: var dropPinOnce = function() { if( ... window at correct scrollTop ) { ... Drop pin here ... $(window).off('scroll', dropPinOnce) } $(window).on('scroll', dropPinOnce)
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41592142
score: 2
upvote count: 2

http://stackoverflow.com/comment/41448234
has text: For date related stuff in JavaScript, your life will probably be easier using something like `moment.js`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26398727
score: 0

http://stackoverflow.com/comment/41376805
type: Comment
score: 0
has text: This makes a freaky effect when you keep pressing a number!
type: AnswerComment
comment on: http://stackoverflow.com/a/26359046

http://stackoverflow.com/comment/41526589
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26441507
has text: not entirely clear what the desired behavior is. `continuously` can be interpreted several ways

http://stackoverflow.com/comment/41420651
score: 1
type: QuestionComment
has text: `options.xAxis.categories = data.ticks;` your data doesn't have `ticks`?
comment on: http://stackoverflow.com/q/26383040
type: Comment

http://stackoverflow.com/q/26487439
tagged with: promise
tagged with: timer
has body: Many of my friends, who are using deeply some deferred/promises objects in their libraries, are often telling me, that to use timers in own implementation of it is an evil. That it doesn't correspond to A+: https://github.com/promises-aplus/promises-spec And that many libraries as jQuery and others don't use timers. So I've tried to find any timers in jQuery sources, which may relate to promises implementation, but no success: https://github.com/jquery/jquery/blob/master/src/deferred.js All, right, but I've found some notes in A+ description, which have confused me about using timers in it: At Notes article: Here "platform code" means engine, environment, and promise implementation code. In practice, this requirement ensures that onFulfilled and onRejected execute asynchronously, after the event loop turn in which then is called, and with a fresh stack. This can be implemented with either a "macro-task" mechanism such as setTimeout or setImmediate, or with a "micro-task" mechanism such as MutationObserver or process.nextTick. Since the promise implementation is considered platform code, it may itself contain a task-scheduling queue or "trampoline" in which the handlers are called. So, I understood A+ didn't have strict rules about timer using or did it? Help me, I'm rather confused.
possible better answer: http://stackoverflow.com/a/26487512
tagged with: asynchronous
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26487647
type: Question
has answer: http://stackoverflow.com/a/26487647
has title: Is using timers in deferred/promises implementation an evil?
tagged with: javascript
has answer: http://stackoverflow.com/a/26487512
upvote count: 2
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41615720
tagged with: deferred
favorite count: 0

http://stackoverflow.com/a/26532144
has body: It's caused by not setting strict width for the chart, so default values 600x400 are used, as described in docs. Solution: Simply set that widths for each chart when using getSVG() method: var container = $(chart.container); var svg = chart.getSVG({ chart: { width: container.width() } }); Demo: http://jsfiddle.net/tg8f9fgo/5/ or http://jsfiddle.net/tg8f9fgo/4/
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26512326
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26512326
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26486056
accepted answer: http://stackoverflow.com/a/26486266
tagged with: checkbox
has comment: http://stackoverflow.com/comment/41606928
has body: Individual refinements can be selected and de-selected by the user by clicking on the various checkboxes. When a panel has any number of facets selected, “clear” button needs to be shown. When any panel has any facets selected, a “clear all” button needs to be shown at the top of the refinements controls. so based on my getElementById I should be able to achieve this, but I'm not able myself. // 'Getting' data-attributes using getAttribute var size = document.getElementById('size'); var base = document.getElementById('base_colour'); var brand = document.getElementById('brand'); //When a panel has any number of facets selected, a “clear” button needs to be shown $('input').on('click', function(){ if ($('.option input:checkbox:checked').length &gt; 0) { // any one is checked } else { // none is checked } }); http://jsfiddle.net/fsrdd5yz/
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41607100
type: Question
has title: jquery checkbox if check/uncheck do this
has comment: http://stackoverflow.com/comment/41606600
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/41606679
linked to: http://stackoverflow.com/q/2272507
tagged with: getelementbyid
downvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26486266

http://stackoverflow.com/q/26468662
tagged with: bootstrap-multiselect
has title: bootstrap multiselect keep selection on change
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a dropdown box and i am using bootstrap multiselect for checkbox. can you please tell me (or point me to some docs) how can i keep selection after page reload? user checks option 1,3 and push search, page displays search but selected options must be kept. thx. bootstrap multiselect version: 0.9.8 select option Val 1 Val 2 Val 3 JavaScript
has comment: http://stackoverflow.com/comment/104058991
has comment: http://stackoverflow.com/comment/41575355
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: multi-select
type: Question
has answer: http://stackoverflow.com/a/26484422

http://stackoverflow.com/a/26484585
type: Answer
answers question: http://stackoverflow.com/q/26484515
has comment: http://stackoverflow.com/comment/41603918
score: 1
has body: How about: var previewSource = "~Foo.aspx?fn/image.jpg&amp;p=True"; var loadedSource = previewSource.replace(/p=true/i, 'p=False'); // This is one of the things I have tried. P.S. Since the value of previewSource is string, you need to wrap them in quotes. Then use simple javascript to replace.
has comment: http://stackoverflow.com/comment/41603897
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41603818

http://stackoverflow.com/a/26625179
type: Answer
has body: if you are using icefaces you dont have to use any javascript tweek to get the check box value. Try using ice:selectOneRadio component. Sample code is given below &lt;ice:selectOneRadio layout="pageDirection" partialSubmit="true" value="#{myBean.myButtonValue}"&gt; &lt;f:selectItem id="1" itemLabel="val1" itemValue="val1" /&gt; &lt;f:selectItem id="2" itemLabel="val2" itemValue="val2" /&gt; &lt;f:selectItem id="3" itemLabel="val3" itemValue="val3" /&gt; &lt;/ice:selectOneRadio&gt; where myBean is my bean name and myButtonValue is a string variable in bean with getter setter When you submit the form you will get the itemValue in the bean on the variable myButtonValue
score: 0
answers question: http://stackoverflow.com/q/26420182

http://stackoverflow.com/a/26488287
score: 1
answers question: http://stackoverflow.com/q/26487177
upvote count: 1
has body: Another option (if you don't need the exact style of the dropdown list) would be to use navbar-nav since it's already been designed to collapse on mobile. Menu Action Another action Something else here Separated link Demo: http://www.bootply.com/render/ueNgfw1cbO Code: http://www.bootply.com/ueNgfw1cbO
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41611095

http://stackoverflow.com/comment/41642403
type: Comment
score: 0
type: AnswerComment
has text: This is the best answer (and the fastest of the two similar). I second this.
comment on: http://stackoverflow.com/a/26505763

http://stackoverflow.com/a/26419503
has comment: http://stackoverflow.com/comment/41485834
upvote count: 1
has body: Try using resetValues(this.id); instead of resetValues(sel.id); I think when you call resetValues(sel.id); here sel variable is sending reference to the function. And when you change value of sel it will change all value of previous sels
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26419347

http://stackoverflow.com/q/26506210
has comment: http://stackoverflow.com/comment/41686064
has answer: http://stackoverflow.com/a/26530033
has comment: http://stackoverflow.com/comment/41656456
has comment: http://stackoverflow.com/comment/41716599
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41725355
type: UnansweredQuestion
has title: Legend toggling for d3.js pie chart
score: 2
has body: I'm working on a d3.js application. In this example I am trying to toggle the slices when the user clicks on the legend components. It will initially take the complete data as its source, but if there is a previous manipulated data source will use that as a base. I've tried to hook into the toggling functionality as the legend is manipulated. I would prefer to separate the functionality - but wasn't sure how else to know if the slice is to be active or not. Its not working as expected though, especially when trying to handle multiple active/non active slices. http://jsfiddle.net/Qh9X5/3282/ onLegendClick: function(dt, i){ //_toggle rectangle in legend var completeData = jQuery.extend(true, [], methods.currentDataSet); newDataSet = completeData; if(methods.manipulatedData){ newDataSet = methods.manipulatedData; } d3.selectAll('rect') .data([dt], function(d) { return d.data.label; }) .style("fill-opacity", function(d, j) { var isActive = Math.abs(1-d3.select(this).style("fill-opacity")); if(isActive){ newDataSet[j].total = completeData[j].total; }else{ newDataSet[j].total = 0; } return isActive; }); //animate slices methods.animateSlices(newDataSet); //stash manipulated data methods.manipulatedData = newDataSet; }
upvote count: 2
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41725538
type: Question

http://stackoverflow.com/q/26478541
has title: Position: fixed and javascript isnt working
type: Question
has body: I have a weird question. I have a color palette in my chat room and I don't understand when I am applying position:fixed the JavaScript doesn't work and if I remove the position:fixed it works. Is this something that happens or should I attempt to try another way? I don't know how to overlay the color palette over the chat dialog without using position fixed an margins to place the content where I want it. Any input? I know that there is a lot of code but I just want you to have a idea when you look at it. It could be me that messed something up. The error has to be on this page or the css index.php Color <input type="hidden" class="" id="userName" value="<?php echo $log_username; ?>" maxlength="20"/> <?php if ($user_ok === true) { if (($log_userlevel == '7') || ($log_userlevel == '8')) { echo ' '; } } ?> css #colorpicker { margin: 5px 0px 0px 6px; } #colorpickerB{ position: fixed; margin: 90px 0 0px 461px; border: solid 1px black; width: 290px; height: 273px; background-color: white; z-index: 2000; }
score: 0
has comment: http://stackoverflow.com/comment/41593943
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41594373
answer count: 0
tagged with: javascript

http://stackoverflow.com/comment/41571479
type: Comment
comment on: http://stackoverflow.com/a/26466548
type: AnswerComment
has text: I checked in the console, it returns an array of the correct size, but the objects all have the id's `start = undefined`and `end = undefined`. Yes, I am working on a Quantified Self Device and complementary website
score: 0

http://stackoverflow.com/comment/41444372
has text: Well, that's a different question than what you originally posed. How do you know the solutions you found are "wrong" if you haven't tried them yet?
comment on: http://stackoverflow.com/q/26396320
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26429024
has title: refresh views with factories in Angular
tagged with: angularjs
has answer: http://stackoverflow.com/a/26430428
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41503153
has answer: http://stackoverflow.com/a/26429537
has body: I want to update two views in my angular app which both have their own controllers. I have a Factory: angular.module('starter') .factory('userFactory', function(DSCacheFactory){ var user = DSCacheFactory.get("userData").get("user"); if(user === undefined){ return false }else{ var name, email return { name:user.name, email: user.userName } } }); so when the user isn't logged in, the value is false. But when the user is logged in their username and name are displayed. The problem I'm having is that when I refresh the page the views are updated and I can see that the user is logged in, however I do not want to refresh the page, I want both views on the different controllers to update instantly. Any push in the right direction? If you need me to elaborate on anything, please just ask Thank you
tagged with: angularjs-scope
type: Question
answer count: 2
tagged with: javascript
score: 0

http://stackoverflow.com/q/26497031
has comment: http://stackoverflow.com/comment/41628164
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26497325
has body: I'm completely new to node, and i was trying to get this example to work: [/path/to/node/server.js] var connect = require('connect'); var serveStatic = require('serve-static'); var app = connect(); app.use(serveStatic('../angularjs'), {default: "test.html"}); app.listen(5000); I have the file test.html inside the angularjs folder: [/path/to/node/angularjs/test.html] But when i request (localhost:5000/test.html) i'm getting in the navigator: Cannot GET /test.html. Any ideas?
answer count: 1
has title: getting [Cannot GET /test.html] in node.js
type: UnansweredQuestion
tagged with: node.js
type: Question

http://stackoverflow.com/a/26473921
type: Answer
has body: While there isn't an automatic way to do that in Redis, the common approach to these kind of problems is to use a Redis sorted set. In your case, set the IP as the member's value and the expiry time (now + time to live) as the score using epoch representation. Instead of looping periodically, you can just call ZREMRANGEBYSCORE every once in a while. Since set members are unique, however, that means that you'll only be able to save each IP once. If that's OK, just update the score for an IP with every hit from it, otherwise make the member value unique by concatenating the IP with the timestamp. Lastly, to get the IPs that haven't "expired", use ZRANGEBYSCORE to get members that have scores (expiry times) higher than now. Similarly and before deleting with ZREMRANGEBYSCORE, get the keys that expired for the callback logic that you mentioned.
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26472961
answers question: http://stackoverflow.com/q/26472961
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/26422408
accepted answer of: http://stackoverflow.com/q/26422036
answers question: http://stackoverflow.com/q/26422036
type: Answer
downvote count: 0
score: 1
has body: as reducing version of your example shows, data0 will be stored by reference. var tt = {f1: 'aa', f2: 'bb'} var rr = eval('tt'); console.log(rr.f1); // 'aa' rr.f1 = 'cc'; console.log(tt.f1); // 'cc' But using eval(..) is bad way: Why is using the JavaScript eval function a bad idea? . Use local storage instead as jeff said.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26400978
answers question: http://stackoverflow.com/q/26397772
score: 0
has body: If I read your question correctly, you are trying to convert the array to a proper collection in initialize. That's not the ideal place. Assuming you load your data from the server with fetch, the conversion needs to happen in parse instead. The parse method is also the right choice if you pass the attributes to the constructor while creating the model. The attributes will be processed with parse by setting the option {parse: true}. You don't need additional code in initialize for that. The example in the Backbone documentation illustrates the very thing you are trying to do.
type: Answer

http://stackoverflow.com/comment/41399746
comment on: http://stackoverflow.com/q/26370665
score: 0
type: Comment
has text: @JayantVarshney: You are welcome to help me using them.
type: QuestionComment

http://stackoverflow.com/q/26474826
type: UnansweredQuestion
upvote count: 1
has body: I'm creating a Google Chrome extension and I try to modify Twitter's homepage code for that. I need to be notified whenever a user clicks on a --- More button which are present in every tweet. Basically I use the following event delegation code : $(document).on('click', '.dropdown-toggle', function() { console.log('Hi !'); }); It works for all tweets on the homepage and those loaded via Ajax (that's why I use event delegation :D), but it doesn't work on the sub-tweets/answers that appear when you expand a tweet in the timeline. Yet the menus still have the dropdown-toggle class but the callback doesn't get called. So I though that Twitter's code was calling event.stopPropagation() or similar so I tried to remove event listeners on one of them by calling $(button).off() but it didn't work either.
linked to: http://stackoverflow.com/q/15980898
tagged with: event-delegation
tagged with: twitter
duplicate of: http://stackoverflow.com/q/15980898
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: jQuery event delegate listener not firing
favorite count: 0
has answer: http://stackoverflow.com/a/26474853
tagged with: google-chrome-extension
answer count: 1
score: 1

http://stackoverflow.com/q/26451572
type: Question
accepted answer: http://stackoverflow.com/a/26464224
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41563657
tagged with: datatables
answer count: 1
has title: Why isn't the search function on my datatables.js working?
favorite count: 0
has answer: http://stackoverflow.com/a/26464224
type: AnsweredQuestion
score: 1
tagged with: cakephp
upvote count: 1
has body: I'm making a CakePHP 2.x app and installed datatables.js following the instructions on the website, but although it's there some of the features aren't working. I can't change the amount of entries to display, the search function always returns nothing and it won't split the data into multiple pages (e.g. if I have it set to display 10 entries per page, it'll still display them all on one page even if it's exceeding 10). The only parts that work are the sorting features and the visual aspect of it. Here's a view that I've implemented datatables on: &lt;div class="products index"&gt; &lt;h2&gt;&lt;?php echo __('Products'); ?&gt;&lt;/h2&gt; &lt;table cellpadding="0" cellspacing="0" id="prod-tbl"&gt; &lt;thead&gt; &lt;head&gt; &lt;!--&lt;script src="jquery-1.11.1.min.js"&gt;&lt;/script&gt;--&gt; &lt;!-- DataTables CSS --&gt; &lt;link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.3/css/jquery.dataTables.css"&gt; &lt;!-- jQuery --&gt; &lt;script type="text/javascript" charset="utf8" src="//code.jquery.com/jquery-1.10.2.min.js"&gt;&lt;/script&gt; &lt;!-- DataTables --&gt; &lt;script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.3/js/jquery.dataTables.js"&gt;&lt;/script&gt; &lt;script &gt;$(document).ready( function () {$('#prod-tbl').DataTable();} );&lt;/script&gt; &lt;/head&gt; &lt;tr&gt; &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('name'); ?&gt;&lt;/th&gt; &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('product_code'); ?&gt;&lt;/th&gt; &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('image_name'); ?&gt;&lt;/th&gt; &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('image_url'); ?&gt;&lt;/th&gt; &lt;!--&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('brand_id'); ?&gt;&lt;/th&gt; &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('reward_id'); ?&gt;&lt;/th&gt;--&gt; &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('product_status_id'); ?&gt;&lt;/th&gt; &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&g…

http://stackoverflow.com/q/26361795
has body: how do i keep selected tab active after page reload or refresh i have working on drop line navigation menu function is working fine for parent ul li and also parent active when click on parent link but problem is that when i click on sub menu link and redirect to another page then clicked parent ul li didn't active and every-time Home Tab active or highlight whenever page refresh or redirect to another page for example i want like this Account Menu is parent menu and child menu like user profile and user accounts when i click user profile or user accounts script should active or highlight Account Menu Tab Not Home Tab Here Javascript &lt;script type='text/javascript'&gt;//&lt;![CDATA[ $(window).load(function(){ $(function () { $("li:first-child").addClass("active"); $('li').click(function () { $('.secondary li').removeClass('active'); $(this).addClass('active'); }); }) });//]]&gt; &lt;/script&gt; Html Code &lt;div role="navigation" id="navPrimary"&gt; &lt;ul class="secondary"&gt; &lt;li &gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Account Menu&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;OVERVIEW&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;EDIT&amp;nbsp;PROFILE&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;MANAGE&amp;nbsp;EMAILS&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;EDIT&amp;nbsp;PASSWORD&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;CREDIT&amp;nbsp;CARDS&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;BANK&amp;nbsp;ACCOUNTS&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;CLOSE&amp;nbsp;ACCOUNT&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;LOGOUT&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Payments Menu&lt;/a&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;OVERVIEW&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;EDIT&amp;nbsp;PROFILE&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;MANAGE&amp;nbsp;EMAILS&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;EDIT&amp;nbsp;PASSWORD&lt;/a…
type: Question
has comment: http://stackoverflow.com/comment/41381757
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26362018
score: 0
has comment: http://stackoverflow.com/comment/41381510
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41381574
tagged with: menu
has title: how to active parent ul li after page refresh or click on sub menu link
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41381378
upvote count: 1
has comment: http://stackoverflow.com/comment/41381430
downvote count: 1
linked to: http://stackoverflow.com/q/1458724
has comment: http://stackoverflow.com/comment/41381362
linked to: http://stackoverflow.com/q/21933575

http://stackoverflow.com/q/26500717
has comment: http://stackoverflow.com/comment/41658027
has comment: http://stackoverflow.com/comment/41696767
has title: php or javascript: Allow text to appear on specific page only
linked to: http://stackoverflow.com/q/26685846
has comment: http://stackoverflow.com/comment/41778960
has comment: http://stackoverflow.com/comment/41633566
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: There is a text that is appearing on every single page of my website, I need a way to hide it from all pages except from one. Let us say I need it to appear on the page 1, but don't want it appearing on page 2, page 3, page 4... Something like: if current page is page 1 then show text on page 1 else Hide text from other pages end of function EDIT: I need that for my SEO, I hired a company to make my website' SEO and they asked for an onpage optimization, I included the text in the page they asked, but now the text appears on every single page of one of the site's areas. EDIT 2: As requested, here is the code I'm applying, with no success: &lt;script type="text/javascript"&gt; var pages = window.location.href; if(pages == "sitedotcom/page1"){ Text 1. //display page 1 text } else if(pages == ""){ Text 2. //display page 2 text } &lt;/script THE SOLUTION How can I insert HTML text in Javascript the right way?
tagged with: php
has comment: http://stackoverflow.com/comment/41653749
has answer: http://stackoverflow.com/a/26500878
has answer: http://stackoverflow.com/a/26510425
has comment: http://stackoverflow.com/comment/41695705
type: Question
has answer: http://stackoverflow.com/a/26501876
has comment: http://stackoverflow.com/comment/41927491
tagged with: javascript
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41694651
tagged with: jquery

http://stackoverflow.com/comment/41580041
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26471136
has text: @user2471435, here is a fiddle with your code as is, and it works: http://jsfiddle.net/cdhL7px0/

http://stackoverflow.com/a/26391947
upvote count: 1
downvote count: 0
has body: What you need to do is keep track of both your normal onclick event handler and disabled onclick event handler. When you disable your button, remove the normal onclick event handler and add your disabled onclick event handler. When you re-enable the button, remove the disabled onclick event handler, and add the normal event handler back. You can do this with the jQuery .on() and .off() events (see the example below). function onNormalClick(e){ alert('This is the default test button functionality.'); } function onDisabledClick(e){ alert('This button is disabled.'); e.preventDefault(); e.stopPropagation(); } function disableButtons(selector){ $(selector).css('color', '#888'); $(selector).off('click', onNormalClick); $(selector).on('click', onDisabledClick); } function enableButtons(selector){ $(selector).css('color', '#000'); $(selector).off('click', onDisabledClick); $(selector).on('click', onNormalClick); } $(document).ready(function(){ $('.test').on('click', onNormalClick); $('#disabler').click(function(){ disableButtons('.test'); }); $('#enabler').click(function(){ enableButtons('.test'); }); }); Test Disable Enable
type: Answer
answers question: http://stackoverflow.com/q/26390474
score: 1

http://stackoverflow.com/a/26488736
type: Answer
accepted answer of: http://stackoverflow.com/q/26488616
has comment: http://stackoverflow.com/comment/41634627
has comment: http://stackoverflow.com/comment/41634287
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41635863
has body: To remove all element just make all option selected for listBoxSel select and trigger remove button's click action. The same for select all: $("#add").click(function () { $("#listBoxAvail > option:selected").each(function () { $(this).remove().appendTo("#listBoxSel"); }); }); $("#remove").click(function () { $("#listBoxSel > option:selected").each(function () { $(this).remove().appendTo("#listBoxAvail"); }); }); $("#remove-all").on("click", function (event){ $('#listBoxSel option').prop('selected', true); $("#remove").trigger("click"); }) $("#select-all").on("click", function (event){ $('#listBoxAvail option').prop('selected', true); $("#add").trigger("click"); }) 1 2 UPDATE: As Stephen Muecke suggested in comment thread below, more proper solution to select-all $('#move').click(function(){ $('#first option').appendTo($('#second')); }); see fiddle
has comment: http://stackoverflow.com/comment/41635295
has comment: http://stackoverflow.com/comment/41634165
has comment: http://stackoverflow.com/comment/41628410
answers question: http://stackoverflow.com/q/26488616
has comment: http://stackoverflow.com/comment/41635521
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41609978
has text: `delete e.which;`??? That does what?
comment on: http://stackoverflow.com/q/26487865
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26509776
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41651718
score: 0
has body: I wanted to create directive in angular that would display error message if entered value is not in valid format. What I finally came with is: http://plnkr.co/edit/l2CWu8u6sMtSj3l0kdvd?p=preview app.directive('kbDecimalValidation', function ($parse, $rootScope, $compile) { return { restrict: 'E', scope: { inputFieldRef: '=?', kbModel: '=ngModel', kbRequired: '@required', inputName: '@' }, template: '' + ' ' + ' Field is required ' + ' Bad format format, allowed: "0.00"' + ' ' + '', replace: true, priority: 50, controller: function($scope){ $scope.$watch( 'kbDecimalValidationForm[inputName]', function (value) { $scope.inputFieldRef = value; }); }, compile: function (tElement, tAttrs, transclude) { if($.tempKbDecimalValidationGUID == undefined){ $.tempKbDecimalValidationGUID = 0; } var guidInputName = 'XXX' + ++$.tempKbDecimalValidationGUID + 'XXX'; $(tElement).find('input').attr('name', guidInputName); //it is here to force angular to assign value to: $scope.kbDecimalValidationForm[guidInputName] //there is no expression in name, so angular won't add it to $$watchers return { pre: function preLink($scope, iElement, iAttrs, controller) { //$(iElement).find('input').attr('name', iAttrs.inputName); //it doesn't work if there is expression in inputName, // expression will be evaluated later (after linkFunction) // and the name assigned here will be updated (re-parsed by angular watch) }, post: function postLink($scope, iElement, iAttrs, controller) { $scope.kbDecimalValidationForm[iAttrs.inputName] = $scope.kbDecimalValidationForm[guidInputName]; //rewrite value to make it available by parsed name $(iElement).find('input').attr('name', iAttrs.inputName); //assign parsed name - GUID didn't contain expression, so it is not in $$watchers, // so it won't be replaced by angular } } } }; }); but I'm sure it is not propper way to do it. I expirience a lot of problems with it. Can somebody tell me what is the propper way to achieve it? PS: The problem I'm facing right now with t…
has title: decimal validation directive in angularjs
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/26511004
tagged with: javascript
answer count: 1

http://stackoverflow.com/a/26363438
accepted answer of: http://stackoverflow.com/q/26359206
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: NOTE: since January 2021, use Manifest V3 with chrome.scripting.executeScript() and the scripting permission and move <all_urls> to host_permissions instead of using the deprecated chrome.tabs.executeScript() with the tabs permission. Task What you need here is a Chrome extension with the ability to read DOM content of the customer page inside a tab with a content script, and then store the information and send it to another tab. Basically, you'll need to: Inject a content script in the customer page Retrieve the data and send it to the background Elaborate the data and send it to another content script, that will: Insert the data in the form on another page Implementation: So, first of all, your manifest.json will need the permission to access the tabs and the URLs you need, plus the declaration for your background script, something like this: { "manifest_version": 2, "name": "Extension name", "description": "Your description...", "version": "1", "permissions": [ "<all_urls>", "tabs" ], "background": { "scripts": ["background.js"] } } Now, following the steps: Add a listener to chrome.tabs.onUpdated to find the customer page and inject the first content script, plus find the tab with the form and inject the second script, all from background.js: chrome.tabs.onUpdated.addListener(function(tabID, info, tab) { if (~tab.url.indexOf("someWord")) { chrome.tabs.executeScript(tabID, {file: "get_data.js"}); // first script to get data } if (~tab.url.indexOf("someOtherWord")) { chrome.tabs.executeScript(tabID, {file: "use_data.js"}); // second script to use the data in the form } }); Ok, now the above code will inject your get_data.js script in the page if its URL contains "someWord" and use_data.js if its URL contains "someOtherWord" (you must obviously replace "someWord" and "someOtherWord" with the right words to identify the correct page URLs). Now, in your get_data.js you'll need to retrieve data and send it to the background.js script, using chrome.runtime.sendMessage,…
upvote count: 11
answers question: http://stackoverflow.com/q/26359206
score: 11
has comment: http://stackoverflow.com/comment/101703719
has comment: http://stackoverflow.com/comment/41396870

http://stackoverflow.com/a/26407732
answers question: http://stackoverflow.com/q/26402366
score: 0
has comment: http://stackoverflow.com/comment/41606567
type: Answer
has body: Why not use a media query then? @media (max-width: 767px) { .left-col { display: none; } } http://jsfiddle.net/x9y1s14o/

http://stackoverflow.com/comment/41601160
has text: really wishing I had closed before any answers had appeared, now...
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26482727

http://stackoverflow.com/comment/41693650
type: Comment
score: 0
type: AnswerComment
has text: Yes. Also, with this method, you need to place the text within the body of your if/else statement. If it's possible, could you possibly ad some code to your question to kind of give us some reference to better help you?
comment on: http://stackoverflow.com/a/26510425

http://stackoverflow.com/comment/41555303
type: QuestionComment
has text: Thanks. That seems to have done the trick. I want it to be in camelcase because I'm trying to set the startOffset of an svg text element and for some reason, svg needs it to be in camelcase.
comment on: http://stackoverflow.com/q/26457455
score: 0
type: Comment

http://stackoverflow.com/q/26509612
upvote count: 1
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41651247
has comment: http://stackoverflow.com/comment/41651542
has body: I have a rails 4 application where I have a contact form which I post to my rails endpoint to process it, send out an email, and then send back json with a redirect url to the client. my html form is like so: My javascript function is: function contact_email(){ form = $('form') form_data = document.forms.contact_form; $.ajax({ type: "POST", url: form.attr('action'), data: form_data, dataType: "JSON", async: false, success: function(data) { alert(data); window.location = data.redirect_url; }, error: function(xhr, status) { alert(status); } }); } (I have tried with an without async: false many times, as well as return false; at the end of function without it working) and my rails endpoint to process the POST def contact_email UserMailer.contact_email(params).deliver flash[:message] = "Thank you for contacting us! We'll be in touch shortly" res = {:redirect_url => root_url} render :json => JSON.generate(res) end After my javascript fires, the contact_email endpoint is hit, and it sends out the JSON response perfectly fine. The response is {"redirect_url":"http://localhost:3000/"} Yet neither my ajax success or error callback is ever executed. Why is this? EDIT: This may not be relevant, but I do see one console error in browser dev tools Uncaught TypeError: Illegal invocation for jquery-1.11.1.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41650475
has comment: http://stackoverflow.com/comment/41649892
tagged with: post
type: Question
accepted answer: http://stackoverflow.com/a/26510965
answer count: 2
has comment: http://stackoverflow.com/comment/41650284
downvote count: 0
tagged with: javascript
has title: Rails form submit via ajax post not calling success or error callback function
score: 1
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41650265
has comment: http://stackoverflow.com/comment/41649821
has answer: http://stackoverflow.com/a/26509882
favorite count: 0
has answer: http://stackoverflow.com/a/26510965
possible better answer: http://stackoverflow.com/a/26509882

checkout
type: Tag
tags question: http://stackoverflow.com/q/26388727
tag name: checkout

http://stackoverflow.com/comment/41588381
has text: @Bergi I am asking this question to establish what is "bad" code. I personally take great pains to optimise my own code, and the fact that I take the time to ask this question should show that to be the case. I'm not making any excuses. As for "repeating myself", a repeated reference is often unavoidable, and the whole point of the question is to establish if one reference method is really any worse, better or even practically different than another.
score: 0
comment on: http://stackoverflow.com/a/26475143
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26440957
has body: You don't show your form code here but (just guessing) you could try to build it on the fly: var form = document.createElement("form"); form.setAttribute("method", method); form.setAttribute("action", path); // decide which values to add if( showdiv1 ) { field0 = document.createElement("input"); field0.setAttribute("type", "hidden"); field0.setAttribute("name", "q_div1"); field0.setAttribute("value", quantity_of_div1 ); form.appendChild( field0 ); } form.submit(); and so on..
score: 0
answers question: http://stackoverflow.com/q/26440770
type: Answer

http://stackoverflow.com/q/26393024
has title: Javascript random values that add to a certain number
downvote count: 0
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/26414533
has answer: http://stackoverflow.com/a/26393396
tagged with: javascript
tagged with: jquery
tagged with: random
answer count: 3
linked to: http://stackoverflow.com/q/19277973
favorite count: 0
has body: I have an array of numbers that can range from zero to infinity. I need to generate random numbers lower than that of the numbers in the array, one for each number. For example if i have the numbers: [10, 5, 0, 7] An output could be any of: [5, 3, 0, 6] or [1, 0, 0, 7] or [10, 5, 0, 7] This is simple enough, but my problem lies with the next part. I have to make sure these numbers add up to a specified value. For example, the same first array could produce: [4, 3, 0, 1] or [8, 0, 0, 0] with the total value being 8. After doing some research, i found this post but sadly, it does not incorporate per-value limits. Rather it has one total, and generates a set of numbers according to that. I need all of these numbers to be less an that of an inputted array. Using Jquery's each loop, you can create a vale less than that of the number corresponding, but how would i incorporate the total value? If someone could modify that post to have a three values, being total, max, and min, it would be very appreciated. At this point, i am clueless.
has answer: http://stackoverflow.com/a/26414533
has answer: http://stackoverflow.com/a/26393308
accepted answer: http://stackoverflow.com/a/26393308
has comment: http://stackoverflow.com/comment/41438869
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/26465915
has comment: http://stackoverflow.com/comment/41569812
tagged with: razor
linked to: http://stackoverflow.com/q/26451049
type: AnsweredQuestion
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/26482872
tagged with: asp.net-mvc
tagged with: javascript
has body: How do I call a post actionresponse passing the selected dropdown item as a parameter from javascript within a view within asp.net, razor, mvc Basically, as I'm sure you can tell from the below code, I'm trying to accomplish the above without much success. What should I change to be successful? Thanks &lt;script type="text/javascript"&gt; $(function() { $("#mydropdown").change(function() { var selectedItem = $(this).val(); $.ajax({ url: '@Url.Action("DoStuff", "MainController")', type: "Post", data: { name: selectedItem }, success: function () { alert('success'); } }); }); }); [HttpPost] public ActionResult DoStuff(String Selecteditem) { CIModel CIModellList = CILHelper.ImportFunc(Selecteditem); return View(CIModellList); } As of now, nothing happens whem the dropdown is changed. Although if I remove the ajax function, and replace this with an alert. Then the alert in this case does appear. At this point, both the actionresult and the controller appear as though they do not exist (red) within the project even though both do and are named as stated. The c# seems to suggest neither the action or the controller actually exist, giving the errors "cannot resolve action" or "cannot resolve controller"
accepted answer: http://stackoverflow.com/a/26482872
score: 0
answer count: 2
has title: How do I call a post actionresponse passing the selected dropdown item as a parameter from javascript within a view
possible better answer: http://stackoverflow.com/a/26469453
tagged with: asp.net
has answer: http://stackoverflow.com/a/26469453

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/26383147
type: Tag
tags question: http://stackoverflow.com/q/26463989

http://stackoverflow.com/comment/41491448
type: Comment
comment on: http://stackoverflow.com/a/26382680
has text: @Emmmanuel your code is not working I tried your code not working for me. Any idea please ?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26382537
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26382598
accepted answer: http://stackoverflow.com/a/26382598
favorite count: 0
has body: for (var i = 0; i &lt; len; i++) { if (data[i].ProductId &amp;&amp; data[i].Name &amp;&amp; data[i].ShortDescription &amp;&amp; data[i].MediumImage &amp;&amp; data[i].Price &amp;&amp; data[i].IconImage) { alert(data) //var date = new Date(parseInt(data[i].date.substr(6))); var Photoq = "../Images/HomeImages/" + data[i].MediumImage; alert(Photoq); //&lt;img id="imgAd" src="/Images/HomeImages/1.jpg" width="181px" height="215px" alt="img"&gt; var Photo = "&lt;img id='imgAd' src='" + Photoq + "' width='181px' height='215px' alt='img'/&gt;"; alert(Photo); txt += '&lt;tr&gt;&lt;td&gt;&lt;div id ="result1" &gt;&lt;div&gt;' + Photo + '&lt;/div&gt; &lt;div &gt;&lt;div&gt;' + data[i].ProductId + "&lt;/br&gt; Name- " + data[i].Name + "&lt;/br&gt; Description " + data[i].ShortDescription + ", &lt;/br&gt;" + data[i].Price + "&lt;/br&gt;"; } } if (txt != "") { $("#table").append(txt); } I am getting the name of the image in the alert but the image is not rendering. I used the same procedure for another project and it worked there. Don't know why its not working here.
has comment: http://stackoverflow.com/comment/41419501
has comment: http://stackoverflow.com/comment/41419518
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41419587
downvote count: 0
score: 1
type: Question
has title: Cannot load the image using json data
has comment: http://stackoverflow.com/comment/41419626
tagged with: javascript
has comment: http://stackoverflow.com/comment/41419529
upvote count: 1
has comment: http://stackoverflow.com/comment/41419477

http://stackoverflow.com/comment/41446846
type: QuestionComment
comment on: http://stackoverflow.com/q/26397876
has text: I did something like this a while ago, i used typed arrays (no legacy browser support) and jquery. What server-side language do you use? I could post either just the client script or both client+server examples. And this is no rocket science, i am not sure if this is the super correct way of doing this, but it worked great for us. This would send the data in binary format, eg. you do not need to encode/decode your numbers to/from strings
score: 0
type: Comment

http://stackoverflow.com/a/26497425
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41628573
has comment: http://stackoverflow.com/comment/41628213
has comment: http://stackoverflow.com/comment/41628442
has body: The problem is that your backslash is getting swallowed as an escape character in the string: '\"' === '"' // true You actually need to escape the backslashes, so that the JSON parser sees them. Here's another example: var unencoded = 'string with "quotes"'; '"string with \"quotes\""' === JSON.stringify(unencoded); // false '"string with \\"quotes\\""' === JSON.stringify(unencoded); // true However, where the escaping should be done depends on how the JSON is being made available to the JavaScript. If the JSON is embedded in the page by a server-side script, then there's no need to use JSON.parse, as valid JSON is valid JavaScript: // if JsonData is valid JSON, it's also a valid JavaScript object var data = &lt;%= JsonData %&gt;;
has comment: http://stackoverflow.com/comment/41628273
type: Answer
has comment: http://stackoverflow.com/comment/41628304
has comment: http://stackoverflow.com/comment/41628197
answers question: http://stackoverflow.com/q/26497218
has comment: http://stackoverflow.com/comment/41628551
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/26497218
has comment: http://stackoverflow.com/comment/41628558
has comment: http://stackoverflow.com/comment/41638043

http://stackoverflow.com/comment/41450562
has text: Hard to tell without a complete example. Most likely the DOM is changing underneath but you're not updating your selections. Try selecting explicitly when you want to change, i.e. instead of `_nodeSelection` use `svg.selectAll(".node")`.
comment on: http://stackoverflow.com/q/26391508
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/50959946
score: 0
has text: `new URL(e.target.URL).hostname` doesn't work for me: `JavaScript runtime error: Object doesn't support this action`. IE11.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26370279

http://stackoverflow.com/q/26487399
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/26617518
has title: Bootstrap tabs with CodeMirror
upvote count: 7
has body: I have a pretty complex page where I have a number of instances of CodeMirror in hidden tabs within tabs. To then make it even more complex I remember the last active tabs. I've manage to get it half working (http://codepen.io/anon/pen/LheaF) the problems are with the Second Editor tabs: Its loading the Second tabs before the main Code Mirror tabs has been clicked. When you do click the Code Mirror tab it doesn't load the editor correctly either, until you click twice. I want the second tabs to call the refresh() method if its already been initiated, like I do for the main editor. Bug where its duplicating the secondary editors (function($) { var mainEditor; function initMainCodeEditor() { if (mainEditor instanceof CodeMirror) { mainEditor.refresh(); } else { // Load main editor var el = document.getElementById("codifyme"); mainEditor = CodeMirror.fromTextArea(el, { lineNumbers: true }); mainEditor.setSize('100%', 50); } } function initSecondaryCodeEditor() { var $active = $('#code_mirror_editors &gt; .active &gt; a'); var $sec_tab = $($active.data('target')); CodeMirror.fromTextArea($sec_tab.find('textarea')[0], { lineNumbers: true }); } $(document).ready(function() { // Only load editors if tab has been clicked $('#maintabs &gt; li &gt; a[data-target="#codemirror"]').on('shown.bs.tab', function(e) { initMainCodeEditor(); }); $('#code_mirror_editors &gt; li &gt; a[data-toggle="tab"]').on('shown.bs.tab', function(e) { initSecondaryCodeEditor(); }); // Remember tabs var json, tabsState; $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) { tabsState = localStorage.getItem("tabs-state"); json = JSON.parse(tabsState || "{}"); json[$(e.target).parents("ul.nav.nav-pills, ul.nav.nav-tabs").attr("id")] = $(e.target).data('target'); localStorage.setItem("tabs-state", JSON.stringify(json)); }); tabsState = localStorage.getItem("tabs-state"); json = JSON.parse(tabsState || "{}"); $.each(json, function(containerId, target) { return $("#" + containerId + " a[data-target=" …
type: Question
score: 7
has answer: http://stackoverflow.com/a/38913835
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26617518
favorite count: 0
possible better answer: http://stackoverflow.com/a/38913835
answer count: 5
has answer: http://stackoverflow.com/a/26563690
has answer: http://stackoverflow.com/a/31591669
has answer: http://stackoverflow.com/a/34543888
tagged with: codemirror
type: AnsweredQuestion

http://stackoverflow.com/comment/41501947
type: Comment
has text: As written, the math will cause the expiryDate element to always show except for when the expiration date is more than 1 month in the future.
comment on: http://stackoverflow.com/a/26427343
score: 0
type: AnswerComment

http://stackoverflow.com/q/26373726
score: 8
has comment: http://stackoverflow.com/comment/41404989
linked to: http://stackoverflow.com/q/13506326
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41404410
has comment: http://stackoverflow.com/comment/41404945
has comment: http://stackoverflow.com/comment/41404854
type: Question
has title: style width vs width attribute in HTML
has answer: http://stackoverflow.com/a/26373997
has body: I saw last post similar to my question HTML5 canvas style height vs attribute height But in that post, there was no clear information regarding which one will work and what is the difference? I tried following example: Test1 Test2 Test3 Test4 Test5 But in above example, if put either style="width: 200px" or width="200px", same result is not seen. Question: 1) why are style="width: 200px and width="200px not giving same result? 2) what is the difference between width="200px" or width="200"? Can some help me to clear these basics?
linked to: http://stackoverflow.com/q/3562296
has answer: http://stackoverflow.com/a/26373834
has answer: http://stackoverflow.com/a/26376342
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 8
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/26519212
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26505449
has comment: http://stackoverflow.com/comment/41674566
answers question: http://stackoverflow.com/q/26505449
upvote count: 1
has body: in a run block, add $state service on the $rootScope: app.run(function($state, $rootScope) { $rootScope.$state = $state; } ); in your html: 1 2 3 This will add the "someCssClass" class to div 1, if the current state is LB or any substate of LB.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41673301

http://stackoverflow.com/q/26454687
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41581499
has comment: http://stackoverflow.com/comment/41581518
has answer: http://stackoverflow.com/a/26470579
score: 5
possible better answer: http://stackoverflow.com/a/26470579
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28036855
has comment: http://stackoverflow.com/comment/41581398
has comment: http://stackoverflow.com/comment/41575058
type: Question
upvote count: 5
has comment: http://stackoverflow.com/comment/41582615
tagged with: javascript
has comment: http://stackoverflow.com/comment/41581486
has comment: http://stackoverflow.com/comment/41581361
has body: I still don't have tight grip on promises. Say I have a code: selected.eq(i) // blink .fadeOut( 200 ).delay( 50 ).fadeIn( 400 ) .delay( 100 ) .fadeOut( 200 ).delay( 50 ).fadeIn( 400 ); and later I call: selected.unbind('click') .promise().done(function () { selected.fadeOut(500); }); It works as excepted -- once the blinking is done, the last fadeOut kicks in. But when I do the blinking via plugin (with setup to use jQuery animation) so my entire first part is just one call: selected.eq(i).modernBlink({ duration: 750, iterationCount: 3, auto: true} ); the body of blink is: ModernBlink.prototype._fallbackAnimation = function _fallbackAnimation( iterationCount ) { var self = this, duration = this.options.duration / 2; if ( iterationCount &gt; 0 || iterationCount === 'infinite' ) { iterationCount = iterationCount === "infinite" ? "infinite" : iterationCount - 1; this.el.animate( { 'opacity': 0 }, duration ).promise().done( function() { self.el.animate( { 'opacity': 1 }, duration ); self._fallbackAnimation( iterationCount ); }); } }; so it is recursive call based on promise as well. The outcome is different -- after first iteration from blink my code kicks in, because my promise won. The visual effect is -- blink, fade out (mine part), keep blinking. My question is -- how to tell jQuery the blink promises are more important than mine? NOTE: I cannot attach directly the second part to the first part, because they are scattered in code, and sometimes the first part is not executed. The code of blink comes from Modern Blink by leonderijke. MB was used here as example! UPDATE: Big picture, I don't know if this helpful or not, but anyway: if (Environment.Mode=='blink') // my private settings variable call_blink(); // part 1, presented above call_fade_out(); // part 2, presented above This is why, I cannot chain them. I have similar "configuration" of code used some more, so I would like to understand it, and use it here and in other places.
answer count: 2
has answer: http://stackoverflow.com/a/28036855
has title: Is there a way to control flow of promises in linear call order?
downvote count: 0

http://stackoverflow.com/comment/56774090
comment on: http://stackoverflow.com/a/27370207
score: 0
type: Comment
has text: IT WORKS PERFECT! THANKS
type: AnswerComment

http://stackoverflow.com/comment/41490716
type: QuestionComment
comment on: http://stackoverflow.com/q/26422539
has text: On `back` button click you can check if the current document is in full screen (`document.webkitIsFullScreen`) and in case cancel it (`document.webkitCancelFullScreen();`). Just be careful to catch also other vendors code.
score: 0
type: Comment

http://stackoverflow.com/comment/41520293
type: Comment
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63271/discussion-between-herr-and-shiro).
comment on: http://stackoverflow.com/q/26437882
score: 0

http://stackoverflow.com/comment/41649686
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26509525
has text: Voting to close as 'Off topic' / 'not reproducible'.
score: 0

http://stackoverflow.com/q/26486064
possible better answer: http://stackoverflow.com/a/26486967
favorite count: 0
tagged with: markup
linked to: http://stackoverflow.com/q/590747
has answer: http://stackoverflow.com/a/26487046
downvote count: 1
type: AnsweredQuestion
has body: I coded an AJAX function to make a search engine in a database. I want to highlight in yellow the searched characters in the displayed result. The following code is working pretty well: $.ajax({ type: "GET", url: "search_db.php", data: "q="+valueSearch, dataType: "JSON", success: function(returnQuery) { $("#table tbody").empty(); // console.log(returnQuery); $.each(returnQuery, function(i, line) { content = ' '; content += ' ' + line.name_serv + ' '; content += ' ' + line.name_dns + ' '; content += ' ' + line.ip + ' '; content += ' ' + line.pass1 + ' '; content += ' ' + line.pass2 + ' '; content += ' '; re = new RegExp('('+valueSearch+')', "gi") content2 = content.replace(re, '$1'); $(content2).appendTo("#table tbody"); }); }, error: function() { $("#table tbody").empty(); } }); There are three cases where it doesn't work properly: if I search 'd', 't' or 'r' (because the remplacements are made in the or markups too). Here is an example of the variable content: " Jupiter mail.test.com 10.0.0.1 root a$01'deK " I try to make a RegExp to add the markup only to characters matching the search between and , but I don't find the right syntax. Does anyone have an idea (pure JavaScript and/or jQuery)?
has comment: http://stackoverflow.com/comment/41606755
has comment: http://stackoverflow.com/comment/41607542
score: -1
has comment: http://stackoverflow.com/comment/41606495
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26487046
has comment: http://stackoverflow.com/comment/41607600
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26486967
has title: RegExp - Replace some characters between markups
tagged with: regex

http://stackoverflow.com/comment/41621956
score: 0
has text: Please post a complete code example so that we can reproduce the situation.
comment on: http://stackoverflow.com/q/26492525
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26508749
tagged with: javascript
has title: automated pdf print with embedded javascript
tagged with: printing
has body: I would like to silently print different pages with embedded javascript in PDFs. I looked into adobe's JS guide. This is what i got: pp = { printerName: "BrotherA", bUI: false, bSilent: true, nStart: 0, nEnd: 2}; this.print(pp); pp = { printerName: "BrotherB", bUI: false, bSilent: true, nStart: 3, nEnd: 4}; this.print(pp); Error message: "There was a problem reading this document (14)." If i set the param bUI to true, or uncomment it, the code works. But then i got the UI, which i don't want to see. Anyone some ideas? thx
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26509737
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26509737
type: Question
downvote count: 0

http://stackoverflow.com/q/26364844
tagged with: image
type: Question
has answer: http://stackoverflow.com/a/26366338
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: Ajax image uploader with auto album
favorite count: 0
type: UnansweredQuestion
downvote count: 0
has body: I'm working on my wedding site and wish to allow guest to upload photos. I tried to merge "Ajax Image Upload and Resize with jQuery and PHP" with an image gallery I brought online. Both html and php work fine individually but when I tried to put them on the site page, it stop loading at "processupload.php". Appreciate your help if you know how I can resolve: Ajax Upload and Resize with jQuery and PHP - Demo processupload.php <?php ############ Configuration ############## $thumb_square_size = 200; //Thumbnails will be cropped to 200x200 pixels $max_image_size = 5000; //Maximum image size (height and width) $thumb_prefix = "thumb_"; //Normal thumb Prefix $destination_folder_thumb = 'Gallery/thumbnails/';//upload thumb $destination_folder_full = 'Gallery/'; //upload full image $jpeg_quality = 100; //jpeg quality ########################################## //continue only if $_POST is set and it is a Ajax request if(isset($_POST) && isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){ // check $_FILES['ImageFile'] not empty if(!isset($_FILES['image_file']) || !is_uploaded_file($_FILES['image_file']['tmp_name'])){ die('Image file is Missing!'); // output error when above checks fail. } //uploaded file info we need to proceed $image_name = $_FILES['image_file']['name']; //file name $image_size = $_FILES['image_file']['size']; //file size $image_temp = $_FILES['image_file']['tmp_name']; //file temp $image_size_info = getimagesize($image_temp); //get image size if($image_size_info){ $image_width = $image_size_info[0]; //image width $image_height = $image_size_info[1]; //image height $image_type = $image_size_info['mime']; //image type }else{ die("Make sure image file is valid!"); } //switch statement below checks allowed image type //as well as creates new image from given file switch($image_type){ case 'image/png': $image_res = imagecreatefrompng($image_temp); break; case 'image/gif': $image_res = imagecreatefromgi…
score: 1

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/26430644

http://stackoverflow.com/a/26395407
score: 3
type: Answer
answers question: http://stackoverflow.com/q/26395377
has comment: http://stackoverflow.com/comment/41442716
has body: Reverse the conditions as follows: while ((j &lt; lines.length) &amp;&amp; (lines[j].indexOf('// &lt;&lt;&lt;END PERMISSIONS TREE&gt;&gt;&gt;') &lt; 0)) { The reason for the error is the fact that you first try to use lines[j], and only after check whether j is legal. There may also be an unrelated logic error as Chris Hayes describes. Note that even without incrementing j, if the string block is not terminated, you would run into the same error.
upvote count: 3
downvote count: 0

http://stackoverflow.com/comment/41627964
score: 0
type: AnswerComment
type: Comment
has text: Thanks man. I've found my problem. value2 and value1 were null (their visibility was false, I didn't know this turns them null). So now that I first check if they are not null before using them, everything works!
comment on: http://stackoverflow.com/a/26497376

http://stackoverflow.com/a/54115619
upvote count: 4
has body: Short plain JavaScript: [].forEach.call(document.querySelectorAll('light'), function (el) { el.classList.remove('hidden'); });
downvote count: 0
answers question: http://stackoverflow.com/q/26362423
type: Answer
score: 4

http://stackoverflow.com/a/26449770
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41541228
has comment: http://stackoverflow.com/comment/41541147
type: Answer
has comment: http://stackoverflow.com/comment/41541102
accepted answer of: http://stackoverflow.com/q/26449758
upvote count: 2
has comment: http://stackoverflow.com/comment/41541455
has body: getScript uses XHR (ajax), which is controlled by the Same Origin Policy. So you can't load scripts from other origins unless they enable your origin via CORS. Instead, simply add a script tag referencing the script you want to load. var scr = document.createElement('script'); scr.onload = function() { display("Loaded: " + typeof ko); }; scr.onerror = function() { display("Error"); }; scr.src = "http://knockoutjs.com/downloads/knockout-3.2.0.js"; document.querySelector("script").parentNode.appendChild(scr); function display(msg) { $("&lt;p&gt;").html(String(msg)).appendTo(document.body); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
answers question: http://stackoverflow.com/q/26449758
has comment: http://stackoverflow.com/comment/41541162
has comment: http://stackoverflow.com/comment/41541578
score: 2

http://stackoverflow.com/comment/41621795
type: QuestionComment
has text: I have tried to replace `val` with `value` but still doesn't work.
comment on: http://stackoverflow.com/q/26493928
score: 0
type: Comment

http://stackoverflow.com/comment/41582225
score: 0
type: QuestionComment
has text: You are calling `document.write` after the browser finished parsing the document.
type: Comment
comment on: http://stackoverflow.com/q/26472029

http://stackoverflow.com/q/26401799
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/610406
has answer: http://stackoverflow.com/a/26402691
has title: Knockout string format pattern
tagged with: knockout.js
type: Question
accepted answer: http://stackoverflow.com/a/26402691
tagged with: custom-binding
tagged with: javascript
tagged with: binding
downvote count: 0
answer count: 1
favorite count: 0
has body: In WPF there is a binding that I use a lot; <GridViewColumn DisplayMemberBinding="{Binding Path=Price, StringFormat=Now {0:c}!}"/> Is there a good way to achieve a similar binding in knockout? I'm using a sprintf library which would be great to utilize. I guess I can create a custom binding for this, but this should be a rather common request so I thought I'd check here before trying to re-invent the wheel. One use case is to build a href attribute of an atag dynamically, e.g. to produce something like this: Foo Where 1 is the product group and 2 is the id of a product
upvote count: 2
has comment: http://stackoverflow.com/comment/41454307

angularjs-ng-show
tags question: http://stackoverflow.com/q/26408379
type: Tag
tag name: angularjs-ng-show
tags question: http://stackoverflow.com/q/26474930

http://stackoverflow.com/q/26490380
score: 1
has body: My input looks like this: Lorem ipsum dolor sit amet, consectetur adipiscing elit. _4,7,13 Nullam suscipit orci sit amet feugiat facilisis. Curabitur eget 8 ligula malesuada, vehicula 3,6 quam sit amet, _5 tempor velit. I need to capture every number that's in a comma-separated list preceded by _, individually and using a single regex. In other words, I need the bolded numbers above: [4, 7, 13, 5] I've been trying again and again to make this work without success. I'd like to know if this is even possible before forfeiting and going with multiple expressions. I'm looking for a solution in Javascript, but obviously any pointer will help.
tagged with: replace
answer count: 2
has answer: http://stackoverflow.com/a/26490718
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26490684
favorite count: 0
has comment: http://stackoverflow.com/comment/41615844
has comment: http://stackoverflow.com/comment/41614691
tagged with: regex
tagged with: capture-group
type: AnsweredQuestion
tagged with: list
has title: Capturing items from multiple lists using a single regex
has comment: http://stackoverflow.com/comment/41615192
upvote count: 1
has answer: http://stackoverflow.com/a/26490684
type: Question
accepted answer: http://stackoverflow.com/a/26490718

http://stackoverflow.com/q/26359990
downvote count: 0
tagged with: twitter-bootstrap
tagged with: requirejs
type: Question
has title: Bootstrap3 Navbar toggle is not working with requirejs
score: 1
accepted answer: http://stackoverflow.com/a/26396930
tagged with: javascript
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26396930
has body: I am designing a web app using BackboneJS, RequireJS and Bootstrap. When i am reducing screen size, the navbar is collapsing but the click event is not working on the toggle button. Earlier also i had faced the same issue when i was not using RequireJS. At that time i had included Jquery and BootstrapJS in the Head tag and it worked for me. Now as i am using RequireJS and facing the same issue. Can anyone please help me with this? I am attaching the config code for Require below require.config({ paths: { jquery: '../lib/jquery', underscore: '../lib/underscore', backbone: '../lib/backbone', router: 'router', bootstrap: "//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min" }, shim: { 'backbone': { deps: ['underscore', 'jquery'], exports: 'Backbone' }, 'underscore': { exports: '_' }, 'bootstrap': { deps: ['jquery'] } } });
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41389324
type: AnsweredQuestion
tagged with: twitter-bootstrap-3

http://stackoverflow.com/comment/41401296
has text: @Matsu the prototype reference from **instances** is available in the (non-standard and deprecated) "\_\_proto\_\_" property. It won't change when the constructor prototype changes, as the fiddle posted in the Alex Wayne's comment shows.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26372111
type: Comment

http://stackoverflow.com/q/26364854
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41387437
has comment: http://stackoverflow.com/comment/41387418
type: AnsweredQuestion
score: 0
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26365548
has title: Add items to JSON objects
has comment: http://stackoverflow.com/comment/41388823
has comment: http://stackoverflow.com/comment/41388462
has comment: http://stackoverflow.com/comment/41387456
type: Question
tagged with: c#
has body: I have a situation that I just cannot figure out how to do. I'm trying to add items to a JSON object that was sent from the controller. Here's my models: public class Model1 { public Model2 item {get;set;} public List&lt;Model2&gt; items {get;set;} // And in the page var jsonData = @Html.Raw(JSON.Encode(Model)) This gives me the basic but empty model. Now in the page I fill in various fields and want to add the items into the model for posting. So: jsonData.item.field1 = $("#field1").val(); Then I want to add to the list of items, but I cannot find anything that works: jsonData.items.add(jsonData.item) doesn't work throws an error. jsonData.items.push(jsonData.item); works but every item I add ends up the same. Meaning that when I add the second item there are two in the list but they have the same values. Any help would be appreciated.
has comment: http://stackoverflow.com/comment/41387611
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/26240859
has comment: http://stackoverflow.com/comment/41387400
has comment: http://stackoverflow.com/comment/41387502
answer count: 1
has answer: http://stackoverflow.com/a/26365548

http://stackoverflow.com/comment/41491580
type: Comment
comment on: http://stackoverflow.com/q/26423075
score: 0
has text: Will there be anything else in that label besides the text? And yeah it can
type: QuestionComment

http://stackoverflow.com/a/26369938
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Date.prototype.getJulian = function() { return Math.ceil((this / 86400000) - (this.getTimezoneOffset()/1440) + 2440587.5); } var valDate = input1[0]; var dt = new Date(valDate); var julian_dt = dt.getJulian(); output1 = julian_dt; i was able to use the code above. Thanks
accepted answer of: http://stackoverflow.com/q/26369075
upvote count: 2
answers question: http://stackoverflow.com/q/26369075

http://stackoverflow.com/q/26466896
has answer: http://stackoverflow.com/a/26467054
has comment: http://stackoverflow.com/comment/41571833
type: UnansweredQuestion
has body: I've been struggling with finding a solution to this. I have page which is for all devices, on desktop it loads jQuery and on mobile it switches to jQuery mobile. I have a script on the page which loads info from a csv file and creates an li list, not it works well but for some reason on mobile devices it loads the li list twice. I've tried $("#wrapper").live('pageinit', function() { // more stuff }); And it worked on mobile but in desktop view it didn't load the li's. I also tried document.ready but the li's still loaded twice in mobile. Here's the code:- &lt;div&gt; &lt;form method="post" class="right"&gt; &lt;div class="accnt_cont" &gt; &lt;div id="top5productlist" data-role="page" data-dom-cache="false"&gt; &lt;div class="banner"&gt; &lt;h2&gt;View All Top 5&lt;/h2&gt; &lt;/div&gt; &lt;ul id="tfive" class="listing"&gt; &amp;nbsp; &lt;/ul&gt; &lt;/div&gt; &lt;!-- /#producttabs --&gt; &lt;!-- include return_policy.cont.inc.html ENDS --&gt;&lt;/div&gt; &lt;!-- /.accnt_cont --&gt; &lt;/form&gt; &lt;/div&gt; &lt;script&gt; (function() { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = handleStateChange; xhr.open("GET", "example-data.csv"); xhr.send(); //display("Request sent"); function handleStateChange() { if (xhr.readyState == 4 &amp;&amp; xhr.status &gt;= 200 &amp;&amp; xhr.status &lt; 300) { //display("Got response"); showData(xhr.responseText); } } function showData(data) { var rows = data.split(/\n/); var rowNum; var cells; var cellNum; for (rowNum = 1; rowNum &lt; rows.length; ++rowNum) { cells = rows[rowNum].split(","); display('&lt;li&gt;' + cells[1] + '&lt;/li&gt;'); } } function display(msg) { var p = document.createElement('li'); p.innerHTML = String(msg); document.getElementById("tfive").appendChild(p); } })(); &lt;/script&gt; I want the script to work on desktop and mobile and only load the li's once. Any Suggestions? Thanks
has title: Script firing twice
has comment: http://stackoverflow.com/comment/41571627
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26482746
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26368509
score: 1
answers question: http://stackoverflow.com/q/26367469
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Just build your find query object conditionally, i think this is as generic as it can get, just add to allowedParams as needed exports.getMessages = function (req, res) { var allowedParams = [ 'deleted', 'readed', 'from' ]; var query = { to: req.user.email }; for(param in req.query) { if(allowedParams.indexOf(param) !== -1) { query[param] = req.query[param]; } } Message.find(query, function (err, messages) { if(err) { res.send(err); } res.json(messages); }); }
accepted answer of: http://stackoverflow.com/q/26367469

http://stackoverflow.com/q/26421328
has body: I have a ip camera that is able to provide a rtsp stream or consecutive snapshots. I'm trying to display this camera's live video on a webpage. To display the rtsp stream I need to use a vlc plugin (I don't like this solution because I'm displaying the videos inside a leafletjs map. Leaflet does not handle vlc very well); Is there some way to display the consecutive snapshots in a html canvas (or something else)?
has title: Display consecutive snapshots in webpage
has comment: http://stackoverflow.com/comment/41489125
score: 0
linked to: http://stackoverflow.com/q/1735933
has comment: http://stackoverflow.com/comment/41638000
tagged with: snapshot
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41489558
answer count: 0
has comment: http://stackoverflow.com/comment/41488454
has comment: http://stackoverflow.com/comment/41488699
type: Question
linked to: http://stackoverflow.com/q/24440265
tagged with: javascript

http://stackoverflow.com/a/26503798
score: 0
has body: You could use a small JQuery function, the first on the below code: $("li").on("dblclick", function () { $(this).css("background","white"); }); function show_hide_f(id) { var obj = document.getElementById(id); if (obj.style.display != "block") { obj.style.display = "block"; } else { obj.style.display = "none"; document.getElementById("webLI").style.background = "white"; document.getElementById("personalLI").style.background = "white"; document.getElementById("postLI").style.background = "white"; } var objPortal = document.getElementById("web"); var objPersonal = document.getElementById("personal"); var objPost = document.getElementById("post"); if (obj == objPortal) { document.getElementById("webLI").style.background = "red"; document.getElementById("personalLI").style.background = "white"; document.getElementById("postLI").style.background = "white"; objPersonal.style.display = "none"; objPost.style.display = "none"; } else if (obj == objPersonal) { document.getElementById("webLI").style.background = "white"; document.getElementById("personalLI").style.background = "red"; document.getElementById("postLI").style.background = "white"; objPortal.style.display = "none"; objPost.style.display = "none"; } else if (obj == objPost) { document.getElementById("postLI").style.background = "red"; document.getElementById("personalLI").style.background = "white"; document.getElementById("webLI").style.background = "white"; objPersonal.style.display = "none"; objPortal.style.display = "none"; } } .MainMenu { position: relative; } .MainMenu ul { list-style-type: none; position: relative; } .MainMenu ul li { width: 100px; box-shadow: 4 4 10px rgba(0, 0, 0, 0.3); -moz-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3); -webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3); filter: progid:DXImageTransform.Microsoft.dropshadow(offX=10, offY=10, color=rgba(0, 0, 0, 0.3)); text-align: center; height: 45px; line-height:45px; margin-right: 10px; float: left; text-transform: uppercase; padding: 10p…
type: Answer
answers question: http://stackoverflow.com/q/26503518

http://stackoverflow.com/q/26365420
tagged with: http://stackoverflow.com/tag/svg
has body: I found no direct answer for this, please forgive me if this has been covered differently in another topic. I draw a bar chart which appears with a transition. I also want to add a tooltip which displays the value of data on mousehover. Using the code below I have managed to obtain either the tooltip or the transition, but never the 2 together, which is my objective. chart.selectAll(".bar") .data(data) .enter() .append("rect") .attr("class", "bar") .attr("fill", function(d) {return colorscale(colorize(d.age));}) .attr("x", function(d) {return xscale(d.name);}) .attr("y", height - 3) .attr("height", 3) .attr("width", xscale.rangeBand()) .append("title") .text(function(d){return d.age;}) .transition() .duration(1600) .attr("y", function (d) {return yscale(d.age);}) .attr("height", function (d) {return height - yscale(d.age);}) ; If I remove .append("title") .text(function(d){return d.age;}) Then my transition works fine. If I but those 2 lines back I can see my tooltip but I lose my transition. Any suggestion would be appreciated! You can see the result here Thank you
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41388592
type: Question
accepted answer: http://stackoverflow.com/a/26365594
tagged with: javascript
tagged with: transition
score: 0
answer count: 1
has title: d3.js - transition starting only without svg title, not with it
has answer: http://stackoverflow.com/a/26365594
type: AnsweredQuestion

http://stackoverflow.com/a/26361201
score: 1
accepted answer of: http://stackoverflow.com/q/26361124
answers question: http://stackoverflow.com/q/26361124
type: Answer
upvote count: 1
has body: Since you are returning the promise returned as part of invocation of then in the error callback do return OtherService.load().then(function(item) { item.preprocessed = true; return item; }, function(error) { return $q.reject(error); }); And the error callback would fire on the controller.
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/41559750
has text: Could you please specify? And is there a way to parse an array in d3 without an url?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26448926

http://stackoverflow.com/q/26364633
possible better answer: http://stackoverflow.com/a/26365141
has answer: http://stackoverflow.com/a/26365467
has answer: http://stackoverflow.com/a/26365141
type: AnsweredQuestion
has title: How to properly test an AngularJS Controller Function
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26365467
tagged with: javascript
tagged with: jasmine
score: 0
has body: We just started implementing jasmine tests in our AngularJS project and I have a question: We want to test this controller function: $scope.deleteClick = function () { $scope.processing = true; peopleNotesSrv.deleteNote($scope.currentOperator.operatorId, $scope.noteId, $scope.deleteSuccessCallback, $scope.deleteErrorCallback); }; We wrote this following test: it('deleteClick should pass proper parameters to peopleNoteSrv', function () { $controllerConstructor('PeopleNoteEditCtrl', { $scope: $scope }); $scope.noteId = 5; expect(function () { $scope.deleteClick(); }).not.toThrow(); }); This test makes sure that when we call the $scope.deleteClick() function that $scope.processing is set to true and that the call to peopleNotesSrv doesn't throw any errors because of invalid arguments. We are testing the two callback functions in separate tests. Should we be testing that the peopleNotesSrv.deleteNote function was called so the test is more explicit? The way this test is written right now it doesn't really tell someone what the deleteClick() function does under the hood and that seems to be incorrect.
linked to: http://stackoverflow.com/q/4904096
has comment: http://stackoverflow.com/comment/41386941
tagged with: angularjs

http://stackoverflow.com/comment/41625993
type: Comment
has text: @charlietfl Can you please explain bit more about it. Do we have any other option to get this detail.
score: 0
comment on: http://stackoverflow.com/q/26496230
type: QuestionComment

http://stackoverflow.com/comment/41629185
has text: I am trying an ordinary array.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26498006

http://stackoverflow.com/comment/41571551
type: QuestionComment
comment on: http://stackoverflow.com/q/26466798
score: 2
has text: Values for opacity go from 0 to 1. In both cases you are outside those limits. Also, why do you have transparency set for your walls? Why do you have a transparent plane in the place of your door?
type: Comment

http://stackoverflow.com/comment/41500080
score: 0
has text: Thw for helping, im not sure to understand how to get it from the request body, pls explain :)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26425987

http://stackoverflow.com/a/26381653
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/26381324
downvote count: 0
has comment: http://stackoverflow.com/comment/41417977
score: 4
has body: Adding such a parameter to a file will result in a re-download by the browser. By changing the parameter on a "critical fix" you will achieve that every client re-downloads the file even if cached. you can force a download on every reload by giving your file a random parameter. Please note that this will increase your traffic and loading times. &lt;link rel="stylesheet" type="text/css" href="style.css?v=&lt;?php echo rand(); ?&gt;" /&gt;

http://stackoverflow.com/comment/41596273
comment on: http://stackoverflow.com/a/26471956
score: 0
type: AnswerComment
type: Comment
has text: Remove everything and just get the click handler working first, remove the condition etc until at least that works.

http://stackoverflow.com/q/26458771
has answer: http://stackoverflow.com/a/26491520
tagged with: node.js
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41616651
has title: Promise based queue
has body: I have an array of files, that I'd like to attack N at a time. And a function doWork that returns a promise. var files = [] var doWork = function(file) { return asyncFn(file) } I'd like to be able to push onto this queue dynamically. Edit: I've tried various modules (promise-queue, async-q). They all work in a fashion, but they don't allow using an array as a queue. They have there own internal structure that you need to push onto. The reason I need to use an array as I want to be able to push an item onto the queue, and check that it's not already on the queue.
type: Question
has comment: http://stackoverflow.com/comment/41572202
answer count: 2
accepted answer: http://stackoverflow.com/a/26491520
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26459001
has comment: http://stackoverflow.com/comment/41557451
possible better answer: http://stackoverflow.com/a/26459001
favorite count: 0
tagged with: promise
upvote count: 2
has comment: http://stackoverflow.com/comment/41586156

http://stackoverflow.com/q/26435697
has title: Sliding div using css3 translate
has comment: http://stackoverflow.com/comment/41516170
has comment: http://stackoverflow.com/comment/41516137
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41516221
has answer: http://stackoverflow.com/a/26435904
type: AnsweredQuestion
score: 1
has body: I'm trying to slide a menu and container either left or right using css3 translate. But on clicking on toggle, the menu span appears to slide pretty fast and the container appears to slide to left slowly. Have I written the css styles properly ? CSS .animate-left,.animate-left-container { transition: all .6s ease-out 0.2s; } .animate-left-container { -webkit-transform: translateX(0px); } .animate-right,.animate-right-container { transition: all .6s ease-in 0.2s; } .animate-right-container { -webkit-transform: translateX(0px); } .animate-left { -webkit-transform: translateX(-45px); margin-left: -45px; } .animate-right{ -webkit-transform: translateX(0); margin-left: 0px; } JS var container = $(".app-data-container").children(); $('.nav-toggle-button-container').on('click',function(e){ var x = $(container[0]), y= $(container[1]); if(x.hasClass('animate-left') &amp;&amp; y.hasClass('animate-left-container')) { x.removeClass('animate-left').addClass('animate-right'); y.removeClass('animate-left-container').addClass('animate-right-container'); }else if(x.hasClass('animate-right')){ x.removeClass('animate-right').addClass('animate-left'); y.removeClass('animate-right-container').addClass('animate-left-container'); }else{ x.addClass('animate-left'); y.addClass('animate-left-container'); } }); Demo : http://jsfiddle.net/2b9e8bq9/
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26435904
favorite count: 0

http://stackoverflow.com/q/26509127
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26509309
score: 1
possible better answer: http://stackoverflow.com/a/26509271
tagged with: forms
has title: Disable and enable a form text input depending on value form select..?
has answer: http://stackoverflow.com/a/26509359
downvote count: 0
tagged with: javascript
has body: I'm making a website and there's a form in it... now what im trying to do is very simple but i just dont know how anymore so im asking you guys. In this form you can select whether or not you want custom text on the clothing you buy. you can select yes and no with the select statement. and next to it there's a input text where you can fill in this text. What i want to do is that when the value of the select is no or still default, the input text gets disabled and when the value is yes it gets enabled. Screenshot of output http://prntscr.com/4ym079 My Code: Eigen text op product * Eigen text op product Nee Ja(+€3,50) Uw eigen text* If you still have any questions, please ask me. DeusGladio
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26509271
answer count: 4
has comment: http://stackoverflow.com/comment/41648643
favorite count: 0
has comment: http://stackoverflow.com/comment/41648623
upvote count: 1
has answer: http://stackoverflow.com/a/26509212
accepted answer: http://stackoverflow.com/a/26509212

http://stackoverflow.com/comment/41602886
type: AnswerComment
type: Comment
has text: Brilliant mate :) just a question, Now I will create a Controller inside this Directive. Then how I will pass that response to tell that find for div in here. Hope you know what I mean. Thanks
comment on: http://stackoverflow.com/a/26482965
score: 0

http://stackoverflow.com/a/26495664
has comment: http://stackoverflow.com/comment/41649087
accepted answer of: http://stackoverflow.com/q/26494521
upvote count: 3
has body: EDIT: Set the wrapping divs to display: inline-block; http://jsfiddle.net/o8bjr3eL/4/ Wrap your element in a div with the cursor: not-allowed; and the child a has the pointer-events: none; html: &lt;div class="not-allowed"&gt; &lt;a class="no-click" href="#"&gt;&lt;img src="https://www.google.com/images/srpr/logo11w.png"/&gt;&lt;/a&gt; &lt;/div&gt; EDIT: css: .not-allowed{ cursor: not-allowed; display: inline-block; /* This is working */ } .no-click { pointer-events: none; -webkit-filter: invert(40%); } That worked for me
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41658917
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41652570
answers question: http://stackoverflow.com/q/26494521

http://stackoverflow.com/q/26373427
has answer: http://stackoverflow.com/a/26374038
has body: Here is my HTML excerpt: Here's what's in my alert_box.js $('#name').click(function(){ alert('alert box working'); }); Both JQuery and alert_box.js are imported
type: Question
has title: Functions with alert boxes from an outside JQuery file don't work
score: 0
has comment: http://stackoverflow.com/comment/41403461
answer count: 3
accepted answer: http://stackoverflow.com/a/26374038
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41403489
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26374373
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26373447
has answer: http://stackoverflow.com/a/26373447
has comment: http://stackoverflow.com/comment/41403377

http://stackoverflow.com/comment/41416290
comment on: http://stackoverflow.com/a/26380593
has text: yes thank you, it works and i understand how to work. But i know my codes is not good, can you share me a documentation to getting better this code?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/43359550
type: Comment
comment on: http://stackoverflow.com/a/27085279
has text: Do you have any suggestions about how this would work with a component?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26375193
score: 3
has comment: http://stackoverflow.com/comment/41406560
has comment: http://stackoverflow.com/comment/41406562
has comment: http://stackoverflow.com/comment/41406659
has comment: http://stackoverflow.com/comment/41406619
has answer: http://stackoverflow.com/a/62647343
has title: How to use .emit() and .on() methods in browsers?
tagged with: browser
answer count: 2
has comment: http://stackoverflow.com/comment/41406493
downvote count: 0
tagged with: javascript
favorite count: 0
upvote count: 3
has comment: http://stackoverflow.com/comment/41406631
has comment: http://stackoverflow.com/comment/41406689
has comment: http://stackoverflow.com/comment/41407011
tagged with: events
has comment: http://stackoverflow.com/comment/41406536
tagged with: node.js
has answer: http://stackoverflow.com/a/26375621
has body: I'm writing a game in browser and I'm trying to find how to use .emit() and .on() methods in browsers. I can't get it to work as I get an error that .emit() is undefined. Can anyone explain how to get it working? For example, I'm trying to implement the following API for my game: var game = new Game(); game.on('start', function(){ draw_players(); }); game.on('end', function(){ display_end_game_message(); }); etc. And inside Game function I've something like this that emits start: function Game(){ function connect(){ emit('start'); } } How do I get emit() and on() working in browser?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41406505
has comment: http://stackoverflow.com/comment/41406530
type: Question

http://stackoverflow.com/q/26427685
downvote count: 0
has comment: http://stackoverflow.com/comment/41500904
favorite count: 0
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/41500501
accepted answer: http://stackoverflow.com/a/26429418
type: AnsweredQuestion
has body: I have an AngularJS app. My app allows the user to enter a number and press execute. When the execute button is pressed, I am dynamically building an array for processing. While the array is being built, the UI seems to lock. I have the following: Execute Building array $scope.preloadedItems = loadArray(); $scope.executeTests = function() { $scope.buildingArray = true; var i = 0; angular.forEach($scope.preloadedItems, function(item) { if (i < numToExecute) { $scope.myArray.push({ id: item.id }); } i = i + 1; }); $scope.buildingArray = false; $scope.processArray(); }; The box the says "Building array" never appears. Its like the ui locks until the angular.forEach statement is done. the preloadedItems array has thousands of entries in it. That's why I want to show the "Building array" box. Is there a way to unblock the UI? Or, at least show the building array box? Thanks!
has comment: http://stackoverflow.com/comment/41500437
has comment: http://stackoverflow.com/comment/41500504
type: Question
tagged with: javascript
has title: Unblocking AngularJS UI
possible better answer: http://stackoverflow.com/a/26427941
answer count: 2
has answer: http://stackoverflow.com/a/26429418
has answer: http://stackoverflow.com/a/26427941
score: 2

http://stackoverflow.com/comment/41526609
type: QuestionComment
comment on: http://stackoverflow.com/q/26441701
has text: 1) `click on the src` doesn't make sense. You can click on an anchor tag (``) but not on an attribute of `img`. 2) What doesn't your aspx file look like for defining the image.
score: 0
type: Comment

http://stackoverflow.com/q/26506195
tagged with: angularjs
has title: Broadcast event is not working when HTML is compiled on the fly
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41643385
has comment: http://stackoverflow.com/comment/41643302
type: Question
has body: I'm starting to use Angular on a project that needs to be refactored, but I cannot start from scratch, so for now I need to insert some html, with Angular attributes, that need to be compiled on the fly, like this: var html = " Click Me "; var $injector = angular.injector(['ng', 'MyProject']); $injector.invoke(function($rootScope, $compile) { $('body').append($compile(html)($rootScope)); }); I have two controllers, like the following: function MyController($scope, $rootScope) { $scope.raiseEvent = function(){ $rootScope.$broadcast('handleBroadcast'); } }; function MyOtherController($scope) { $scope.$on('handleBroadcast', function (event, data) { // Code goes here }); }; My intention is when I click "Clik Me" to broadcast a message for MyOtherController. raiseEvent is called when I press "Click Me" but the listener in MyOtherController is not catching that event. Fuhermore, if I use that HTML on an HTML file I don't get this error, which makes me believe that the problem is with the $compile method. Any suggestions?
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41643412
has answer: http://stackoverflow.com/a/26506434
score: 0
has comment: http://stackoverflow.com/comment/41643368

http://stackoverflow.com/comment/41435458
has text: I once got my answer downvoted by the OP even though it fulfilled every requirement they had listed, because it failed to fulfill a requirement that they _also wanted but didn't specify_. I guess they wanted a psychic to predict whether they wanted fish or steak for dinner to begin with.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26390341
type: AnswerComment

http://stackoverflow.com/a/26426793
upvote count: 1
answers question: http://stackoverflow.com/q/26422730
accepted answer of: http://stackoverflow.com/q/26422730
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41499986
has body: In your app.js, why did you redefine "chosen" directive since you are using the Angular Chosen plugin? I modified your app.js in your second plnkr as follow and things works well. var app = angular.module('myApp',['localytics.directives']); // inject the chosen app.controller('TestController', ['$scope','$http', function TestController($scope,$http){ $scope.url = 'testValues.json'; $scope.wordList = []; $scope.selectedWord = {}; $scope.loadWords = function(){ $http.get($scope.url).then(function(result){ $scope.wordList = result.data; }); }; $scope.loadWords(); } ]);
type: Answer

http://stackoverflow.com/comment/41550917
type: Comment
comment on: http://stackoverflow.com/a/26454987
score: 0
type: AnswerComment
has text: It scrolls now, without any texts added!

http://stackoverflow.com/q/26357611
has body: I have an issue with my Javascript. I have a button which dynamically adds a div with 4 inputs each time we click on it (the button). All these inputs are required. I can delete the div with a button that deletes the selected div. It works when the inputs are not empty. When I want to delete a div with empty inputs, I cannot because of required attribute. I try to add the var test to delete required attribute before calling the action which deletes the div, but it doesn't work. It seems like it is not difficult, but I am not very good in JS. Someone could explain me how to do this? $(document).ready(function() { var max_fields = 10; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID var test = document.getElementById('test'); var x = 1; //initlal text box count $(add_button).click(function(e){ //on add input button click e.preventDefault(); if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper).before(' Prénom du chat Age du chat Tolérance avec les autres animaux Description du chat '); //add input box } }); $(wrapper).on("click",".remove_field", function(e){ //user click on remove text e.preventDefault(); $(test).removeAttr('required'); e.preventDefault(); $(this).parent('div').remove(); x--; }) }); My HTML: Ajouter un chat
type: Question
tagged with: javascript
tagged with: jquery
has title: Javascript: How to remove attribute required for all input inside a div
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26358007
type: UnansweredQuestion
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41373875

http://stackoverflow.com/q/26374218
answer count: 1
tagged with: jquery-ui
tagged with: jquery-ui-datepicker
has body: I need to set a date in a one input text field of my html page and then call a script once the date is set and assign a new date value to an another text field. New date value is calculated using the first date value. I use $("#id").change() for that. But it does not work as I expected. This is my code for that. my file first date: last date: I have put prevent default to stop the page is getting scrolled to top once the script is called(This is a part of a big html page). Why this does not work properly. Can you explain me why doesn't this work and a way to overcome the issue.
has answer: http://stackoverflow.com/a/26374268
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
has title: Jquery change() method does not work properly
has comment: http://stackoverflow.com/comment/41404868
has comment: http://stackoverflow.com/comment/41404795
accepted answer: http://stackoverflow.com/a/26374268
score: 0

http://stackoverflow.com/q/26366299
linked to: http://stackoverflow.com/q/5943630
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26366787
accepted answer: http://stackoverflow.com/a/26366787
has body: I'm trying to get data from a external api, but I keep getting the error message: XMLHttpRequest cannot load... No 'Access-Control-Allow-Origin' header is present on the requested resource. here is my code:
tagged with: javascript
has comment: http://stackoverflow.com/comment/41390509
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26376664
tagged with: asp.net-web-api
has comment: http://stackoverflow.com/comment/41390101
has answer: http://stackoverflow.com/a/26376664
has title: ajax GET - XMLHttpRequest cannot load
tagged with: ajax
tagged with: azure
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41540822
comment on: http://stackoverflow.com/a/26437509
type: Comment
score: 0
has text: No, sorry, it doesn't work, tried it. It hides my div if I say in CSS: "visibility:hidden;" but if I try to add the same css property with JQuery it doesn't work.
type: AnswerComment

http://stackoverflow.com/comment/41500754
score: 0
type: Comment
type: QuestionComment
has text: wwwmarty the only problem with that is there are many pages in this project and this is in the layout. All the pages have different form names to work with that page's controller and other javascript functions. I see what you are saying though. Someone else suggested I create a flag on the tiles I do not want it to load on and then just check for that flag when the js on the layout loads.
comment on: http://stackoverflow.com/q/26413567

http://stackoverflow.com/comment/41584337
has text: Not sure, I do know you can edit the HTML in the Elements panel.
type: QuestionComment
comment on: http://stackoverflow.com/q/26473420
type: Comment
score: 0

http://stackoverflow.com/q/26402033
has title: Missing click event for inside element on firefox
score: 31
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/68924388
has answer: http://stackoverflow.com/a/60569480
possible better answer: http://stackoverflow.com/a/41889332
tagged with: onclick
downvote count: 0
has answer: http://stackoverflow.com/a/26403202
has answer: http://stackoverflow.com/a/26402305
accepted answer: http://stackoverflow.com/a/26403202
type: Question
tagged with: firefox
has answer: http://stackoverflow.com/a/73973656
tagged with: javascript
upvote count: 31
has body: I am experiencing problem with Firefox 32 when I bind action on click event of span element inside a button element. Other browsers seems to works well. Here the code illustrating the issue on jsFiddle. **Working** inside a button **Not working** Does anybody know why and if it's a bug or a feature ?
has answer: http://stackoverflow.com/a/41889332
tagged with: button
tagged with: dom-events
favorite count: 0
answer count: 5

http://stackoverflow.com/comment/41465490
score: 0
comment on: http://stackoverflow.com/a/26408294
type: Comment
has text: With jQuery you would normally try to avoid repeated calls. If you restructure using `data-` attributes you do not need to change the code for any number of items (alternate answer posted).
type: AnswerComment

http://stackoverflow.com/a/69724279
has body: I think, this solution a good fit for this problem $("#rangevalue").on("input", function(){ updateSlider() }); function updateSlider() { // Update the value while the mouse is held down. $("#text").text($("#rangevalue").val()); setTimeout(updateSlider, 50); } 0
score: 0
answers question: http://stackoverflow.com/q/26429492
type: Answer

http://stackoverflow.com/comment/41635427
comment on: http://stackoverflow.com/q/26501726
has text: where is the code to fiddle with :D
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41503070
type: Comment
type: QuestionComment
has text: word. I added the complete code
comment on: http://stackoverflow.com/q/26429029
score: 0

http://stackoverflow.com/q/26359120
tagged with: javascript
has title: onclick of multiple checbox in javascript
has comment: http://stackoverflow.com/comment/41376349
score: 0
answer count: 2
has body: my code is as follows &lt;script&gt; function search() { var bed = document.getElmentById("bed").value; alert(bed); } &lt;/script&gt; &lt;input type="checkbox" id="bed" name="bed" value="1" onClick="search()"/&gt;1 BHK &lt;br/&gt; &lt;input type="checkbox" id="bed" name="bed" value="2" onClick="search()"/&gt;2 BHK &lt;br/&gt; &lt;input type="checkbox" id="bed" name="bed" value="3" onClick="search()"/&gt;3 BHK &lt;br/&gt; &lt;input type="checkbox" id="bed" name="bed" value="4" onClick="search()"/&gt;4 BHK &lt;br/&gt; &lt;input type="checkbox" id="bed" name="bed" value="5" onClick="search()"/&gt;5 BHK &lt;br/&gt; When i click on any of the checkbox i get only first value.
has answer: http://stackoverflow.com/a/26359720
type: UnansweredQuestion
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/41377538
has answer: http://stackoverflow.com/a/26360114

http://stackoverflow.com/a/26448340
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41538722
upvote count: 9
has comment: http://stackoverflow.com/comment/41538580
type: Answer
downvote count: 0
score: 9
accepted answer of: http://stackoverflow.com/q/26447932
answers question: http://stackoverflow.com/q/26447932
has body: The reason you get that error is because you are ignoring the asynchronous nature of your code and treat it as if it were synchronous. If you always log the contents of all relevant parts as the first step in debugging you will realize that at the time you try to process your buffer it's undefined and not an AudioBuffer at all. Tip: Always console.log everything until you know exactly how it behaves at any point. function loadNote() { var request = new XMLHttpRequest(); request.open("GET", "./sounds/topE.wav", true); request.responseType = "arraybuffer"; request.onload = function() { audioContext.decodeAudioData(request.response, function(buffer) { playSoundBuffer = buffer; playSound(); // don't start processing it before the response is there! }, function(error) { console.error("decodeAudioData error", error); }); }; request.send();//start doing something async }

http://stackoverflow.com/a/26387330
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41428607
has body: That is because your forEach loop is not able to loop through all 3 elements as you are removing one item inside the forEach loop. So, say your forEach loop went through index 0 and than 1 where it removed index 1. At this point the length of array is changed to n-1 but the index inside the for loop is still the same. In order to make a copy of an array so that it doesn't make changes in the original array. Do this - var tempArray = names.slice(0); Instead of this - var tempArray = names;
has comment: http://stackoverflow.com/comment/41428670
answers question: http://stackoverflow.com/q/26387188
has comment: http://stackoverflow.com/comment/41428466
accepted answer of: http://stackoverflow.com/q/26387188
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41428550
has comment: http://stackoverflow.com/comment/41428545
has comment: http://stackoverflow.com/comment/41428641
has comment: http://stackoverflow.com/comment/41428503
type: Answer
has comment: http://stackoverflow.com/comment/41428642

http://stackoverflow.com/comment/41465599
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26407498
has text: you may check edited question for a proof that I'm getting undefined...
score: 0

http://stackoverflow.com/comment/41498382
score: 0
type: AnswerComment
type: Comment
has text: I changed it to this: start: new Date(startdate), and added $startdate=$item['start']; as a variable further up but this results in the bar being 100% and full when it starts.. if that's what you meant.
comment on: http://stackoverflow.com/a/26426029

http://stackoverflow.com/a/26448891
score: 0
has comment: http://stackoverflow.com/comment/41539492
has comment: http://stackoverflow.com/comment/41539465
type: Answer
answers question: http://stackoverflow.com/q/26448873
has comment: http://stackoverflow.com/comment/41539443
upvote count: 1
has body: (\d+)[^\d]*$ Try this.Grab the capture.See demo. http://regex101.com/r/wQ1oW3/10
downvote count: 1

http://stackoverflow.com/comment/41619692
type: AnswerComment
has text: also isn't the end missing a `});' ??
comment on: http://stackoverflow.com/a/26492567
type: Comment
score: 0

http://stackoverflow.com/a/26366519
has body: The order in which the arguments of printf are evaluated is implementation specific. Output change from machine to machine.
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26366232
upvote count: 1
downvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26366232

http://stackoverflow.com/comment/41597593
comment on: http://stackoverflow.com/q/26480660
score: 0
has text: Also, you need to make it clearer what you are trying to achieve. Should the menu items slide smoothly around, or can they jump instantly?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26411940
has answer: http://stackoverflow.com/a/26412527
tagged with: markdown
score: 0
accepted answer: http://stackoverflow.com/a/26412527
answer count: 1
tagged with: gulp
has comment: http://stackoverflow.com/comment/41472031
has comment: http://stackoverflow.com/comment/41472609
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41476013
has comment: http://stackoverflow.com/comment/41472692
has comment: http://stackoverflow.com/comment/41472783
tagged with: metalsmith
type: Question
has comment: http://stackoverflow.com/comment/41475858
has body: I'm using Gulp + Gulpsmith + Metalsmith to create my website. metalsmith_markdown is rendering my HTML as follows: # This is an H1 to This is an H1 . Why is it rendering that 'id' tag? Why might that be? Here's the part that deals with the markdown rendering in my Gulpfile.js .use(markdown({ gfm: true, tables: true, breaks: false, pedantic: false, sanitize: true, smartLists: true, smartypants: true }))
has comment: http://stackoverflow.com/comment/41471861
tagged with: javascript
has title: Why is Markdown rendering with id's?

http://stackoverflow.com/a/26438529
answers question: http://stackoverflow.com/q/26438392
upvote count: 1
type: Answer
downvote count: 0
has body: Maybe using filtering works better? // selector $('[data-result=1]') .html('length children div.ii.gt*: ' + $('div').filter( function (i, el) {return /^ii gt/i.test(el.className);}) .children().length); [data-result] { color: red; } some div child div.ii.gt second child div.ii.gt
has comment: http://stackoverflow.com/comment/41562779
score: 1

http://stackoverflow.com/comment/41611699
type: QuestionComment
type: Comment
score: 0
has text: Yes! I see know that the order in request with elements was wrong so it works. Thanks for your time!
comment on: http://stackoverflow.com/q/26460779

http://stackoverflow.com/comment/41550608
score: 0
type: Comment
type: QuestionComment
has text: Start by opening the console and fix all the errors, only when all the javascript errors are fixed will you get it working.
comment on: http://stackoverflow.com/q/26454935

http://stackoverflow.com/a/26445422
accepted answer of: http://stackoverflow.com/q/26445248
has comment: http://stackoverflow.com/comment/41533845
answers question: http://stackoverflow.com/q/26445248
has comment: http://stackoverflow.com/comment/41533765
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41533525
has comment: http://stackoverflow.com/comment/41533560
has body: From the specification point of view, your analysis correct only under assumption that a particular implementation defines a specific order of enumeration for the for-in statement: If an implementation defines a specific order of enumeration for the for-in statement, that same enumeration order must be used in step 5 of this algorithm. See the last sentence here. So if an implementation does not provide such specific order, then for-in and Object.keys may return different things. Well, in this case even two different for-ins may return different things. Quite interesting, the whole story reduces to the question if two for-ins will give the same results if the object was not changed. Because, if it is not the case, then how could you test "the same" anyway? In practice, this will most probably be true, but I could also easily imagine that an object could rebuild its internal structure dynamically, between for-in calls. For instance, if certain property is accessed very often, the implementation may restructure the hash table so that access to that property is more efficient. As far as I can see, the specification does not prohibit that. And it is also not-so-unreasonable. So the answer to your question is: no, there is no guarantee according to the specification, but still will probably work in practice. Update I think there's another problem. Where is it defined, what the order of properties between the members of the prototype chain is? You may get the "own" properties in the right order, but are they merged exactly the way as you do it? For instance, why child properties first and parent's next?
has comment: http://stackoverflow.com/comment/41533639
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41533600

http://stackoverflow.com/q/26407505
has body: I am trying to update currentTime when user click on seekbar it works on Chrome an Firefox but on IE9 I am getting Error: DOM Exception: INDEX_SIZE_ERR (1). $('#progress').click(function(e) { var offset = $(this).offset(); var percent_width = (e.clientX - offset.left) / parseInt($('#progress').width())*100; var number = percent_width.toFixed(2); var time = parseInt(vidPlayer.videoObj[0].duration) / 100 * number; console.log(time.toFixed(2)); vidPlayer.videoObj[0].currentTime = time.toFixed(2); }); I've changed code.
has comment: http://stackoverflow.com/comment/41463775
has answer: http://stackoverflow.com/a/26407721
has comment: http://stackoverflow.com/comment/41463816
score: 0
has title: Javascript ie 9 Seek bar Error
answer count: 1
tagged with: internet-explorer
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/41466534
has comment: http://stackoverflow.com/comment/41464044
type: Question

http://stackoverflow.com/q/26457311
has body: Pastebin of index.html: http://pastebin.com/kdKFqTxe Just copy and paste that and run it (this works but with some broken img links & no css). With regards to the pastebin, just click on a node, and then click the first broken image below the video. What should happen is a dialogue box should appear with links to articles (from tubeArray). All relevant code is pasted below. I'm trying to dynamically change the contents of a div when I click an image. The image has it's respective id (the first index in the inner array) within the first inner array there's another array (index 3). I want to populate my div (id="articleLinks") with those links using JQuery when the image is clicked. JavaScript & JQuery: The tube array. *Note: the first index of each element in tubeArray is the ID & the news articles aren't linked to anything particular. Only interested in tubeArray[0] & tubeArray[4] var tubeArray = [ ['UQ', -27.495134, 153.013502, "http://www.youtube.com/embed/uZ2SWWDt8Wg", [ ["example.com", "Brisbane students protest university fee hikes"], ["example.com", "Angry protests over UQ student union election"], ] ], ['New York', 40.715520, -74.002036, "http://www.youtube.com/embed/JG0wmXyi-Mw", [ ["example.com" , "NY taxpayers’ risky Wall Street bet: Why the comptroller race matters"] ] ], ['To The Skies', 47.09399, 15.40548, "http://www.youtube.com/embed/tfEjTgUmeWw", [ ["example.com","Battle for Kobane intensifies as Islamic State uses car bombs, Syrian fighters execute captives"], ["example.com","Jihadists take heavy losses in battle for Syria's Kobane"] ] ], ['Fallujah', 33.101509, 44.047308, "http://www.youtube.com/embed/V2EOMzZsTrE", [ ["example.com","Video captures family cat saving California boy from dog attack"], ["example.com","Fines of £20,000 for dogs that chase the postman"] ] ] ]; A for loop which goes through each element in tubeArray then assigns id to the first index. Also an image that calls the function myFunctionId which takes the parameter this.id. fo…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41554985
has comment: http://stackoverflow.com/comment/41554965
has comment: http://stackoverflow.com/comment/41554876
has answer: http://stackoverflow.com/a/26457431
accepted answer: http://stackoverflow.com/a/26457431
score: -1
type: Question
downvote count: 2
has comment: http://stackoverflow.com/comment/41554892
upvote count: 1
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41554909
has comment: http://stackoverflow.com/comment/41554890
tagged with: http://stackoverflow.com/tag/html
has title: Change content of a div based on an array within an array
tagged with: css

http://stackoverflow.com/comment/41445146
type: QuestionComment
has text: May be you can find your answer here http://stackoverflow.com/questions/5671550/jquery-window-send-to-editor
score: 1
comment on: http://stackoverflow.com/q/26396840
type: Comment

http://stackoverflow.com/q/26358667
has comment: http://stackoverflow.com/comment/41375652
has comment: http://stackoverflow.com/comment/41375617
has comment: http://stackoverflow.com/comment/41382294
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41375650
has body: I've just created my first web app for the company I'm currently working for, explaining to the none creatives in the company what the "design team" as we are known (despite having developers) do. http://staging.catalysis.co.uk/designteam/ I've been learning to code for about 4 months and took it upon myself to design and create this all on my own, it's been tough but finally today there is something workable enough to upload to our servers. However I'm experiencing a few bits of buggy behaviour that I've been unable to diagnose. I have a feeling it's because of my lack of knowledge on best practice structuring in JS, but the animations that are non-css (I used GSAP) for the opening and closing of the "info" pages are appearing incredibly slow on mobile. This is the logic I'm using to display the info for each iteration of the cards: var info = $('.info'); info.click(function(){ var gp = $(this).parent().parent(), gpInfoBG2 = gp.parent().siblings(".info-bg-close"), gpInfoBG = gp.parent().siblings(".info-bg"); if ($(this).is('.first')) { gp.css({"display": "none"}); backgroundIn(gp.siblings(".infotext-one"), gpInfoBG, gpInfoBG2); gp.siblings(".infotext-one").addClass('open'); } else if ($(this).is('.second')) { gp.css({"display": "none"}); backgroundIn(gp.siblings(".infotext-two"), gpInfoBG, gpInfoBG2); gp.siblings(".infotext-two").addClass('open'); } else if ($(this).is('.third')) { gp.css({"display": "none"}); backgroundIn(gp.siblings(".infotext-three"), gpInfoBG, gpInfoBG2); gp.siblings(".infotext-three").addClass('open'); } else if ($(this).is('.fourth')) { gp.css({"display": "none"}); backgroundIn(gp.siblings(".infotext-four"), gpInfoBG, gpInfoBG2); gp.siblings(".infotext-four").addClass('open'); } }); function backgroundIn(elemObject, infoBG, infoBG2) { var tl = new TimelineMax({onComplete:showText}), button = infoBG.siblings('.button-container'), line1 = button.children('.line-one'), line2 = button.children('.line-two'); tl.fromTo(infoBG2, .3, {height: "0"}, {…
score: 0
has answer: http://stackoverflow.com/a/26358989
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26358788
has title: Animations incredibly slow on mobile
tagged with: mobile
accepted answer: http://stackoverflow.com/a/26358989
has answer: http://stackoverflow.com/a/26358788
tagged with: javascript
tagged with: jquery
tagged with: gsap

http://stackoverflow.com/a/26509857
answers question: http://stackoverflow.com/q/26509716
has comment: http://stackoverflow.com/comment/41650230
score: 0
type: Answer
has body: Does vm.PlanCode exist in your $scope? Have you tried replacing it with a simple name like "planCode" and adding $scope.planCode = ''; to your $scope? Just to see if it makes a difference? It would be helpful to see your model / scope.

http://stackoverflow.com/a/26403976
has body: You can try to use the Visibility API to just start the WS connection if the page is visible. The Page Visibility API lets you know when a webpage is visible or in focus. With tabbed browsing, there is a reasonable chance that any given webpage is in the background and thus not visible to the user. The API is particularly useful for saving resources by giving developers the opportunity to not perform unnecessary tasks when the webpage is not visible. Use cases A few examples: A site has an image carousel that shouldn't advance to the next slide unless the user is viewing the page. An application showing a dashboard of information doesn't want to poll the server for updates when the page isn't visible. A page wants to detect when it is being prerendered so it can keep accurate count of page views. It would be something like: if(document.hidden === undefined || !document.hidden){ // start WS connection } document.addEventListener("visibilityChange", function(){ if( !webSocketStarted &amp;&amp; (document.hidden !== undefined &amp;&amp; !document.hidden){ // start WS connection } }, false); Read the doc, and give it a try.
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26400630
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26400630

http://stackoverflow.com/q/26479994
has body: I would like to implement it in a way where when the user has visited my page for the first time. They will have a pop up appearing like a forum message " Hi , you've just visited our forum " So when the second time the same user visit , the pop up will disappear . Here's my code I'm working on : var beenherecookie = 'FE44been644'; var beenherebegin = document.cookie.indexOf(beenherecookie); if (beenherebegin &gt; -1){ //Want to implement the code of when user enter first time , "style="display:none;" else{ function setTimeout("style="display:block;", 60000 * 10); ; //set to 1000 X number of desired delay seconds. So 2 minutes (120 seconds) is 120 X 1000 = 120000 WriteCookie("FE44been644","yes");} Here's my HTML code for the style:: style="javascript:meh(the function of the style which changes)" So here's the situation : When the user visit the website for the first time, The javascript function meh would be style="display:none" If the user has entered the website previously The javascript function meh would be style="display:block" I need some favors thanks in advance
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Javascript style type
has answer: http://stackoverflow.com/a/26480176
type: UnansweredQuestion
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26480146

http://stackoverflow.com/comment/41389711
type: Comment
has text: Please post a complete code example.
comment on: http://stackoverflow.com/q/26366119
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41609368
type: Comment
has text: thats correct. Array is the param for [setData](http://api.highcharts.com/highstock#Series--setData)
comment on: http://stackoverflow.com/q/26484137
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41595971
type: Comment
type: QuestionComment
has text: hi all, could you please help me to solve this problem? thank you
score: 0
comment on: http://stackoverflow.com/q/26459240

http://stackoverflow.com/q/26414675
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/26415082
tagged with: javascript
has answer: http://stackoverflow.com/a/28765889
answer count: 3
score: 3
has title: Grunt build breaks SVG images
tagged with: yeoman
favorite count: 0
has body: So I have redeveloped my portfolio website using Yeoman with the Yeoman webapp generator. It’s built using Twitter Bootstrap and Sass. Everything works fine except when I use the “grunt build” command to compress my website. When my website is recreated in the “dist” folder I noticed that most of the xml embedded SVG icons on my html pages are broken. I did a comparison with my website in the “app” folder and the SVG code is different. How do I stop grunt from compressing the SVG or how would I change it so that it does not break the SVG icons? My Gruntfile.js // Generated on 2014-10-14 using // generator-webapp 0.5.0 'use strict'; // # Globbing // for performance reasons we're only matching one level down: // 'test/spec/{,*/}*.js' // If you want to recursively match all subfolders, use: // 'test/spec/**/*.js' module.exports = function (grunt) { // Time how long tasks take. Can help when optimizing build times require('time-grunt')(grunt); // Load grunt tasks automatically require('load-grunt-tasks')(grunt); // Configurable paths var config = { app: 'app', dist: 'dist' }; // Define the configuration for all the tasks grunt.initConfig({ // Project settings config: config, // Watches files for changes and runs tasks based on the changed files watch: { bower: { files: ['bower.json'], tasks: ['wiredep'] }, js: { files: ['&lt;%= config.app %&gt;/scripts/{,*/}*.js'], tasks: ['jshint'], options: { livereload: true } }, jstest: { files: ['test/spec/{,*/}*.js'], tasks: ['test:watch'] }, gruntfile: { files: ['Gruntfile.js'] }, sass: { files: ['&lt;%= config.app %&gt;/styles/{,*/}*.{scss,sass}'], tasks: ['sass:server', 'autoprefixer'] }, styles: { files: ['&lt;%= config.app %&gt;/styles/{,*/}*.css'], tasks: ['newer:copy:styles', 'autoprefixer'] }, livereload: { options: { livereload: '&lt;%= connect.options.livereload %&gt;' }, files: [ '&lt;%= config.app %&gt;/{,*/}*.html', '.tmp/styles/{,*/}*.css', '&lt;%= config.app %&gt;/images/{,*/}*' ] } }, // The actual grunt server set…
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/28510313
tagged with: gruntjs

http://stackoverflow.com/comment/41585013
type: QuestionComment
has text: http://jsfiddle.net/5xah6383/
comment on: http://stackoverflow.com/q/26473811
score: 0
type: Comment

http://stackoverflow.com/q/26468928
has comment: http://stackoverflow.com/comment/41575529
has comment: http://stackoverflow.com/comment/41575677
accepted answer: http://stackoverflow.com/a/26469220
has comment: http://stackoverflow.com/comment/41575605
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5117127
possible better answer: http://stackoverflow.com/a/26469444
has answer: http://stackoverflow.com/a/26469444
type: Question
linked to: http://stackoverflow.com/q/26019658
tagged with: javascript
has body: This is more of a syntax question, but I couldn't quite google it properly. Say I have 2 variables: classHours = 127; currentNumber = 3; How would I NAME a variable based off these numbers? So let's say I wanted a variable named classHours + "pop_up" + currentNumber How would I go about that?
has answer: http://stackoverflow.com/a/26469220
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41575669
has title: Javascript variable name based off other variables
tagged with: jquery

http://stackoverflow.com/comment/41655713
type: QuestionComment
type: Comment
score: 0
has text: You probably don't need to jump though these hoops -- it's safe to just pass undefined in to the second parameter. `stripe.customers.create(data, accessToken, function() { ... })`
comment on: http://stackoverflow.com/q/26512711

http://stackoverflow.com/q/26400463
has comment: http://stackoverflow.com/comment/41451342
has title: JSON and HTML without Array
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26400693
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26400693
has body: I have my JSON file and it is just an object not any array. {"name":"Autogen Program","start":"2014-05-04","end":"2014-10-12","status":"Completed"} I am trying to assign value from JSON into HTML but I am unable to do so $(function() { $.getJSON('http://localhost:8080/GChartServlet/data1.json', function(statusDataSet) { $.each(statusDataSet, function(i) { var color; switch(i.status) { case "In Progress": color = "yellow"; break; case "Pending" : color = "red"; break; case "Completed" : color = "green"; break; } if(i.name=="Autogen Program") { $("#stat1").append(i.status).css('background-color', color); } }); }); HTML Code :-- &lt;tr&gt; &lt;form action="status1.asp"&gt; &lt;td&gt; &lt;textarea readonly style="overflow:hidden" id="stat1" cols="12" rows="1" autofocus &gt; &lt;/textarea&gt; &lt;/td&gt; &lt;/form&gt; Can you please help me with same or suggest me where I am going wrong ? Regards,
has answer: http://stackoverflow.com/a/26401196
answer count: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26401196
favorite count: 0

http://stackoverflow.com/q/26476513
tagged with: coffeescript
type: Question
answer count: 2
score: 5
has comment: http://stackoverflow.com/comment/41591552
has body: I am working on a Node.js addon that needs to wrap the objects from a C library in C++ so they can be accessed from client-side JavaScript (written in CoffeeScript). The C++ module compiles, but when I try to run it through Node.js JavaScript, the C library fails to be called with a symbol lookup error that I'm having problems debugging. The error is below: node: symbol lookup error: /var/lib/cloud9/ledscape-wrapper/wrapper/build/Release/wrapper.node: undefined symbol: ledscape_init wrapper.node is the compiled package, ledscape_init is the function in the library I am trying to call. I've tried to trace the code and find the relevant snippets across multiple files. I've dropped lines I've deemed extraneous. # "AllFade.coffee" @ledscape = require "./ledscape.js" @frames[1] = @ledscape.LedscapeInit() # "Ledscape.coffee" wrapper = require "./build/Release/wrapper" module.exports = wrapper wrapper.cc extern "C" { #include &lt;ledscape.h&gt; } #include &lt;node.h&gt; #include &lt;v8.h&gt; #include &lt;node_object_wrap.h&gt; #include "LedscapeWrapper.h" Handle&lt;Value&gt; LedscapeInit(const Arguments&amp; args) { HandleScope scope; return scope.Close(LedscapeWrapper::NewInstance(args)); } void InitAll(Handle&lt;Object&gt; exports, Handle&lt;Object&gt; module) { LedscapeWrapper::Init(module); NODE_SET_METHOD(exports, "LedscapeInit", LedscapeInit); } NODE_MODULE(wrapper, InitAll) LedscapeWrapper.h extern "C" { #include &lt;ledscape.h&gt; } #include &lt;node.h&gt; #include &lt;node_object_wrap.h&gt; using namespace v8; class LedscapeWrapper : public node::ObjectWrap { public: static void Init(v8::Handle&lt;v8::Object&gt; exports); static Handle&lt;Value&gt; NewInstance(const Arguments&amp; args); inline ledscape_t* value() const { return value_; } private: explicit LedscapeWrapper(ledscape_t* value = ledscape_init(1)); ~LedscapeWrapper(); static Handle&lt;Value&gt; New(const Arguments&amp; args); static v8::Persistent&lt;v8::Function&gt; constructor; ledscape_t* value_; };…
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/c
has answer: http://stackoverflow.com/a/75475758
has comment: http://stackoverflow.com/comment/41590757
linked to: http://stackoverflow.com/q/949862
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41590593
has title: Getting "Symbol Lookup Error" when calling C library from C++ (Node.js Addon)
has answer: http://stackoverflow.com/a/70885028
tagged with: node.js
tagged with: c++
has comment: http://stackoverflow.com/comment/41734977
upvote count: 5

http://stackoverflow.com/comment/41375897
type: QuestionComment
type: Comment
has text: The body is not scrolling, it is at position top 0, check with inspect element to see where is the position of the body and check it's height :) You are seeing the scrollTop of the body only in chrome, check with other browsers :)
score: 1
comment on: http://stackoverflow.com/q/26357072

http://stackoverflow.com/a/26394852
has body: Logging out or even better, writing out the returned values by hand and looking at one statement at a time helps you simplify the problem. var hidden = mystery(3); mystery(3) returns the function: function mystery2 ( multiplier ) { multiplier *= input; //notice input is 5 return secret * multiplier; // and secret is 4 } Note that input and secret in this case will always be constant. This is not always the case though. Normally the reason why closure is used is to encapsulate variables in a private environment and the closure functions provide a way for non-local function to "reach" into the private scope. Those variables are not garbage collected after the function has finished executing because the returned functions still have access to them. Those function can still change the value of the variables inside the function even after the function has already ended. var jumble = mystery3(hidden); mystery3(hidden) returns the function: function mystery4 ( bonus ){ return param(6) + bonus; //param(6), which points to mystery2 above, // is just 6*5*4 = 120 } var result = jumble(2); Well, jumble(2), which "is" mystery4 above, is just 120 + 2 thus 122.
answers question: http://stackoverflow.com/q/26394736
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26394736

http://stackoverflow.com/comment/41402265
has text: Fine, take my Karma :)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26372471

http://stackoverflow.com/q/26474612
tagged with: sequelize.js
has title: Sequelize setter does not work
tagged with: node.js
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26480946
type: Question
tagged with: javascript
has body: I desperately try to call a simple setter method which seems to not exist. Here is my modeldefinition: var Process = Sequelize.MySql.define('Process',{ name: Sequelize.STRING, description: Sequelize.TEXT, duration: Sequelize.BIGINT, status: { type: Sequelize.ENUM(pstatus.unassigned,pstatus.assigned,pstatus.inprocess,pstatus.stopped,pstatus.finished), defaultValue: pstatus.unassigned, set: function(v){ console.log('Prozess status updated') if(!pstatus.hasOwnProperty(v)){ return } this.setDataValue('status',v) } } } Every call of process.setStatus(pStatus.inprocess) returns in a TypeError Possibly unhandled TypeError: Object [object SequelizeInstance] has no method 'setStatus' What am I missing here?
answer count: 1
accepted answer: http://stackoverflow.com/a/26480946

http://stackoverflow.com/a/26549017
type: AcceptedAnswer
has body: Ok I finally nailed it. It seems Firefox doesn't like having &lt; br > as the last childnode of any parent. If you append an empty textnode to every trailing &lt; br >, it works! Firefox will not move the caret after a &lt; br > if it's the last childNode.
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26456991
answers question: http://stackoverflow.com/q/26456991
score: 4
has comment: http://stackoverflow.com/comment/116334787

http://stackoverflow.com/q/26424137
has body: What happens is, when you click on Img2, it does the animation, but afterwards Img3 just snaps to the left of Img1! I don't know why. $(document).ready(function() { $(document).on('click', '.left', function() { $idr = $('.right').attr("id") $idl = $('.left').attr("id") $idt = $('.top').attr("id") $('#' + $idl).animate({ 'margin-top': '0', 'width': '500' }, 650, function() { $('#' + $idl).removeClass('left').addClass('top') }) $('#' + $idt).animate({ 'margin-left': '253', 'margin-top': '358', 'width': '247' }, 650, function() { $('#' + $idt).removeClass('top').addClass('right') }) $('#' + $idr).animate({ 'margin-left': '0' }, 650, function() { $('#' + $idr).removeClass('right').addClass('left') }) }) }) #img1 { position: absolute; width: 500px; height: auto; } .left, .right { position: absolute; height: auto; margin-top: 1px; cursor: pointer; } #img2 { margin-top: 358px; width: 247px; } #img3 { margin-top: 358px; margin-left: 253px; width: 247px; } #slider { width: 504px; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="slider"&gt; &lt;img id="img1" class="top" draggable="false" src="http://s9.postimg.org/ygz34rwv3/pr1.jpg"&gt; &lt;img id="img2" class="left" draggable="false" src="http://s9.postimg.org/c2heoju3j/pr2.jpg"&gt; &lt;img id="img3" class="right" draggable="false" src="http://s9.postimg.org/rch9vqplr/pr3.jpg"&gt; &lt;/div&gt;
downvote count: 1
score: 2
upvote count: 3
has answer: http://stackoverflow.com/a/26424304
has title: jQuery - picture snaps to wrong place
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26424480
type: UnansweredQuestion

http://stackoverflow.com/comment/41572698
comment on: http://stackoverflow.com/a/26467442
type: Comment
type: AnswerComment
has text: @ПечальныйМир you mean like `[0, [11]]`? check my addition on the answer
score: 0

http://stackoverflow.com/a/26475289
has comment: http://stackoverflow.com/comment/41588208
has body: You have a margin-left:-170px set on it right now. So to center your video, include .entry-content .jetpack-video-wrapper { margin-left:0; } in style.css.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41587909
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26475117

http://stackoverflow.com/a/26741756
type: Answer
has body: You can use this MEBN I think Angular is better than Backbone, personally I use mean.io, but... Good points Backbone can be integrated with many third-party template engines, the default choice is Underscore templates. Since Underscore is a Backbone dependency and you already have it on your page, you can easily take advantage of its templating engine without adding any additional dependencies for your application. On the downside, the templating engine of Underscore is very basic and you usually have to throw javascript into the mix, as you can see in our example: Backbone is lightweight, fast and has a small memory footprint. The learning curve is very linear, and there are only a few simple concepts to grasp (Models/Collections, Views, Routes). It has great documentation, the code is simple and heavily documented, and there is even an annotated version of the code which explains how it works in detail. You can actually go over the entire source code of the framework and get familiar with it in less than an hour. Being so small and basic, Backbone can be a good foundation to build your own framework upon. Some examples of 3rd party frameworks based on Backbone are Aura, Backbone UI, Chaplin, Geppetto, Marionette, LayoutManager, Thorax, Vertebrae. With Angular and Ember you usually have to live with the choices made by the authors of the frameworks, which may or may not suit your project needs and personal style. Angular 2.0 promises to change it, by comprising small independent modules, so you will be able to pick and mix. We are yet to see if they will be able to deliver this. Pain Points Backbone does not provide structure. It rather provides some basic tools you can use to create structure, leaving it up to the developer to decide how to structure his application, and there are also many blanks to fill. Things such as memory management have to be carefully considered. The lack of view lifecycle management makes route/state changes prone to memory leaks unless y…
answers question: http://stackoverflow.com/q/26402846
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44139340
score: 0
has comment: http://stackoverflow.com/comment/68801236
has comment: http://stackoverflow.com/comment/42096407

http://stackoverflow.com/a/26405684
type: Answer
has body: You've got yourself stuck in a loop. When you fire the action: $("#formTest").submit(); You are not submitting the form because you are calling your own function which prevents the default action: $('#formTest').submit(function(e) { e.preventDefault(); //do stuff }); If you want to use the code you have currently you can do 1 of 2 things: use one() on the submit function so it only fires once. This would require you to rebind on a reset or cancel $('#formTest').one('submit', function(e) { e.preventDefault(); //do stuff }); Or unbind the submit function just before your forced submission. $('#formTest').on('submit', function(e) { e.preventDefault(); $("#accept").click(function(e) { $('#formTest').unbind('submit'); $('#formTest').submit(); }); }); However, I would go a different way, and take the submit button out of the visible markup on the page. Just put an a tag in the form that you fire the open-modal function from upon click. Then you don't need to do any submission in your code, you just have the standard submit and reset buttons in the modal and they carry out their default behavior: The markup: Submit Confirm? Test Cancel Accept And the code: $('a.open-modal').on('click', function(e) { e.preventDefault(); $('.modal').fadeIn(); }); Much simpler. Hope this helps.
answers question: http://stackoverflow.com/q/26377271
accepted answer of: http://stackoverflow.com/q/26377271
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/26411441
score: 0
answers question: http://stackoverflow.com/q/26411350
type: Answer
has body: You would just use the key/value option in the ng-repeat. So it would look something like this: &lt;div ng-repeat="name, detail in league"&gt; You then just reference it by using {{name}}. More info in the docs for ng-repeat page.

http://stackoverflow.com/q/26478240
upvote count: 1
has title: How to append to Head or Body Using Javascript?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26478358
has body: I have a JavaScript problem. I searched on google how to append using javascript and I found an example. I want to manually append a script tag to head or body, but the example just appends in the head. I edited the example so that the script tag can be appended in the head or body, but the code doesn't work. Can anyone help me fix my problem? And please show me the demo on jsfiddle :D Thanks :) Here my script: //JS //Defined with loadjscssfile("yourcssurl.js", "js", "head"); or addCss("yourcssurl.js", "js", "body"); //CSS //Defined with loadjscssfile("yourcssurl.css", "css", "head"); or addCss("yourcssurl.css", "css", "body"); function loadjscssfile(filename, filetype, pos) { if (filetype == "js") { //if filename is a external JavaScript file var fileref = document.createElement('script') fileref.setAttribute("type", "text/javascript") fileref.setAttribute("src", filename) } else if (filetype == "css") { //if filename is an external CSS file var fileref = document.createElement("link") fileref.setAttribute("rel", "stylesheet") fileref.setAttribute("type", "text/css") fileref.setAttribute("href", filename) } if (typeof fileref == filetype) { document.getElementsByTagName(pos)[0].appendChild(fileref) } else if (typeof fileref != "undefined") { document.getElementsByTagName("head")[0].appendChild(fileref) } } loadjscssfile("myscript.js", "js", "body") //dynamically load and add this .js file loadjscssfile("javascript.php", "js", "body") //dynamically load "javascript.php" as a JavaScript file loadjscssfile("mystyle.css", "css", "body") ////dynamically load and add this .css file And here is the original script, before I edited: Dynamically loading an external JavaScript or CSS file Sorry for my bad english :)
accepted answer: http://stackoverflow.com/a/26478475
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26478475
type: Question
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/26478358

http://stackoverflow.com/comment/41701696
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26487403
type: Comment
has text: @soktinpk We use things like Bootbox for alerts in our projects, but there are times when it is not applicable, like when you need to warn user about unsaved data upon closing page. I can't imagine people running into trouble because of this behavior too often, yet still, a major behavior difference between the three big browsers is interesting.

http://stackoverflow.com/q/26379057
has answer: http://stackoverflow.com/a/26390034
downvote count: 0
tagged with: shopify
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 3
answer count: 1
has comment: http://stackoverflow.com/comment/41429209
tagged with: liquid
has comment: http://stackoverflow.com/comment/41429118
has comment: http://stackoverflow.com/comment/41429910
favorite count: 0
upvote count: 3
type: UnansweredQuestion
has title: Show product quantity in cart in products div with ajax
has comment: http://stackoverflow.com/comment/41429872
has comment: http://stackoverflow.com/comment/41433078
has body: I'm using the default Supply theme for my Shopify store and I've enabled Ajaxify Cart option. I've customised the theme so that if a customers add Product X to the cart, reloads and hovers over the product (on the collections page) it shows that Product X is added 1 time to the cart. This is the liquid code that shows the quantity of Product X in the cart: &lt;!-- Snippet from product-grid-item.liquid --&gt; {% assign count = 0 %} {% for item in cart.items %} {% if product.id == item.product.id %} {% assign count = count | plus: item.quantity %} {% endif %} {% endfor %} ... &lt;span class="item-quantity"&gt;{{ count }}&lt;/span&gt; If a product is in the cart .triangle-top-right gets added to div#in-cart-indicator, if it's not in the cart the class is not-in-cart. Here's a GIF illustrating what it currently looks like: ![enter image description here][1] Current situation: Add Product X to cart What happens: Cart count get's updated Reload the page What happens: The div containing Product X get's a blue triangle in the top right corner, indicating that Product X is in the cart When hovering over Product X, it shows the number of times Product X is in the cart. What I would like: Add Product X to cart What happens: Cart count get's updated The div containing Product X get's a blue triangle in the top right corner, indicating that Product X is in the cart When hovering over Product X, it shows the number of times Product X is in the cart. I've tried messing with the code in ajaxify.js, but my lack of javascript seems to break things. What could I try to accomplish this?
has comment: http://stackoverflow.com/comment/41439047
linked to: http://stackoverflow.com/q/26347107
type: Question

http://stackoverflow.com/comment/41392289
comment on: http://stackoverflow.com/a/26366732
has text: You've `div2here`, my snippet seems to have an inherited `id` from my testing code. I've fixed the issue.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26445629
has comment: http://stackoverflow.com/comment/41533922
accepted answer of: http://stackoverflow.com/q/26445592
has comment: http://stackoverflow.com/comment/41533892
has body: You have a typo, but it also looks like you are passing empty strings which aren't needed: $sql = "INSERT INTO projects (id, ProjectName, creatorOfProject, public, lastEdited, openId, deleted, parentfolder, favorite) VALUES (null, :ProjectName, :creatorOfProject, null, :lastEdited, :openId, null, :parentfolder, null)"; $query = $conn -&gt; prepare($sql); $query -&gt; execute(array( ":ProjectName" =&gt; $name, ":creatorOfProject" =&gt; $username, //":public" =&gt; '', // ^ Typo was there. ":lastEdited" =&gt; $date, ":openId" =&gt; $openId, ":deleted" =&gt; '', ":parentfolder" =&gt; $parentFolder, ":favorite" =&gt; '' )); I deleted the other empty strings from the array/placeholders you are using and replaced them with a null in the insert statement.
answers question: http://stackoverflow.com/q/26445592
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41533911
type: Answer

http://stackoverflow.com/a/26506425
answers question: http://stackoverflow.com/q/26504085
has body: It looks to me like there is code that tries to execute window.postMessage and this method does not exist in jsdom. This code tests whether window.postMessage can be called at all: var jsdom = require("jsdom"); var document = jsdom.env({ html: " ", features: { FetchExternalResources: ["script"], ProcessExternalResources: ["script"] }, done: function (errors, w) { console.log(errors); } }); Produces this output: [ { type: 'error', message: 'Running file:///tmp/t2/test.js:undefined:undefined failed.', data: { error: [TypeError: Object [object global] has no method 'postMessage'], filename: 'file:///tmp/t2/test.js:undefined:undefined ' } } ] I've also checked the code: $ npm install jsdom $ cd node_modules/jsdom $ grep postMessage `find . -type f` [no results]
type: Answer
score: 0

http://stackoverflow.com/comment/131315534
comment on: http://stackoverflow.com/a/65146267
has text: super clean solution. works great. thank you!!
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26362545
has title: Javascript or jQuery Plugin or trick to slide tab head
tagged with: tabs
tagged with: slide
tagged with: css
has answer: http://stackoverflow.com/a/26363064
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
has body: I have this tab : Is there any JS or jquery plugin or maybe just a trick to do action when the user click the arrow button on the right, the head (not the content) of the tab slide to the left, so hidden tab can be shown?
accepted answer: http://stackoverflow.com/a/26363064
score: 0
answer count: 1

http://stackoverflow.com/comment/41409888
type: Comment
comment on: http://stackoverflow.com/a/26376592
type: AnswerComment
has text: No luck. Still waits for the loop to complete. Im doing it in phonegap, webkit browsers.
score: 0

http://stackoverflow.com/q/26488205
tagged with: css
has comment: http://stackoverflow.com/comment/41610642
has comment: http://stackoverflow.com/comment/41610768
score: 0
has answer: http://stackoverflow.com/a/26488596
has comment: http://stackoverflow.com/comment/41610591
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26488490
has title: moving a button using css in javascript
type: Question
has body: I am trying to move a button with the id 'button' when different radio buttons are clicked, my following code is not working correctly whereby the button is firstly in the wrong position when 'notadmin' is selected and when 'yesadmin' is selected the button dissapears without a trace from my page. Here is my code: function showbroker() { var button = document.getElementById('button').style; if(document.getElementById('notadmin').checked == true) { document.getElementById('brokerarea').style.display = 'block'; button.position = "absolute"; button.left = "150px"; button.top = "400px"; } else if(document.getElementById('yesadmin').checked == true) { document.getElementById('brokerarea').style.display = 'none'; button.position = "absolute"; button.left = "150px"; button.top = "290px"; } }
has comment: http://stackoverflow.com/comment/41611376
answer count: 2
tagged with: positioning

lazy-loading
tags question: http://stackoverflow.com/q/26432198
tags question: http://stackoverflow.com/q/26468777
tag name: lazy-loading
type: Tag
tags question: http://stackoverflow.com/q/26451511
tags question: http://stackoverflow.com/q/26418088
tags question: http://stackoverflow.com/q/26405493
tags question: http://stackoverflow.com/q/26400423
tags question: http://stackoverflow.com/q/26477228

http://stackoverflow.com/comment/41389436
score: 1
has text: Actually what you're asking for is not more secure than transferring and evaluating javascript code. It IS transferring and evaluating JavaScript code albeit in a limited context. For something truly more secure you can combine @Sam's answer with a lookup table of different pre-defined functions to be called. For example you can send `{url: '...', processor: 'frobnicate'}` and validate that `frobnicate` is a valid processor then call it as your callback.
type: Comment
comment on: http://stackoverflow.com/q/26365757
type: QuestionComment

http://stackoverflow.com/comment/41499586
has text: @DoubleA if you care to take a look at the original question, before OP edited the plain JS out, you'll see why.
type: AnswerComment
comment on: http://stackoverflow.com/a/26377309
score: 0
type: Comment

http://stackoverflow.com/q/26406422
downvote count: 2
has answer: http://stackoverflow.com/a/26406670
upvote count: 1
has comment: http://stackoverflow.com/comment/41461600
has comment: http://stackoverflow.com/comment/41461900
tagged with: javascript
tagged with: jquery
has body: I am in the process of migrating an existing platform to a new server. I am taking the opportunity to upgrade PHP ect and standardise/debug the code as the previous maintainers have had different standards. I have opted for PHP version 5.4.33 for now, once I have managed to move everything over to mysqli I will look to go to a more recent version. I didnt think anything server side would make a difference to AJAX/JS? As far as I am aware is it not client side? Since I have moved the code over I am having issues with AJAX/JS. I am not the greatest at AJAX/JS and could use some assistance please. Even though every submit works differently through the entire platform I do not want to remove the AJAX/JS that already exists. I will most likely use it as an opportunity to how to use it as it makes end user experience smoother. Using Chrome to debug I am receiving the following error on clicking the Save button: Uncaught TypeError: Cannot set property 'display' of undefined email_user onclick This is the Save button code Loading... Please wait.. This is the function code for validate() function validate() { var errorString = ""; if(isBlank(document.getElementById("forename").value)) { errorString += " - Please input a forename\n"; } if(isBlank(document.getElementById("surname").value)) { errorString += " - Please input a surname\n"; } if(isBlank(document.getElementById("company_name").value)) { errorString += " - Please select a company\n"; } if(document.getElementById("username").value != "" || document.getElementById("password").value != "") { if(isBlank(document.getElementById("username").value)) { errorString += " - Please input a username\n"; } if(isBlank(document.getElementById("password").value)) { errorString += " - Please select a password\n"; } } //if not a solicitor then cases mandatory if(document.getElementById("company_role_type_id").value == 2) { if(document.getElementById("other_view_if").value == "") { errorString += " - Please select who can view your cas…
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26406670
type: AnsweredQuestion
favorite count: 0
possible better answer: http://stackoverflow.com/a/26406523
has comment: http://stackoverflow.com/comment/41462652
type: Question
has answer: http://stackoverflow.com/a/26406523
answer count: 2
has title: Uncaught TypeError: Cannot set property 'display' of undefined
has comment: http://stackoverflow.com/comment/41461607
tagged with: php
has comment: http://stackoverflow.com/comment/41461751
score: -1
has comment: http://stackoverflow.com/comment/41461614

http://stackoverflow.com/a/26413804
downvote count: 0
has body: You can place your code snippet in a function, then call that function when you need it: function evaluateHeight(){ var target = $('.height-wrapper').height(); $('.rightcolumn').height(target -2); var target2 = $('.height-wrapper2').height(); $('.rightcolumn2').height(target2 -2); } $(window).on('load', evaluateHeight); $element.click(evaluateHeight);
answers question: http://stackoverflow.com/q/26413776
type: Answer
has comment: http://stackoverflow.com/comment/41475652
has comment: http://stackoverflow.com/comment/41475660
has comment: http://stackoverflow.com/comment/41476350
upvote count: 1
has comment: http://stackoverflow.com/comment/41475751
has comment: http://stackoverflow.com/comment/41475882
score: 1

http://stackoverflow.com/comment/41630378
has text: Yes unfortunately I'm using other plugins with their own css which seems to lead to problems but I tried the overflow solution as the person above pointed out and it works.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26498777
type: Comment

http://stackoverflow.com/q/26475853
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/26476134
possible better answer: http://stackoverflow.com/a/26475993
has answer: http://stackoverflow.com/a/26475993
tagged with: http://stackoverflow.com/tag/html
has body: I have the following form fields: I want to grab the first child each time the button is pressed and append it to the bottom of the filename-url-container div without the values of the original cloned fields. I tried to get this to work but it's not appending correctly: $('#filename-url-container').on('click', '.btn-add', function (e) { e.preventDefault(); var formGroup= $('#filename-url-container :first-child'); $('#filename-url-container').append(formGroup); console.log(controlForm); });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26476134
type: Question
has answer: http://stackoverflow.com/a/26476053
tagged with: javascript
has title: Clone inline form fields and append to parent container
score: 0

http://stackoverflow.com/comment/41474401
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26374421
has text: Also try `PUBNUB.bind('unload,beforeunload'...` trying both **`unload`** and **`beforeunload`** events - an example found here - https://github.com/stephenlb/webrtc-sdk/blob/gh-pages/js/webrtc.js#L282

http://stackoverflow.com/q/26417751
tagged with: javascript
tagged with: partial-views
has body: I have a strongly typed with A model Partial view. Is it possible to pass the model data to an external JavaScript? My partial view temporary is like this: @model MyProject.Models.myModel &lt;script src=".../myScript.js"&gt;&lt;script&gt; &lt;span&gt; @Html.DisplayFor(model =&gt; model) //how do I pass data to myScript.js? &lt;/span&gt; In external JavaScript (myScript.js): $(document).ready(function () { //how do I get data from the partial view? })
linked to: http://stackoverflow.com/q/17776940
accepted answer: http://stackoverflow.com/a/26417845
has title: How to pass model data from partial view to JavaScript?
favorite count: 0
upvote count: 2
tagged with: model-view-controller
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26417845
score: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/41554081
type: Comment
score: 0
type: QuestionComment
has text: Hello, I don't think Your answer is correct for my question. I need a text on image instead of cursor (but moving like cursor). But your answers got me on track and i Think http://stevenbenner.github.io/jquery-powertip/ is for me.
comment on: http://stackoverflow.com/q/26454227

http://stackoverflow.com/q/26402822
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26402978
type: Question
tagged with: css-tables
score: 0
answer count: 3
tagged with: javascript
tagged with: jquery
has title: How to prevent opening a new tab when I click the print button
has answer: http://stackoverflow.com/a/26403046
has body: I have created an application for printing an html table, the application is working fine, but the problem I am facing right now is that when I click the print option, a new tab with the data displayed in it is showing. How to prevent that tab opening and displaying? function printData() { var divToPrint = document.getElementById("printTable"); var divToPrint2 = $(divToPrint).clone().find('th:first, td:first-child').remove().end().prop('outerHTML'); newWin= window.open(""); var header = ' '; divToPrint2=header+divToPrint2; newWin.document.body.innerHTML = divToPrint2; newWin.document.head.innerHTML = header; newWin.print(); } $('button').on('click',function(){ printData(); }) Working Demo Can anyone please tell me some solution for this?
has answer: http://stackoverflow.com/a/26403036

http://stackoverflow.com/q/26423865
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I know alot has been written about this, but I feel I am close to solving the issue. I am trying to use a theme which has masonry installed, but now the client is asking for infinite scroll and this is causing me issues. Initially I was seeing errors in the console for both the masonry and infinite scroll plugins, now at least I am only seeing a masonry error. And it does look as though the infinite scroll function is calling subsequent pages of posts, it's just that Masonry is struggling to append them to the page in the right layout. I think it is something to do with my callback function, but worried I may also need to call an imagesLoaded function (this plugin is also called via the theme). I have a copy of the current theme here: http://kod-temp.tumblr.com/ The inline script looks like this: var $wall = $('#posts'); $(window).load(function () { // Grid $wall.masonry({ columnWidth: 84, itemSelector: '.post:visible' }); // infinite scroll $('#posts').infinitescroll({ navSelector : ".pagination", // selector for the paged navigation (it will be hidden) nextSelector : ".pagination a:first", // selector for the NEXT link (to page 2) itemSelector : "#posts .post" // selector for all items you'll retrieve }, // trigger Masonry as a callback function( newElements ) { var $newElems = $( newElements ); $wall.masonry( 'appended', $newElems ); } ); The markup follows a simple block like this: &lt;div id="posts"&gt; &lt;article class="post"&gt;&lt;/div&gt; &lt;/div&gt; The error is: Uncaught TypeError: undefined is not a function masonry.js:10 (http://static.tumblr.com/qlf79cn/tGeleg9g0/masonry.js)
tagged with: infinite-scroll
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/21511005
has title: Masonry plugin returning error when used with Infinite Scroll in tumblr
type: Question
has answer: http://stackoverflow.com/a/27484603
tagged with: masonry

http://stackoverflow.com/comment/41614225
type: QuestionComment
comment on: http://stackoverflow.com/q/26488952
score: 0
has text: @Lodder sure. thanks for your help! Its here http://fonag.org.ec/inicio/material-didadico.html clicking on that lightbulp (bottom left) is supposed to open a lightbox as well as clicking on the vertical written text on the right side.
type: Comment

http://stackoverflow.com/comment/41573746
score: 0
type: QuestionComment
has text: Shouldn't you be including
type: Comment
comment on: http://stackoverflow.com/q/26450551

http://stackoverflow.com/comment/41490111
has text: Try to $broadcast event and catch it in directive
score: 2
comment on: http://stackoverflow.com/q/26422296
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41457310
comment on: http://stackoverflow.com/a/26403532
type: Comment
has text: This is my controller not my app.js and the app.js includes already the ui.router
score: 0
type: AnswerComment

http://stackoverflow.com/q/26498460
tagged with: google-maps-api-3
type: Question
favorite count: 0
score: -1
has title: Why does google maps API not load on firefox?
tagged with: angularjs
linked to: http://stackoverflow.com/q/6660955
answer count: 1
downvote count: 1
has body: I'm using the v3 of Google Maps API. My map loads and everything works fine in Safari and Chrome, but in Firefox i get the error "google.maps.Map is not a constructor". In Chrome or Safari when i enter 'google.maps' in the console I get an complex object with lots of stuff inside of it(including google.maps.Map) but in Firefox i get a much less complete object with only an empty modules object, and a 'gjsload' and a Load function. I've read that there are issues with firefox and google maps, but it was not fixed when i updated Firefox. Does anyone know how i can get the API to load in Firefox?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26539407
tagged with: google-maps
upvote count: 0
tagged with: firefox
tagged with: javascript

http://stackoverflow.com/comment/41636558
comment on: http://stackoverflow.com/q/26502310
score: 0
type: Comment
type: QuestionComment
has text: The same thing happens in decimal if you multiply 1/3 by 3 -- you get .99999... rather than 1. What don't you understand about finite precision?

modal-dialog
tags question: http://stackoverflow.com/q/26394016
tag name: modal-dialog
tags question: http://stackoverflow.com/q/26489487
type: Tag
tags question: http://stackoverflow.com/q/26388128
tags question: http://stackoverflow.com/q/26497275
tags question: http://stackoverflow.com/q/26487403
tags question: http://stackoverflow.com/q/26476142
tags question: http://stackoverflow.com/q/26510486
tags question: http://stackoverflow.com/q/26361601
tags question: http://stackoverflow.com/q/26472533

http://stackoverflow.com/q/26377108
has body: Let us assume we have a website and, for the sake of argument, that the back end is written in Java. Let us also assume that we would like to capture clickstream data for users on our website. We would like to track various things, for example: IP Access time Referral User Agent etc. Another assumption is that we have a clickstream web-service somewhere with REST interface and that it simply saves the information we deliver to it to the database. Now, from my, limited knowledge about this stuff, point of view, I see 2 issues. How to ensure that clickstream data is captured and not avoided by user? How to make your clickstream service portable? At the moment, I'm seeing 2 ways of implementing clickstream, but both have some flaws. Use Javascript to send clickstream data, making it portable so you can hook it to any website without changing the backend code. The only changes that should be made are in HTML (and those are minor ones) Have a HTML page with &lt;body onload="captureAndSendClickStreamData();"&gt;...&lt;/body&gt; where captureAndSendClickStreamData() is a function in your Clickstream.js you included. Obviously, this approach offers easy portability, right? However, what if the user disables JS? In essence, he's blocking the clickstream service you worked so hard on. You handle capturing clickstream data in some ClickStreamServletFilter class. The obvious advantage is that the end user has no knowledge of it, and can't really disable it. However, to extend some other site with your clickstream service, you need to mess up with the back end, which is even more messy if the website you're trying to enhance is not written, in this case, in Java. So, my final questions are: Are there any other not-so-obvious (dis)advantages to the approaches mentioned? Are there any other viable approaches? How do big guns, like Google, Facebook, Amazon, handle this? Thank you for your time :)
favorite count: 0
answer count: 0
tagged with: data-collection
has comment: http://stackoverflow.com/comment/71442608
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/41409950
score: 3
tagged with: java
has comment: http://stackoverflow.com/comment/41409833
has comment: http://stackoverflow.com/comment/41409802
has comment: http://stackoverflow.com/comment/41410172
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41409728
tagged with: javascript
has comment: http://stackoverflow.com/comment/41410234
tagged with: clickstream
has title: What is the standard way to implement a clickstream today?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26370665
tagged with: css-transitions
has title: How can I add a transition for this growing div?
has comment: http://stackoverflow.com/comment/41399746
tagged with: transition
has comment: http://stackoverflow.com/comment/41398797
type: Question
has comment: http://stackoverflow.com/comment/41398543
has comment: http://stackoverflow.com/comment/41398661
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41398843
answer count: 3
has answer: http://stackoverflow.com/a/26371238
tagged with: css
accepted answer: http://stackoverflow.com/a/26371238
has comment: http://stackoverflow.com/comment/41398813
has answer: http://stackoverflow.com/a/26371102
has body: I am trying to add transition to a growing div. Here is a jsfiddle: http://jsfiddle.net/fL5rLr2y/ This jsfiddle represent my real world problem. I have the following markup: &lt;div class="container"&gt; &lt;div class="inner"&gt; &lt;/div&gt; &lt;/div&gt; And the following css: html, body { height: 100%; } .container { position: relative; height: 80%; background-color: blue; } .inner { position: absolute; top: 30px; left: 0; right: 0; height: 50px; background-color: red; } .inner.open { height: initial; bottom: 20px; } Here is my js: $('.inner').click(function() { $(this).toggleClass('open'); }); I am trying to add the transition using pure css. How can I do it? If pure css solution is not possible, how can I use js in order to solve it? UPDATE After a lot of investigations, it seems that using calc is the only option to do it in pure css. Unfortunately I have bed experience with calc, especially with safari and mobile (browser crashes and other surprises). I prefer to avoid using calc for now and use javascript solution to simulate that. Any idea how?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26370850
has answer: http://stackoverflow.com/a/26370850

http://stackoverflow.com/q/26452932
score: 0
answer count: 1
tagged with: keyboard
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26453015
has body: Why onkeypress cannot detect Backspace keyboard ? first , fill xxxxxxxxxx into input type text and then press submit button you will see red text invalid email address and press backspace keyboard for delete some char in input type text, Why onkeypress not work on backspace keyboard ? http://jsfiddle.net/btetyLwb/1/ &lt;script&gt; function clear_email_valid_text() { $('#valid_email').hide(); $('#invalid_email').hide(); } function validateForm() { var newsletters_email = document.forms["form_validate_email_newsletters"]["newsletters_email"].value; var atpos = newsletters_email.indexOf("@"); var dotpos = newsletters_email.lastIndexOf("."); if (atpos&lt;1 || dotpos&lt;atpos+2 || dotpos+2&gt;=newsletters_email.length) { $('#valid_email').hide(); $('#invalid_email').show(); return false; } else { $('#valid_email').show(); $('#invalid_email').hide(); return false; } } &lt;/script&gt;
type: Question
has comment: http://stackoverflow.com/comment/41546870
has title: Why onkeypress cannot detect Backspace keyboard?
has comment: http://stackoverflow.com/comment/41546961
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41546906

lodash
tags question: http://stackoverflow.com/q/26485459
tag name: lodash
type: Tag
tags question: http://stackoverflow.com/q/26388343
tags question: http://stackoverflow.com/q/26393676
tags question: http://stackoverflow.com/q/26414172
tags question: http://stackoverflow.com/q/26496779

http://stackoverflow.com/a/26371540
answers question: http://stackoverflow.com/q/26371049
type: Answer
has body: Not possible. Facebook won't allow you to run any scripts within the news feed.
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26371049

http://stackoverflow.com/q/26401253
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/26402027
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41452688
has body: I have created static array as following below country["0"]=[USA]; sate[country[0][0]]=[["NewYork","NY"],["Ohio,"Oh"]] for (var i = 0; i &lt; sate[country[0][0]].length; i++) { var key = state[country[0][0]] [i][0]; var value = state[country[0][0]] [i][i+1]; } from above loop i am able to get the keys of state like NewYork and Ohio. Please help me how i will get the value of "NY" and "Oh"?
has answer: http://stackoverflow.com/a/26401378
has comment: http://stackoverflow.com/comment/41453107
type: Question
has title: How to get value of key from the array in java script
has answer: http://stackoverflow.com/a/26401505
score: 0
has comment: http://stackoverflow.com/comment/41452510
tagged with: arrays
has comment: http://stackoverflow.com/comment/41452556

http://stackoverflow.com/comment/41582319
has text: Array elements do not contains all tags that facebook add in my
type: Comment
comment on: http://stackoverflow.com/a/26472392
score: 0
type: AnswerComment

http://stackoverflow.com/q/26386354
tagged with: file
possible better answer: http://stackoverflow.com/a/26498023
has answer: http://stackoverflow.com/a/26498023
tagged with: concatenation
tagged with: file-transfer
upvote count: 9
downvote count: 0
has answer: http://stackoverflow.com/a/26633853
tagged with: javascript
type: AnsweredQuestion
has title: Merging multiple parts of a file in Cordova
favorite count: 0
has comment: http://stackoverflow.com/comment/41589583
tagged with: cordova
type: Question
score: 9
accepted answer: http://stackoverflow.com/a/26633853
answer count: 2
has comment: http://stackoverflow.com/comment/41606828
has body: Within my Cordova app, I am downloading arbitrary files like images or video files. This is done with the Cordova file-transfer plugin and the "Range" Header, because I need to download the files in parts. My Problem is, that I want to merge back the several small "Byte"-Files back together into the original file they once where to use that file. Every time I'm trying to read the resulting parts as binaryString via the FileReader and write them together in a new file, that file ends up a lot larger than the parts of the original file altogther and the resulting file is unusable. Any help is appreciated. Here is my code until now (long and ugly): document.addEventListener('deviceready', deviceready, false); var App; var finishedFileUrl = ""; var async = { sequence: function(items, callback) { var def = $.Deferred(), deferrers = [$.Deferred()]; for(var i = 0; i &lt; items.length; i++) { (function (n) { deferrers[n + 1] = $.Deferred(); deferrers[n].always(function() { callback(items[n], deferrers[n + 1]); }); })(i); } deferrers[items.length].always(function() { def.resolve(); }); deferrers[0].resolve(); return def.promise(); } } var aSmallImageArray = [ '' // Put URL to JPG accessible with Range Header Request here ]; var aByteSizeImageArray = []; function formatDownloadArray(fileSize) { for(var j = 1000; j &lt;= fileSize; j += 1000) { aByteSizeImageArray.push(j); } aByteSizeImageArray.push(j); } function deviceready() { console.log('dv ready'); function registerHandlers() { App = new DownloadApp(); formatDownloadArray(XXXXX); // XXXXX should be size of JPG in bytes document.getElementById("startDl").onclick = function() { var that = this; console.log("load button clicked"); var folderName = "testimagefolder"; // sequence call async.sequence(aByteSizeImageArray, function(currentBytes, iter) { var filePath = aSmallImageArray[0]; var fileName = aSmallImageArray[0].substr(52,99) + currentBytes; console.log(filePath); console.log(fileName); console.log("Starting with: " + …

http://stackoverflow.com/q/26402291
has comment: http://stackoverflow.com/comment/41454482
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/41454055
has answer: http://stackoverflow.com/a/26402406
has answer: http://stackoverflow.com/a/26404350
accepted answer: http://stackoverflow.com/a/26402347
score: -3
has comment: http://stackoverflow.com/comment/41453999
has title: find div where title equals something
has body: Subject : myDivTitle Issue : anotherDivTitle Ref : #53 I have this bit of code, and I want to use javascript to find the element where title equals myDivTitle $('#subjectissureref').find('div[title=myDivTitle]')
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26402347
has comment: http://stackoverflow.com/comment/41454750
type: Question
downvote count: 4
has comment: http://stackoverflow.com/comment/41454551
has answer: http://stackoverflow.com/a/26402425
possible better answer: http://stackoverflow.com/a/26402406
has comment: http://stackoverflow.com/comment/41457588
has comment: http://stackoverflow.com/comment/41453959
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41454616
has comment: http://stackoverflow.com/comment/41454330

http://stackoverflow.com/q/26490917
has comment: http://stackoverflow.com/comment/41618773
has comment: http://stackoverflow.com/comment/41617970
has comment: http://stackoverflow.com/comment/41617472
has comment: http://stackoverflow.com/comment/41682050
has body: what i have: 1) Static Image and many parts or you can say as component in the form of rectangle box ( around 25 rectangle box with text inside that box its a name). 2) I also have the coordinates of 25 rectangle box ( X1, Y1, X2, Y2) 3) 7 roles button ( front end) what i did till now: I could cut the part of the image and display it but its not looking good by using this: canvas_Context.drawImage(img,16,242,60,62,16,242,60,62); //Sodium canvas_Context.drawImage(img,934,362,76,49,934,362,76,49); //duke canvas_Context.drawImage(img,243,204,274,263,243,204,274,263); then show the cut part by: var dataUrl = canvas.toDataURL(); window.open(dataUrl, "toDataURL() image", "width=600, height=200"); Window.document.write(" This is 'myWindow' "); Here is my question: 1) when i click on 1 role the rectangle that does not belong to that role should not be appeared. 2) when i click on another role i need the component which belong to that role only. 3) I dont want the image to be cut only that part colour has to be changed that is not the role.
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41638824
has title: Html5 canvas image with part of image background by on button click
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41617334
has comment: http://stackoverflow.com/comment/41638982
score: 0
tagged with: canvas

http://stackoverflow.com/q/26358431
score: 0
tagged with: random
has title: Produce random options for multiple choice ques.(MCQ)
answer count: 1
has answer: http://stackoverflow.com/a/26358758
tagged with: logic
type: AnsweredQuestion
type: Question
tagged with: c#
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26358758
has body: I am trying to create a program which will create a 4 random options for given quetion, out of which one will be correct answer. Suppose the quetion is the addition of two numbers then options should be generated based on the correct answer. Eg: Suppose the question is 5+3=?, Here correct answer is 8. Now based on this program should generate the options out of which one will be necessarily a valid answer. The options should be generated randomly, each time the quetion is presented to the user. Following are the different probablities for the optins for 5+8: Probability 1: a. 5 b. 8 c. 4 d. 10 Probability 2: a. None of the above b. 7 c. 8 d. 11 Probability 3: a. 12 b. 9 c. 5 d. None of the above Probability 4: a. 7 b. 5 c. None of the above d. All of the above Probability 5: a. 8 b. 7 c. None of the above d. All of the above Now if suppose question is of type: 72 is divisible by___? Then the probabilities can be: Probability 6: a. 8 b. 6 c. None of the above d. All of the above Now I want to generate these options randomly based on above probabilities, moreover the wrong options should be near to original answer. What will be the best approach to achieve this. I am not axpecting the complete solution but just a approach to this problem. Any help will be greatly appreaciated.

http://stackoverflow.com/comment/41439923
score: 0
has text: so in your 'BAD' example, 0 means to hide it and 1 means to show the character?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26393471

http://stackoverflow.com/comment/41555518
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26457430
has text: I did not intend to alter the address because of the back button but I guess I do not have another choice. Thank you very much for your help!
score: 0

http://stackoverflow.com/q/26377271
tagged with: http://stackoverflow.com/tag/html
has body: I currently have a form. As per below. &lt;form action="/process" id="formTest" name="formTest" enctype="multipart/form-data" method="POST"&gt; &lt;input type="text"&gt; &lt;/form&gt; I added a modal to confirm on the submit. &lt;div class="modal fade" id="bondModal"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title"&gt;&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;p&gt;Test;&lt;/p&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;button type="button" id="accept" class="btn btn-primary"&gt;Accept&lt;/button&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- /.modal-content --&gt; Now if the user submit, the modal of confirmation will be showed, and if the user subsequently choose accept, it will proceed the submit. The problem is , the subsequent submit never works. $('#formTest').submit(function(e) { e.preventDefault(); $('#bondModal').modal('show'); $("#accept").click(function(e) { $("#formTest").submit(); e.preventDefault(); $('#bondModal').modal('hide'); } ); } }); The thing is if I change the code to reset instead of submit..it works for reset .. $('#formTest').trigger('reset');
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41410768
has title: using modal as submit confirmation
accepted answer: http://stackoverflow.com/a/26405684
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41410020
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26377309
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41410821
possible better answer: http://stackoverflow.com/a/26377309
has comment: http://stackoverflow.com/comment/41410001
has answer: http://stackoverflow.com/a/26405684
score: 0

http://stackoverflow.com/a/26484669
type: AcceptedAnswer
downvote count: 0
score: 4
has body: As I mentioned in the comments, why not check for duplicates earlier? A simple example: var colors = []; $('*').each(function(i, el){ var $element = $(el), color = $element.css('background-color'); if(!~$.inArray(color, colors)) colors.push(color); }); console.log(colors); http://jsfiddle.net/sL9oeywk/
type: Answer
has comment: http://stackoverflow.com/comment/41604209
has comment: http://stackoverflow.com/comment/41604254
accepted answer of: http://stackoverflow.com/q/26484554
upvote count: 4
answers question: http://stackoverflow.com/q/26484554

http://stackoverflow.com/q/26423205
tagged with: php
type: AnsweredQuestion
upvote count: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/26423426
has comment: http://stackoverflow.com/comment/41491953
tagged with: yii
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26423426
has title: How to remove element array "[" & "]" in json?
answer count: 1
downvote count: 1
has body: I already possessed variable JSON encoded, then there are elements in the json array like "[" and "]". the question is? how to remove the element. This is an example of the json before changing [{ "form": { "user_id": "1", "form_id": 26, "form_name": "KireniuS", "form_description": "afafasf", "form_json": [{ "id": 72043, "name": "EditText", "input_type": "text", "hint": "", "options": "" }, { "id": "409289", "name": "Ini Spinner", "input_type": "spinner", "hint": "ini saya ro", "options": "Saya, dan Dia" }], "created_at": "17-10-2014_16:49", "created_by": "adminweb", "last_updated_at": "17-10-2014_16:49" } }] PHP: $jadi_json = array(); foreach($model as $row) { $json_converter = json_decode($row-&gt;json_form); $saya = array( "form"=&gt;array( "user_id"=&gt;$row-&gt;id_user, "form_id"=&gt;$row-&gt;id_form, "form_name"=&gt;$row-&gt;form_name, "form_description"=&gt;$row-&gt;form_description, "form_json"=&gt;$json_converter-&gt;form_json, "created_at"=&gt;$row-&gt;created_at, "created_by"=&gt;$row-&gt;created_by, "last_updated_at"=&gt;$row-&gt;last_updated_at )); array_push($jadi_json, $saya); } header('Content-Type: application/json'); echo json_encode($jadi_json); json format desired { "form": { "user_id": "1", "form_id": 26, "form_name": "KireniuS", "form_description": "afafasf", "form_json": [{ "id": 72043, "name": "EditText", "input_type": "text", "hint": "", "options": "" }, { "id": "409289", "name": "Ini Spinner", "input_type": "spinner", "hint": "ini saya ro", "options": "Saya, dan Dia" }], "created_at": "17-10-2014_16:49", "created_by": "adminweb", "last_updated_at": "17-10-2014_16:49" } } element arrays "[" and "]" are omitted only superficially.
favorite count: 0
has comment: http://stackoverflow.com/comment/41491781

http://stackoverflow.com/comment/41582011
type: QuestionComment
type: Comment
score: 0
has text: Why are you sending your Highcharts options to the server via AJAX? Highcharts is a client-side plotting library, what's your server going to do with the config?
comment on: http://stackoverflow.com/q/26472001

http://stackoverflow.com/comment/41494339
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26378813
has text: See the question: I am trying to develop an application where it allows the user to choose a file and then read it and display the text on the screen.

http://stackoverflow.com/a/26429192
downvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41503692
has comment: http://stackoverflow.com/comment/41774206
has comment: http://stackoverflow.com/comment/41505103
type: Answer
has body: first of all you have to create the total variable outside of your for loop then initialize it to zero var total = 0; for (var i=0; i &lt; allVals.length; i++) { allVals[i] = parseInt(allVals[i],10); total += allVals[i]; console.log(total); } Second Because you are adding a number to an uninitialized variable you are getting a NaN result for example var c; c +=1; //this will be NaN(not a numeric number) the reason is that when you initialize a variable JavaScript knows the right data type that should be given to that variable
upvote count: 0
answers question: http://stackoverflow.com/q/26429054
accepted answer of: http://stackoverflow.com/q/26429054
score: -2

http://stackoverflow.com/comment/41556426
type: AnswerComment
has text: How to I turn it back into a hash table?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26457952

http://stackoverflow.com/comment/41524634
has text: To pass arguments you can use `.bind` like `getDiff.bind(this, param1, param2, param3)`.
type: Comment
comment on: http://stackoverflow.com/a/26440576
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41613700
comment on: http://stackoverflow.com/q/26489829
has text: add your loading jquery script tags to your ` `
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26506482
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41643950
has answer: http://stackoverflow.com/a/26506846
tagged with: jquery
has title: Can't set a variable in javascript while using autocomplete
has comment: http://stackoverflow.com/comment/41644394
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26506846
has body: This is my current code: var areaid; $( "#FindCentre" ).autocomplete({ //Doesn't give the right value here. source: "databasescripts/findcentre.php?AreaID=" + areaid, minLength: 2, select: function( event, ui ) { }, html: true, }); $( "#FindArea" ).autocomplete({ source: "databasescripts/findarea.php", minLength: 2, select: function( event, ui ) { areaid = ui.item.id; alert(areaid); //Alerts the correct value here. }, html: true, }); When users type into FindArea it alerts the correct value, however when they then type into FindCentre it will always come back as being undefined. I've tried reading the ID from FindArea in FindCentre but I can't seem to do that either. Does anyone have any suggestions?
type: Question
tagged with: jquery-ui-autocomplete

http://stackoverflow.com/q/26437977
has answer: http://stackoverflow.com/a/26438262
has body: I have an category drop down list that i write blow code in it's onchange event: function onChange() { $.ajax( { url: '/Home/GetProducts/', type: 'POST', data: JSON.stringify({ID:$("#Category").val()}), //contentType:"application/json; charset=utf-8", dataType: "json", success: function (data){ var jsonres = ""; $.each(data, function (i, variant) { jsonres += '&amp;lt;option value="' + variant.ID + '"&gt;' + variant.Name+ '&amp;lt;/option&gt;'; }); $("#product").html(jsonres); } , error: function () { alert('Error'); } }); } and my Action method is : [HttpPost] public ActionResult GetProducts(int? ID) { var res = _teacherUow.GetProducts(ID.GetValueOrDefault()).Select(x =&gt; new { x.ID, x.Name }).ToList(); return Json(new { Result = true, data = res }, JsonRequestBehavior.AllowGet); } my view code: @Html.DropDownList("Category", new SelectList(ViewBag.Category, "ID", "Name"), new { id = "Category", onchange = "onChange()" }) &amp;lt;select data-val="true" id="product" name="product"&gt; &amp;lt;/select&gt; Now i have three problem 1-in the action method parameter receive null the json result is : {"Result":true,"data":[{"ID":1,"Name":"xxx"},{"ID":3,"Name":"yyyy"}]} 2- but the value and text of product drop down list member is 'undefined' 3- create empty dropdown list for product field with html helper(for fill data member by Ajax request) can anyone please help me?
tagged with: asp.net-mvc
tagged with: javascript
score: 3
downvote count: 0
answer count: 1
has title: how to post simple ID (jquery ajax) to Action method in asp.net mvc
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26438262
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41520160
type: AnsweredQuestion
upvote count: 3
type: Question

http://stackoverflow.com/comment/41614789
type: AnswerComment
score: 0
type: Comment
has text: Yeah that just makes the whole image faded.
comment on: http://stackoverflow.com/a/26490173

http://stackoverflow.com/comment/41565452
comment on: http://stackoverflow.com/q/26460613
score: 0
type: Comment
type: QuestionComment
has text: Maybe the following answer will be of interest to you as well: http://stackoverflow.com/a/16063711/1641941

http://stackoverflow.com/comment/41628921
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26498022
type: AnswerComment
has text: @SteveK - Your IIFE only creates a singleton, but I just added an IIFE that makes a traditional constructor which can then be called as many times as you want (and they all share access to the same private data). IIFEs are very flexible and can be used in many ways. Your particular example was only creating a singleton, but that is just one of many ways to use an IIFE.

slick.js
tag name: slick.js
type: Tag
tags question: http://stackoverflow.com/q/26469067
tags question: http://stackoverflow.com/q/26494699

http://stackoverflow.com/comment/41415567
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26380360
has text: how is the other hover handler added
score: 0

http://stackoverflow.com/q/26460369
possible better answer: http://stackoverflow.com/a/31071809
accepted answer: http://stackoverflow.com/a/39931930
has body: since the last iOS Update (8+), the Safari "destroys" a jQuery script I use for my mobile navigations. The mark up is a normal unordered list, generated from Contao. Now, when I open my page on iOS 8+, the script loads normally, I can open my navigation without a problem, but as soon as I scroll down a bit, it just closes my menu - not even with the toggle slide animation, it just disappears. My Markup: ... My jQuery: function hideDiv(){ if ($(window).width() > 941) { $(".main-menu .level_1").show(); } else { $(".main-menu .level_1").hide(); } } $(document).ready(function(){ hideDiv(); console.log('logging'); $('.header .nav-btn').click(function () { $('.main-menu .level_1').stop(true,true).slideToggle(); $('.nav-btn').toggleClass( "open" ); }); $(window).resize(function(){ hideDiv(); $('.nav-btn').removeClass("open"); }); }); Does anyone use a similar script and/or can tell me why it's closing my menu? I also created a JSFiddle. http://jsfiddle.net/940293vw/1/ I read an article about how they changed the scroll event in iOS8, but that didn't go further into the detail about why they should just stop my script when scrolling. Any help is appreciated!
has comment: http://stackoverflow.com/comment/41560480
type: AnsweredQuestion
tagged with: scroll
has answer: http://stackoverflow.com/a/39931930
type: Question
answer count: 2
tagged with: ios8
has answer: http://stackoverflow.com/a/31071809
tagged with: javascript
tagged with: jquery
score: 0
has title: New iOS and Safari remove classes added via script in jQuery on scroll
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41612734
has text: It's not meant to be condescending, it was meant as a headsup. If i was trying to be condescending, i wouldn't actually tell you what the problem is, just tell you where to find it.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26489210
score: 1

http://stackoverflow.com/comment/41657353
has text: Done with indentation :)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26513548
score: 0

http://stackoverflow.com/q/26457316
accepted answer: http://stackoverflow.com/a/37734784
has body: The Dropbox Chooser and Saver tools seem very cool for these two tasks: Let the user pick a file from their Dropbox, and the page can download it (i.e., Dropbox-to-client). Let the user choose a destination in their Dropbox to which to save a file sitting at some URL on a server (i.e., server-to-Dropbox). That's asymmetrical. This StackOverflow question asks if it's possible to send a file to Dropbox Saver directly from the client. (This is especially handy if one is writing a client-side-only app, wanting Dropbox to stand in for the server.) A comment in one answer says that the Core API or Sync API can do so. But it would be a shame to introduce those more complex APIs if not needed; Chooser and Saver are delightfully easy-to-use. Furthermore, it's not clear to me whether the UI provided by the Saver would still be available in that case. My question: What's the easiest way to save a file from the client (e.g., from data in a createObjectURL URL) into the user's Dropbox, still using the Saver UI if possible? (By "easiest" I mean brief, easy-to-read-and-maintain code.) Specific JavaScript code would be ideal.
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/24925988
has comment: http://stackoverflow.com/comment/41591290
tagged with: dropbox-api
has title: Can Dropbox Saver accept data from createObjectURL()?
has comment: http://stackoverflow.com/comment/43989701
has comment: http://stackoverflow.com/comment/41585289
has answer: http://stackoverflow.com/a/37734784
has comment: http://stackoverflow.com/comment/54662871
upvote count: 3
tagged with: file
type: Question
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/53719255

http://stackoverflow.com/q/26440859
has answer: http://stackoverflow.com/a/26441526
duplicate of: http://stackoverflow.com/q/5234749
has answer: http://stackoverflow.com/a/26440928
has answer: http://stackoverflow.com/a/26441023
linked to: http://stackoverflow.com/q/5234749
type: Question
has comment: http://stackoverflow.com/comment/41525148
linked to: http://stackoverflow.com/q/7465560
score: 0
has body: I have about 10 or more objects, with same width but different height. I want to put them like the below image, to fully cover the page. Here is what i've done but it doesn't work: http://jsfiddle.net/mhmdshv/e0xvcgnw/ HTML: ... ... ... ... ... ... ... CSS: body{padding:25px;} #book{text-align:center;outline:5px solid aqua;} .book{ display:inline-block; border:1px dotted silver;background-color:pink;margin:9px;text-align:center; } There is a gap between objects that don't have same height... i want it to be gone. Any ideas? Thanks!
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26440991
has title: how to vertically align HTML object to cover page
answer count: 4

http://stackoverflow.com/comment/41526146
comment on: http://stackoverflow.com/q/26441507
has text: var myInterval = setInterval(function(){},delay_in_ms);
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/26414125
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/26415662
tagged with: asp.net
favorite count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26415610
accepted answer: http://stackoverflow.com/a/26542439
has title: asp.net bootstrap alert auto close
type: AnsweredQuestion
score: 3
linked to: http://stackoverflow.com/q/23101966
possible better answer: http://stackoverflow.com/a/26415610
tagged with: alert
upvote count: 3
type: Question
has body: I have this panel on my .aspx webform page to display messages (success, failed, exception etc.) after button postback events . I also included some Jquery library on this page as well. &lt;asp:Panel ID="InfoPanel" runat="server" class="alert alert-success alert-dismissable" Visible="False"&gt; &lt;button type="button" class="close" data-dismiss="alert" aria-hidden="true"&gt;&lt;/button&gt; &lt;i class="fa-lg fa fa-bullhorn"&gt;&lt;/i&gt; &lt;asp:Label ID="lblMessage" runat="server" Text=""&gt;&lt;/asp:Label&gt; &lt;/asp:Panel&gt; It will look like this: (lblMessage will display the text at code-behind) How do I make it to be auto-close after 5s, I have zero knowledge about JS and jQuery but if you show me how it work I can apply it to my program (lol) Note: I see this question right here: Bootstrap Alert Auto Close the selected answer was: $("#success-alert").fadeTo(2000, 500).slideUp(500, function(){ $("#success-alert").alert('close'); }); But I am confused, how do I make it work?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26542439

http://stackoverflow.com/comment/41656590
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26511897
has text: Sorry, without the rest of the HTML (and quite possibly the CSS), it will be difficult to address the missing background at the bottom.

http://stackoverflow.com/a/26475177
has comment: http://stackoverflow.com/comment/41620506
has comment: http://stackoverflow.com/comment/41589861
upvote count: 2
has comment: http://stackoverflow.com/comment/41588994
has comment: http://stackoverflow.com/comment/41618996
has comment: http://stackoverflow.com/comment/41616875
has comment: http://stackoverflow.com/comment/41611395
answers question: http://stackoverflow.com/q/26474953
has comment: http://stackoverflow.com/comment/41619596
type: Answer
has body: Try this: function yourtheme_enqueue_scripts() { wp_register_script( 'js_name', get_template_directory_uri() . '/myfile.js', array( 'jquery' ), '1.0', true ); wp_register_script( 'js_name_2', get_template_directory_uri() . '/myfile2.js', array( 'jquery' ), '1.0', true ); wp_register_script( 'js_name_3', get_template_directory_uri() . '/myfile3.js', array( 'jquery' ), '1.0', true ); if ( is_front_page() ) { wp_enqueue_script( 'js_name' ); wp_enqueue_script( 'js_name_2' ); wp_enqueue_script( 'js_name_3' ); } } add_action( 'wp_enqueue_scripts', 'yourtheme_enqueue_scripts' ); In your themes root folder (same folder as functions.php), create new file called myfile.js. This is the file you refer to in the function above. As you theme grows in size, it's better to organise your files. You can do this by creating subfolders, like this: Create a folder named assets (name could be anything); Inside assets create three new folders called js, css and images; Put your files in the right folders; Update your function to follow the right path to your folders; e.g. wp_register_script( 'js_name', get_template_directory_uri() . '/assets/js/myfile.js', array( 'jquery' ), '1.0', true ); Note: You don't have to close ?&gt; in your functions.php.
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41619317

http://stackoverflow.com/a/26386050
upvote count: 1
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41426048
has comment: http://stackoverflow.com/comment/41426035
type: Answer
answers question: http://stackoverflow.com/q/26386029
has body: You should use setZoom method instead: this.gMap.setZoom(count++); And you need to save reference to this and remove bind's: var self = this, plusZoom = document.getElementsByClassName('icon-plus-sign')[0], // ... and then self.gMap.setZoom(count++); It will work then.

http://stackoverflow.com/comment/41398911
has text: Yes it returns the exact same error as the code I'm using right now.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26370808

http://stackoverflow.com/q/26418777
upvote count: 9
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: Question
score: 9
tagged with: d3.js
tagged with: php
has answer: http://stackoverflow.com/a/26419079
has body: hi this maybe very easy for you guys i just need to draw a vertical line that represents the current date in my d3 gantt chart. i already figure out the values for my y i just having trouble in the value in my X because im using a time.scale in my x-axis. ill paste the codes that draws my gantt chart and the part where i draw my vertical line is located at the very bottom initTimeDomain(tasks); initAxis(); var numFormat = d3.format(",.0f"); var dateFormat = d3.time.format("%Y-%b-%d"); var parseDate = d3.time.format("%Y-%b-%d").parse; var svg = d3.select("#gantt_chart") .append("svg") .attr("class", "chart") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("class", "gantt-chart") .attr("width", width + margin.left + margin.right) .attr("height", (height + margin.top + margin.bottom) / tasks[tasks.length - 1].endDate) .attr("transform", "translate(" + margin.left + ", " + margin.top + ")"); //this is the x-axis svg.append("g") .attr("class", "x axis") .attr("transform", "translate(0, " + (height - margin.top - margin.bottom) + ")") .transition() .call(xAxis) .selectAll("text") .style("text-anchor","end") //.attr("dx", 35) //.attr("dy", 5); .attr("dx", "-.8em") .attr("dy", -10) .attr("transform", function(d){return "rotate(-90)"}); //this is the y-axis svg.append("g").attr("class", "y axis").transition().call(yAxis); //this is the actual gantt svg.selectAll(".chart") .data(tasks, keyFunction).enter() .append("rect") .attr("rx", 0) .attr("ry", 0) .attr("class", function(d){ if(d.status &gt; 70) { return "bar-failed"; } else if (d.status &gt;= 51 &amp;&amp; d.status &lt;= 70){ return "bar-killed"; } else{ return "bar-running"; } }) .attr("y", 0) .attr("transform", rectTransform) .attr("height", function(d) { return y.rangeBand(); }) .attr("width", function(d) { return (x(d.endDate) - x(d.startDate)); }) .on("mouseover", function(d){ div.transition() .duration(200) .style("opacity", .9); div.html("H…
has title: Draw a vertical line representing the current date in d3 gantt chart
accepted answer: http://stackoverflow.com/a/26419079
answer count: 1

http://stackoverflow.com/a/26477545
upvote count: 1
has body: Why do you need to have these in quotes? The website in the form GET should be able to understand the form inputs you're sending to it without the quotes. If you really need to add quotes (or anything else to the form input), you can do it using jQuery. Something like $("form").submit(function(event) { $.get('domain.com', { name: ..., surname: ...}); event.preventDefault(); }); See: http://api.jquery.com/submit/ http://api.jquery.com/jquery.get/ EDIT: more info: I don't have enough reputation to comment, so I'll extend what the other commenter did here. He's almost right, except instead of "%22" you need to add the quotation character ("), and it'll encode it for you. The reason it adds %25 is that its actually encoding the percent (%) character! :D Modified from Beau Bouchard's answer: function (){ var abc = document.getElementById("ABC").value; document.getElementById("ABC").value = "\"" + abc + "\""; var dfg = document.getElementById("DFG").value; document.getElementById("DFG").value = "\"" + dfg + "\""; //changes input field value document.getElementById("formid").submit(); //submits the form }
has comment: http://stackoverflow.com/comment/41592124
has comment: http://stackoverflow.com/comment/41592149
type: Answer
answers question: http://stackoverflow.com/q/26477449
has comment: http://stackoverflow.com/comment/41654932
downvote count: 0
score: 1

http://stackoverflow.com/comment/41378053
has text: Why do you want to subscribe to load? If the directive is called the element is loaded
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26359238

http://stackoverflow.com/comment/41449760
comment on: http://stackoverflow.com/q/26399613
type: Comment
type: QuestionComment
has text: It's not quite clear what *"... the code should remain intact."* means.
score: 0

http://stackoverflow.com/comment/41515444
comment on: http://stackoverflow.com/q/26435343
type: QuestionComment
type: Comment
has text: Is your question how to achieve the alternating display in HTML? Is that what your question is really about because promises don't seem to have anything to do with that. Promises are one tool that can be used to help manage asynchronous operations.
score: 0

http://stackoverflow.com/a/26360947
has body: Change your patt to if you want to match only them, or add a ^ before \w which will negate the class. var patt = /^[\w(),.\s-]+$/g
has comment: http://stackoverflow.com/comment/41380225
has comment: http://stackoverflow.com/comment/41380447
type: Answer
has comment: http://stackoverflow.com/comment/41380056
has comment: http://stackoverflow.com/comment/41379954
has comment: http://stackoverflow.com/comment/41380137
has comment: http://stackoverflow.com/comment/41380109
has comment: http://stackoverflow.com/comment/41380262
score: 0
answers question: http://stackoverflow.com/q/26360842

http://stackoverflow.com/q/26412540
answer count: 1
score: 0
has body: I am working on Censiumjs, which is a javascript map library. I want to make a heatmap from json data and render it on the map. Currently my idea is to draw a heatmap on a hidden canvas using a heatmap javascript plugin, then save the canvas as an image file, and finally render the image on the map. However I found that I cannot draw on a hidden canvas. So I am wondering how I can draw an image underground and save it while loading the map? Thanks for your help!
tagged with: canvas
tagged with: cesiumjs
has comment: http://stackoverflow.com/comment/41473120
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has title: javascript: draw an image underground and save
has answer: http://stackoverflow.com/a/26412614
tagged with: http://stackoverflow.com/tag/html
type: Question

http://stackoverflow.com/comment/41578320
type: AnswerComment
comment on: http://stackoverflow.com/a/26470107
type: Comment
has text: Okay, this looks good but i can't tell if there is a difference between what you have and what i have...I'm doing the injection in an identical way, which is making this frustrating since i can't see why i should get that error!
score: 0

http://stackoverflow.com/a/69276133
type: Answer
answers question: http://stackoverflow.com/q/26485588
score: 1
upvote count: 1
downvote count: 0
has body: const nums = [1,2,3,3,3,5,5,5]; const chars = ['a','b','a','b','a','a']; const mixed = [1,3,'b',3,'b','a','b',3]; const unique = [1,'a',3]; const distinct = (arr) => arr.filter((el) => arr.filter((item) => item === el).length === 1); console.log(distinct(nums)); // [ 1, 2 ] console.log(distinct(chars)); // [] console.log(distinct(mixed)); // [ 1, 'a' ] console.log(distinct(unique)); // [ 1, 'a', 3 ] first, we'll double loop over "arr" with "filter" arr.filter((el) => arr.filter((item) => ... ); if "item" is equal to "el" then return its "length" arr.filter((el) => arr.filter((item) => item === el).length this will return the occurrence count for each element in the array let' use the 1st example to illustrate this: [1,2,3,3,3,5,5,5] --> [1,1,3,3,3,3,3,3] 1 occurred 1 time 2 occurred 1 time 3 occurred 3 time 5 occurred 3 time to return any element that is non-repeating or unique, we just need to specified length to equal "1" arr.filter((el) => arr.filter((item) => item === el).length === 1) this approach allows you to choose the amount of occurrences from an element you want to return for instance, if you you want to return an element that occurs 3 times from an array, then set the "length" to equal 3

http://stackoverflow.com/comment/41438407
score: 0
type: Comment
has text: @zerkms Is this not it? http://jsfiddle.net/ko987m0g/
type: QuestionComment
comment on: http://stackoverflow.com/q/26392657

http://stackoverflow.com/a/26544400
upvote count: 4
has body: I feel like this is a cheap workaround, but here's what I ended up doing: I used the polar chart from jqWidgets and with the series type set to "column" and the flip property switched to "true." I put the data in an array with 0 entries for each possible angle except for where I wanted the phasor displayed. Each phasor gets a dedicated series so the legend lists them all. It's not perfect and the array is much larger than it really should need to be, but it's passable. While it's not surprising that no power system display package is publicly available for Javascript, I'm sure one has to be out there for educational sites if nothing else.
downvote count: 0
answers question: http://stackoverflow.com/q/26501743
accepted answer of: http://stackoverflow.com/q/26501743
type: AcceptedAnswer
score: 4
type: Answer

http://stackoverflow.com/q/26443450
has answer: http://stackoverflow.com/a/26447339
has answer: http://stackoverflow.com/a/26446732
type: Question
has comment: http://stackoverflow.com/comment/41544130
has comment: http://stackoverflow.com/comment/41529787
tagged with: javascript
has comment: http://stackoverflow.com/comment/41535462
has comment: http://stackoverflow.com/comment/41529756
tagged with: random
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41531850
favorite count: 0
has comment: http://stackoverflow.com/comment/41544273
has comment: http://stackoverflow.com/comment/41535364
has title: How to get a number from a hash
type: UnansweredQuestion
has body: I'm trying to create random number between 0 and 1000000(1 million) in node.js. Hash is: var hash = crypto.createHmac('sha512', "value").update("another value").digest('hex'); //d89c8a02a8b4e2461eeddcc3d8e85f2dfdab62968a329840ec5df2c0be2852eb9321cb35ff8fd5f43e97857a618d35edf9ba7fff56319c56eae4f8509f02e7eb Random number var number = parseInt(hash.substring(0, 5), 16); // 887240 But sometimes I'm getting numbers bigger than 1 million, how can I prevent this?
has comment: http://stackoverflow.com/comment/41529827
tagged with: cryptography
tagged with: node.js
downvote count: 0
score: 1

http://stackoverflow.com/comment/41707769
has text: I have tried a solution on similar lines for creating a custom cache using ConcurrentDictionary, biggest challenge that I find is that it leads to a solution which cannot be scaled across servers in a Web Farm, if the application has to be hosted on a Web Farm. In fact this leads to a process specific solution. For future expansion and scalability Cache would be a better solution, Though the notification logic that you have created using SignalR is quite interesting
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26535279
type: Comment

crossfilter
tags question: http://stackoverflow.com/q/26387209
tag name: crossfilter
type: Tag
tags question: http://stackoverflow.com/q/26490286
tags question: http://stackoverflow.com/q/26433413

http://stackoverflow.com/a/26513284
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26512784
has body: 1.jpg is the wider image and 2.jgp is small onces Hey I just split the class items in your code and it worked.

http://stackoverflow.com/q/26421502
tagged with: javascript
score: 0
tagged with: sqlite
answer count: 1
tagged with: asynchronous
accepted answer: http://stackoverflow.com/a/26421658
has title: Javascript function doesn't returns query result (SQLitePlugin for Cordova)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26421658
tagged with: cordova
type: Question
has body: I need your help to create a SQLite class which allows send a query and returns the result. I know transaction / executesql are asynchronous and I am trying to resolve this problem. I wrote this code: function SQLite(pName){ this.result = null; //External function this.Query = function(pQueryStr) { this.result = null; execQuery(pQueryStr); //Waiting query result. While is null, sleep... while(this.result == null){null;} //This line doesn't work return this.result; } //Internal function for execute query function execQuery(pQueryStr) { //Emulating transacion-executesql functions with lag setTimeout(function(){ this.result = "my query result"; }, 3000); } } db = new SQLite("dbName"); var res = db.Query("query request string"); //As I can't wait for SQL result, 'res' returns null. alert("External result: " + res); This doesn't work but commenting 'while' line... this works adding this code to end. setTimeout(function(){ alert("External result (with lag): " + this.result); }, 5000); My problem: I need 'while'. This make function waits for query result is reported. Any solution or workaround? Thanks for your time!

http://stackoverflow.com/q/26389496
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41432647
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26389671
accepted answer: http://stackoverflow.com/a/26389671
has comment: http://stackoverflow.com/comment/41432410
has comment: http://stackoverflow.com/comment/41432759
upvote count: 1
has body: Is this at all possible? I would love a directive like ng-src that would have an option for a callback expression in the directive signature? I literally have zero ideas on how this would work; moreover hardly have a use case but I'm curious if it is at all possible?
type: Question
has comment: http://stackoverflow.com/comment/41432377
score: 1
tagged with: javascript
has title: A directive that Return a promise when an image has been fully rendered
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/41599333
type: AnswerComment
has text: very nice answer - I didn't have the time to explain the difference between `Function` and `eval` earlier.
comment on: http://stackoverflow.com/a/26481163
type: Comment
score: 0

http://stackoverflow.com/q/26422282
answer count: 0
score: 0
has title: Ajax not working for dynamic key in data parameter
type: Question
has comment: http://stackoverflow.com/comment/41493170
tagged with: javascript
tagged with: jquery
has body: I am trying to make a ajax function like this: var vm=$.noConflict(); vm(document).ready(function(){ var loadMore=function(e) { var idd=vm(this).attr("id"); alert(e.data.recordId); //it return blog_comment_id if I provide static value to data key var aaa=e.data.recordId; vm.ajax({ type:"POST", url:"ajaxHTML.php", data:({e.data.recordId: idd}), cache:false, success:function(res) { alert(res); vm("#"+e.data.divId).html(res); } }); } and calling this ajax function like this, Actually I am trying to make it dynamic where I will provide div id and record id. vm(function() { vm(".view_more").click({divId:"fgh",recordId:"blog_comment_id"},loadMore); }); it is not working If i provide data parameter like this: data:({e.data.recordId: idd}), working for data:({blog_comment_id: idd}), So how could I make it possible with dynamic key. Help will be appreciate
tagged with: ajax
has comment: http://stackoverflow.com/comment/41495696
type: UnansweredQuestion

http://stackoverflow.com/comment/41438405
type: Comment
type: QuestionComment
has text: Here is a jsfiddle that represents the problem: http://jsfiddle.net/jgr71o8t/4
score: 0
comment on: http://stackoverflow.com/q/26391639

http://stackoverflow.com/comment/41535390
type: Comment
has text: Does `../models/listing,` require `../collections/listings` by any chance?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26445828

http://stackoverflow.com/q/26395937
answer count: 1
tagged with: meteor
tagged with: mongodb-query
has title: How to get data from this objects num property using the name property as a selector
accepted answer: http://stackoverflow.com/a/26396265
score: 0
has comment: http://stackoverflow.com/comment/41444910
tagged with: object
type: AnsweredQuestion
has body: I am trying to find the value of the num property of this object using the name property to select the right object from the hashtagsl array; so I get the right num value. I need to do this knowing only what the name in the element and userid are. The end goal is variable equal to the value of num in the specific object. Here is the code creating the object to show the structure of it. Thanks in advanced. All code shown is server side. Meteor.users.update({"_id": this.userId},{"$push":{"profile.hashtagsl": {name: newhashtag, num: 1}}}) edit Here it is updating incing the num property. I need to get the value of num instead of updating it. Meteor.users.update({"_id": this.userId, "profile.hashtagsl.name":hashi},{"$inc":{"profile.hashtagsl.$.num":1}});
has comment: http://stackoverflow.com/comment/41444873
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/41444543
has answer: http://stackoverflow.com/a/26396265
tagged with: javascript
has comment: http://stackoverflow.com/comment/41444869
has comment: http://stackoverflow.com/comment/41444966

http://stackoverflow.com/comment/41565213
has text: It is a good way to set dynamic title on click on different links using Page.Title = "Demo" in code behind.
comment on: http://stackoverflow.com/a/26460284
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26378022
has comment: http://stackoverflow.com/comment/41415342
has comment: http://stackoverflow.com/comment/41418047
score: 1
has comment: http://stackoverflow.com/comment/41416046
has comment: http://stackoverflow.com/comment/41417853
downvote count: 0
answers question: http://stackoverflow.com/q/26377949
has comment: http://stackoverflow.com/comment/41414582
has body: You can hide option on the basis of their values. In your case, you are showing 1 if condition is true else hiding it. so try below code if(condition) $('select option[value=1]').show(); else $('select option[value=1]').hide();
has comment: http://stackoverflow.com/comment/41411488
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41415578

http://stackoverflow.com/comment/41522867
score: 0
has text: No, it's triggered by the Shopify theme. The complete code for `ajaxifyShopify` can be found on line 261 [here](http://cdn.shopify.com/s/files/1/0656/8697/t/7/assets/ajaxify.js?9594). Every time a new page loads, `ajaxifyShopify` get's initialized by the theme to ajaxify the shop.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26438825

http://stackoverflow.com/a/26457529
upvote count: 1
has body: 'It doesn't appear documented anywhere, but its access_token not accessToken. Here's my example: app.get('/auth/google/callback', function (req, res, next) { passport.authenticate('google', function (err, user, info) { request.get("https://www.google.com/m8/feeds/contacts/default/full?v=3.0&amp;access_token=" + user.accessToken, function (error, result) { var xml = result.body; var parseString = require('xml2js').parseString; parseString(xml, function (err, result) { var entries = result.feed.entry, contacts = []; _.each(entries, function (entry) { if (!(entry['gd:name']===undefined)) { var gdName = entry['gd:name'][0]['gd:fullName'][0]; var gdEmail = entry['gd:email'][0]['$']['address']; contacts.push({name: gdName, email: gdEmail}); } }); res.send(contacts); }); }); })(req, res, next) });
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26454579
answers question: http://stackoverflow.com/q/26454579
score: 1

http://stackoverflow.com/comment/41687746
score: 0
comment on: http://stackoverflow.com/q/26512658
type: QuestionComment
type: Comment
has text: Actually , the answers submitted by folks here meets my requirement. But what if I am trying to load this url from each element and the param passed each time is different one and I want to highlight the tab(url) that got loaded. The code given here does not seem to work for that. I want to addClass to li which points to a URL

http://stackoverflow.com/q/26434135
upvote count: 1
favorite count: 0
tagged with: hoisting
type: UnansweredQuestion
has title: JavaScript multiple alert promt
has answer: http://stackoverflow.com/a/26434163
downvote count: 0
score: 1
type: Question
answer count: 2
tagged with: javascript
has body: I have read about javascript function hoisitng. But in this case, i did not understood how anonymous functions are getting hoisted var myObj = { name: 'MyName', dob: 10, office: 'MyOffice', myFun: function(){ alert("Anonymous function"); }, showItem: function(){ alert("Name : " + this.name + " office : " + this.office); } }; alert(myObj.showItem()); If i run the code, two alert messages prompts. One shows the name, office and other undefined.
has answer: http://stackoverflow.com/a/26434165

http://stackoverflow.com/a/26401816
has body: underscore.js is an Javascript utility library and not meant for DOM manipulation. I tested your code and its working fine. Here is the fiddle containing both Jquery and underscore library. No dot &lt;div class="info"&gt;...&lt;/div&gt; $(".info:contains('...')").css("display", "none");
type: Answer
answers question: http://stackoverflow.com/q/26399766
score: 0

http://stackoverflow.com/comment/41448495
type: Comment
has text: Dear B-and-P, i tried print_r($_POST["data"]); and that is giving error... :(
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26398507

http://stackoverflow.com/comment/41577863
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26467602
has text: Yes, I got the data into response. but then it doesn't work res.send(response); I think it is because of for (i=0 ; i < articlesId.length; i++){ Extract_Tags.findById(articlesId[i], function (err, tags) { if (!err) { tagsArray.push(tags); console.log(tags); callback(null, tagsArray); } else { callback(err); } }); }

http://stackoverflow.com/comment/41499160
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26427076
type: AnswerComment
has text: I encourage people to use "AJAX". Read my answer more carefully.

http://stackoverflow.com/comment/41614998
type: Comment
comment on: http://stackoverflow.com/a/26490105
score: 0
type: AnswerComment
has text: My problem is how can I catch when someone change the url in browser's addressbar manually.

http://stackoverflow.com/q/26368287
has title: Backbone: adding model from one collection to another
has body: Here is the general structure I have right now: Collection 'A' which has view 'A' to add a model, you can open a modal and choose from a list. The modal is it's own view, 'B', tied to its own collection, 'B'. the view 'B' is instantiated from view 'A' on a click event. I was going to initialize view 'B' with a 'myParent' attribute so when a model is selected from collection b, I can say this from within view B: this.myParent.collection.add(newModel). I know this will work, but is this coupling things too tight that don't need to be? is there a good pattern for this? I was thinking about having several different events and triggers spread about different places but that seems to just complicate things without much added value.
type: Question
tagged with: backbone.js-collections
tagged with: javascript
has answer: http://stackoverflow.com/a/26372046
score: 0
answer count: 1
tagged with: backbone.js
tagged with: backbone-events
type: UnansweredQuestion

http://stackoverflow.com/q/26429425
favorite count: 0
tagged with: angularjs
has title: Filtering based on properties of objects within array using $filter
type: AnsweredQuestion
score: 1
has body: Assuming the following data: var roster = [ { id: 1, attended: true, person: {printName: 'Larry'}}, { id: 2, attended: false, person: {printName: 'Curly'}}, { id: 3, attended: true, person: {printName: 'Moe'}}]; I am trying to find the count of objects in the array where attended is true. I have tried the following: rosters.html: {{ (roster | filter:{attended:true} ).length }} rosters-controller.js: checkedInCount: function() { return $filter('filter')($scope.roster, attended.true).length; } The html filter works as expected, returning 2 in this instance. However, the function version encounters the error ReferenceError: Can't find variable: attended. I assume that there is something trivial that I've missed in the function, but I am not sure what it is.
type: Question
accepted answer: http://stackoverflow.com/a/26429557
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/26429557
has comment: http://stackoverflow.com/comment/41504137
tagged with: angularjs-filter
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41671288
has comment: http://stackoverflow.com/comment/41503917

http://stackoverflow.com/comment/41525065
has text: I updated my question as I think I was not clear enough on what I try to accomplish. Both your solutions worked, both not for what I need though. Thanks anyway mate!!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26410679
type: Comment

http://stackoverflow.com/comment/41596666
comment on: http://stackoverflow.com/a/26479608
score: 0
type: Comment
has text: I haven't been able to fix it yet. There is no error or anything in the console. I will tell you when i find it.
type: AnswerComment

http://stackoverflow.com/a/26481865
score: 1
answers question: http://stackoverflow.com/q/26481545
downvote count: 0
has body: Let's say you want to Show/Hide div with id="page2" Then corresponding jQuery should be like: $("#selectmenu").change(function () { $("#page2").fadeOut(); if ($(this).val() == "option1") { $("#page2").fadeIn(); } });
type: Answer
upvote count: 1

http://stackoverflow.com/a/26514435
upvote count: 3
has body: It's not a React bug, it's just more of a limitation of the html tags. So how React updates the DOM is that it essentially converts all floating text nodes to tags with a specific reactid, and when a state/prop gets changed, it can easily find those items to reconcile and update if needed. The problem here is that tags cannot contain any other tags. It's invalid HTML and it just doesn't work. Hence the problem is that you're wanting to create a virtual DOM structure like this: Add a filterType When the state updates, React want to simply look for the span id just containing the state and update it. But instead, your browser creates something like this: Add a filterType When React goes to update, it's looking at that and wondering where the went (since it just wants to change the filterState). Instead it finds nothing, and throws an error. How to solve it? The easiest way is just prefixing your state with an "Add a " like this in your render: {"Add a " + this.state.filterType}
score: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26488089
has comment: http://stackoverflow.com/comment/62300429
accepted answer of: http://stackoverflow.com/q/26488089
type: Answer

http://stackoverflow.com/q/26506560
has answer: http://stackoverflow.com/a/26511011
type: AnsweredQuestion
has title: Working with UTC Dates in Javascript and MongoDB
tagged with: java
accepted answer: http://stackoverflow.com/a/26511011
tagged with: date
has body: I am having a problem correctly working with UTC-Dates and wondered if there is a common way of dealing with this. Basically I have a javascript datepicker where I can select a date. For example: 2014-10-15 When this gets converted to a string with JSON.stringify() I end up with: 2014-10-14T22:00:00+0200 I am assuming that this is correct because the date gets converted to a UTC date. When the date then arrives at my java (jersey) REST interface it looks like the following: 2014-10-14T22:00:00.000Z The date appears to be the same, but the +0200 is no longer there. Possibly causing the problem. The next step is to save the date to my mongo database, which then stores the date like this: 2014-10-14 20:00:00.000Z Another 2 hours have been taken off and I am assuming that this is because the date is being converted to UTC "again". The problem I have now is that if I reload the page, my input field now says: 2014-10-14 instead of 2014-10-15. If I manually change the date in the database and add the 2 hours again to end up with "2014-10-14T22:00:00.000Z", the date is displayed correctly in the frontend again - the date is now correctly represented as local time because 2 hours on top of 2014-10-14T22:00:00.000Z makes 2014-10-15 again. My question is: Where do I need to make my change to prevent this from happening? a) I only use local time in the frontend, so that mongodb then only converts to UTC. This does not sound very safe to me as I am sure this will cause problems when the client is being called from different time-zones. b) I only work with UTC dates, but I then need to somehow tell mongodb that the date is already in UTC and therefore there is no need to convert it again. Any help would be greatly appreciated. Thanks, Michael EDIT I think I may be a step further now. I can tell the json deserializer what date-format can be expected. I have configured this to: new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") If I test the date format manually I end up with SimpleDat…
type: Question
tagged with: mongodb
score: 2
downvote count: 0
tagged with: javascript
answer count: 1
has comment: http://stackoverflow.com/comment/41648155
tagged with: momentjs
favorite count: 0
has comment: http://stackoverflow.com/comment/41647242
upvote count: 2

http://stackoverflow.com/q/26369674
type: Question
accepted answer: http://stackoverflow.com/a/26369939
has comment: http://stackoverflow.com/comment/41396757
has comment: http://stackoverflow.com/comment/41396623
possible better answer: http://stackoverflow.com/a/26369784
has comment: http://stackoverflow.com/comment/41397334
has comment: http://stackoverflow.com/comment/41396574
has comment: http://stackoverflow.com/comment/41397439
has answer: http://stackoverflow.com/a/26369784
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41396796
linked to: http://stackoverflow.com/q/4429744
has answer: http://stackoverflow.com/a/26369791
tagged with: post
upvote count: 4
linked to: http://stackoverflow.com/q/17696579
has comment: http://stackoverflow.com/comment/41396583
has comment: http://stackoverflow.com/comment/41396731
downvote count: 0
has answer: http://stackoverflow.com/a/26369853
favorite count: 0
has title: Post JSON data without ajax or form
tagged with: ajax
has comment: http://stackoverflow.com/comment/41396849
has answer: http://stackoverflow.com/a/26369939
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41397368
tagged with: http://stackoverflow.com/tag/json
has body: I have a json object that I would like to post. I beleive that Im close but the data isnt getting sent correctly. data is correctly formatted json string and it works correctly with ajax. However, the page needs to be redirected according to the REST api im requesting. Obviously using ajax, this wouldn't happen. var data = JSON.stringify(myJsonObject); $('&lt;form enctype="application/json" action="/projects" method="POST"&gt;' + '&lt;input type="hidden" name="json" value="' + data + '"&gt;' + '&lt;/form&gt;').submit();

http://stackoverflow.com/comment/41409693
has text: with this demo you move the box, and I want resize effect... since right bottom to left top.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26377114

http://stackoverflow.com/comment/41423105
type: QuestionComment
comment on: http://stackoverflow.com/q/26382984
score: 0
has text: Not enough info. Do you mean Adobe Digital Pulse? js console? some other sniffer? what browser? what "debugger" are you using? Be more specific about what you are wanting to happen and where.
type: Comment

http://stackoverflow.com/q/26483551
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26483785
has body: In Fullcalendar, I want to NON CLICKABLE or unselect the days which out of the current month. For example, maybe these days are the last month days or next month days. Who can tell me how to make it to be NON CLICKABLE or unselect? (When user click on those days noting happen) I tried: .fc-other-month {visibility: hidden;} But it just hide them ... This is my code : var d = new Date(); var calendar = $('#calendar').fullCalendar({ eventSources: [{ url: 'show_records.php', color: 'green', }], events: [{ "title": "Capodanno", "start": d.getFullYear()+"-01-01" },{ "title": "Epifania", "start": d.getFullYear()+"-01-06" },{ "title": "Festa Liberazione", "start": d.getFullYear()+"-04-25" },{ "title": "Festa Lavoratori", "start": d.getFullYear()+"-05-01" },{ "title": "Festa Repubblicstarta", "start": d.getFullYear()+"-06-02" },{ "title": "SS Pietro e Paulo", "start": d.getFullYear()+"-06-29" },{ "title": "Ferragosto", "start": d.getFullYear()+"-08-15" },{ "title": "Santi", "start": d.getFullYear()+"-11-01" },{ "title": "Immacolata", "start": d.getFullYear()+"-12-08" },{ "title": "Natale", "start": d.getFullYear()+"-12-25" },{ "title": "S.Stefano", "start": d.getFullYear()+"-12-28" }], eventColor: 'red', // Header of calander header: { left: 'prev', center: 'title', right: 'next', }, defaultView: 'month', // Italian languge lang: 'it', // Saiz height: 600, dayClick: function(date, jsEvent, view) { // Changing BG color $(this).css('background-color', 'green'); //Create modal here $('#myModal').modal(); // Show Date in SPAN $('#spnDate').html(date.format('DD-MM-YYYY')); // Put Date value in a variable $('#date').attr('value', date.format('DD-MM-YYYY')); }, editable: true, });
accepted answer: http://stackoverflow.com/a/26492529
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26492529
type: Question
has title: How to NON clickable dates from last and next month days in fullcalendar?
possible better answer: http://stackoverflow.com/a/26483785
tagged with: javascript
tagged with: fullcalendar

http://stackoverflow.com/q/26480121
score: 0
answer count: 1
tagged with: objective-c
has title: How to use a display nsstring content in uiwebview?
tagged with: uiwebview
accepted answer: http://stackoverflow.com/a/26480409
type: AnsweredQuestion
type: Question
tagged with: ios
tagged with: javascript
has body: I have an nsstring which basically contains Html and JavaScript code in the string. How can I use the string so that I can display that content in the uiwebview. Actually I'm planning to display google charts. Note: I don't want to use a separate html file. I want to use nsstring because I get the some values from objective c code and then I'm planning to display on the uiwebview. I appreciate any kind of help. Thank you.
tagged with: nsstring
has answer: http://stackoverflow.com/a/26480409

apache
tag name: apache
type: Tag
tags question: http://stackoverflow.com/q/26363119
tags question: http://stackoverflow.com/q/26419654

jquery-select2
tags question: http://stackoverflow.com/q/26479526
tag name: jquery-select2
tags question: http://stackoverflow.com/q/26504801
tags question: http://stackoverflow.com/q/26492702
tags question: http://stackoverflow.com/q/26513683
tags question: http://stackoverflow.com/q/26485018
type: Tag
tags question: http://stackoverflow.com/q/26377981
tags question: http://stackoverflow.com/q/26466788
tags question: http://stackoverflow.com/q/26500449

http://stackoverflow.com/comment/41661117
comment on: http://stackoverflow.com/a/26450421
score: 0
type: AnswerComment
has text: AH! There is a code that loads plugin scripts?
type: Comment

http://stackoverflow.com/q/26418247
tagged with: javascript
score: 0
answer count: 1
tagged with: flexjs
tagged with: adobe
has body: recently i visited APACHE FLEXJS and it says flexjs can work without flash/air.Now i face the situation to work with flash but flash not supported in ios.So can i choose flexjs for this?or When i go to `flexjs'.
has title: Can "FLEX JS" be used like a js plugin
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28485599
type: Question
tagged with: flash

http://stackoverflow.com/comment/41536929
has text: Here it is @Innodel [http://jsfiddle.net/restin84/fxf9wneb/68/]. You can use the same scenarios above and get the same described results. The text boxes trigger popover creation on the onBlur event so just click out of them.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26432381

http://stackoverflow.com/a/26459582
downvote count: 0
score: 1
has body: If it is really compulsory to put the function with in the jquery's ready callback (which I don't think is compulsory) use the following way &lt;script type="text/javascript"&gt; var getUserMail = null; function calljs(){ if ( null !== getUserMail ) { getUserMail(usermMail); } } $(function() { getUserMail = function (usermMail) { ***some code***** } }); &lt;/script&gt;
type: AcceptedAnswer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26459427
answers question: http://stackoverflow.com/q/26459427
type: Answer

http://stackoverflow.com/a/26487300
downvote count: 0
answers question: http://stackoverflow.com/q/26487212
upvote count: 2
type: AcceptedAnswer
has body: try &lt;input type="text" class="form-control" id="storeManager" name="storeManager" onchange="editProject(this.value, '1E1DDA14-D2C6-4FC8-BA5F-DBCCC7ABAF7F')" value="John Terry"&gt; onchange="editProject(this.value, '1E1DDA14-D2C6-4FC8-BA5F-DBCCC7ABAF7F')" i've change quotes position
type: Answer
accepted answer of: http://stackoverflow.com/q/26487212
score: 2

http://stackoverflow.com/comment/41473833
has text: This still does not solve his problem that a web app is not a server.
type: AnswerComment
comment on: http://stackoverflow.com/a/26412619
type: Comment
score: 0

http://stackoverflow.com/q/26485588
type: Question
has answer: http://stackoverflow.com/a/69349169
has body: I want to remove elements that occurr more than once and get the unique element. The array always has 3 elements. Lets say i have an array [2,3,2], then I need to get 3 which is only unique in the array(removing both 2s, because they occur more than once). I have tried with following code, but surely it doesnot work as expected. var firstArrTemp = [2,3,2]; var sorted_arr = firstArrTemp.sort(); var unique_element; for (var i = 0; i &lt; sorted_arr.length - 1; i++) { if (sorted_arr[i + 1] != sorted_arr[i]) { unique_element=sorted_arr[i]; } } alert(unique_element); Thanks!
has title: Javascript remove all occurrence of duplicate element, leaving the only one that is unique
has answer: http://stackoverflow.com/a/26485875
has comment: http://stackoverflow.com/comment/41605742
has answer: http://stackoverflow.com/a/69276133
has comment: http://stackoverflow.com/comment/41605656
has answer: http://stackoverflow.com/a/71955848
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26485898
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/59714003
accepted answer: http://stackoverflow.com/a/26485747
has answer: http://stackoverflow.com/a/69349130
has answer: http://stackoverflow.com/a/71530881
has comment: http://stackoverflow.com/comment/41605811
answer count: 10
has answer: http://stackoverflow.com/a/57942721
upvote count: 4
has answer: http://stackoverflow.com/a/26485747
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41605649
possible better answer: http://stackoverflow.com/a/26485898

http://stackoverflow.com/a/26409452
type: Answer
downvote count: 0
score: 1
has body: You forgot quotes. Click me please
accepted answer of: http://stackoverflow.com/q/26409415
answers question: http://stackoverflow.com/q/26409415
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26434943
type: Question
has comment: http://stackoverflow.com/comment/41514632
has body: I have created a website with a Jssor slider which, when page is loading, starts displaying all slider captions for a second before functioning normal. After removing bit by bit from the page to see what actually causes this, I found out that a video link loading from another website via some JavaScript is the reason for this. Originally, the fist script line was loaded from the video website as well but I managed to put the script onto my server to avoid prolonged loading via internet. While this shortened the loading time, the result is still not satisfactory. Is it possible to add a delay to that specific function in order to have the jssor slider load first before the video is loaded to avoid the scrambling of the slider caption? I have read through countless of posts here but could not manage to get the result. Your help is very much appreciated.
answer count: 1
has title: JavaScript for video source is causing jssor slider to display all caption at once
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26437958
type: UnansweredQuestion

http://stackoverflow.com/q/26458370
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41556762
has title: How to make a collapsable bootstrap navbar?
has answer: http://stackoverflow.com/a/26458475
score: 0
has body: I'm trying to make a fixed-top navbar that will collapse/fold as the user scrolls down, and will reappear/unfold the instant they scroll up even if they're at the bottom of the page. I'm not even sure where to begin with this. Here's the basic layout I'm experimenting with: http://jsfiddle.net/pp5dLdxw/ foo bar
has comment: http://stackoverflow.com/comment/41556670
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41556871
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41556706
tagged with: css
has comment: http://stackoverflow.com/comment/41556883
tagged with: twitter-bootstrap
upvote count: 1
has comment: http://stackoverflow.com/comment/41556839

http://stackoverflow.com/comment/41420591
comment on: http://stackoverflow.com/q/26382879
has text: @Johnride your right... there is a script blocker addon (this happens when you work on a differnt pc because yours is broken). thanky you
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26357258
upvote count: 2
has comment: http://stackoverflow.com/comment/41377371
has comment: http://stackoverflow.com/comment/41373646
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41374103
has comment: http://stackoverflow.com/comment/41376120
has comment: http://stackoverflow.com/comment/41376327
type: Answer
has body: I think you can use preventDefault() at this point. The character n should be the keycode 78 $(document).keydown(function (objEvent) { if (objEvent.ctrlKey &amp;&amp; objEvent.keyCode== 78) { objEvent.preventDefault(); ... }); edit
has comment: http://stackoverflow.com/comment/41373935
score: 2
accepted answer of: http://stackoverflow.com/q/26357125
answers question: http://stackoverflow.com/q/26357125

http://stackoverflow.com/comment/41620369
comment on: http://stackoverflow.com/a/26467740
type: AnswerComment
type: Comment
score: 0
has text: Thank you so much ! What should I sent you by email? Do you need the code of suggest.php or s.th else?

http://stackoverflow.com/comment/41636224
comment on: http://stackoverflow.com/q/26484154
type: Comment
type: QuestionComment
has text: I don't understand your question at all. What does it mean "generated by rendition of a directive"? Can you edit and rephrase your question (not in comments) into parts: 1) this is my high level goal, 2) here's a not-yet-built directive, 3) this is the input, 4) this is the desired output, 5) this is what I tried and failed
score: 0

http://stackoverflow.com/comment/41543967
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26451303
has text: Yes... You're not at all trying to read the cookies value and set the background accordingly when the page loads... And BTW, My comments to your previous question mentioned something about *trying something by yourself*... did you atleast google how to store an object in cookie... ah, never mind...

http://stackoverflow.com/a/26488038
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26484089
answers question: http://stackoverflow.com/q/26484089
type: Answer
has body: You said your map is 700px in height. So by default your marker will be 350px from the top. Therefore, you have to decide by how much pixels you want it to pan on the y axis. Here is an example for panning by 200px: var mapOptions = { zoom: 17, center: rkc, }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var markerrkc = new google.maps.Marker({ position: rkc, icon: 'URL TO MY ICON', map: map, }); map.panBy(0,200); // pan the map by 200px on the y axis (towards the top)
downvote count: 0
score: 1

http://stackoverflow.com/a/66565770
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26507641
score: 3
type: Answer
has body: Based on the answer from mb21, this regex did the job. No loop required! /[-][-]/g
has comment: http://stackoverflow.com/comment/118395909

http://stackoverflow.com/comment/41521308
score: 0
has text: @JakobSchøler where is java?
type: AnswerComment
comment on: http://stackoverflow.com/a/26438580
type: Comment

http://stackoverflow.com/comment/41709025
comment on: http://stackoverflow.com/q/26506582
has text: Do you maybe have a link for the example? I can't seem to find it.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41623992
has text: Isn't that what this library "MathJax" does? (Although probably MJ converts its input in an abstract model first, and then can generate all of the different outputs.)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26494646
score: 0

http://stackoverflow.com/comment/41544393
has text: What does not work? Th code is working on [JSFiddle](http://jsfiddle.net/eaL48dns/). Do you get errors?
comment on: http://stackoverflow.com/q/26451540
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41512078
comment on: http://stackoverflow.com/a/26433461
has text: Thanks machineghost I'm not using checkboxes here's what it looks like
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41469138
score: 0
has text: one simple workaround is to bind the delete request to modal yes button click event.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26406964

http://stackoverflow.com/comment/41569836
type: QuestionComment
comment on: http://stackoverflow.com/q/26466001
has text: with "a new tab" you mean a new browser tab?
score: 0
type: Comment

http://stackoverflow.com/comment/41411709
has text: Partially done. just need to show in 12 hour format in inside pre tag Time is: currently it shows like 15:45
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26377571

http://stackoverflow.com/comment/41512885
type: Comment
has text: See parody' answer. It's close to what you want and what I'd snippet for you. Instead of doing a button click element after the preventDefault, just form.submit()
comment on: http://stackoverflow.com/q/26433677
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41370875
type: QuestionComment
comment on: http://stackoverflow.com/q/26355891
has text: [Text input](http://stackoverflow.com/questions/13271436/editable-text-option-in-kinetic-js); [Button](http://jsfiddle.net/DerekL/NxTW7/4/)
score: 0
type: Comment

http://stackoverflow.com/a/26360220
has body: Keep an array with all possible values and randomize the order. When you need a random value, pop the array (removing the value the "possible values"-array). To do this otherwise, you would anyway need an array to hold the "taken" values so i don't think you can get around keeping an array of the size of your "value range".
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41380856
has comment: http://stackoverflow.com/comment/41378445
type: Answer
answers question: http://stackoverflow.com/q/26360175
score: -1

http://stackoverflow.com/comment/41503571
has text: remove the semicolon from your if statement 'John Wilkes Booth');
comment on: http://stackoverflow.com/q/26429332
type: Comment
type: QuestionComment
score: 4

http://stackoverflow.com/q/26369414
tagged with: data-binding
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
has body: I was reading this article and for some reason I cannot get this code to work in chrome- IE9 works without issue. Here is the js: $(document).ready(function() { function DataBinder( object_id ) { // Use a jQuery object as simple PubSub var pubSub = jQuery({}); // We expect a `data` element specifying the binding // in the form: data-bind-<object_id>="<property_name>" var data_attr = "bind-" + object_id, message = object_id + ":change"; // Listen to change events on elements with the data-binding attribute and proxy // them to the PubSub, so that the change is "broadcasted" to all connected objects jQuery( document ).on( "change", "[data-" + data_attr + "]", function( evt ) { var $input = jQuery( this ); console.dir('test message'); pubSub.trigger( message, [ $input.data( data_attr ), $input.val() ] ); }); // PubSub propagates changes to all bound elements, setting value of // input tags or HTML content of other tags pubSub.on( message, function( evt, prop_name, new_val ) { jQuery( "[data-" + data_attr + "=" + prop_name + "]" ).each( function() { var $bound = jQuery( this ); if ( $bound.is("input, textarea, select") ) { $bound.val( new_val ); } else { $bound.html( new_val ); } }); }); return pubSub; }; function User( uid ) { var binder = new DataBinder( uid ), user = { attributes: {}, // The attribute setter publish changes using the DataBinder PubSub set: function( attr_name, val ) { this.attributes[ attr_name ] = val; binder.trigger( uid + ":change", [ attr_name, val, this ] ); }, get: function( attr_name ) { return this.attributes[ attr_name ]; }, _binder: binder }; // Subscribe to the PubSub binder.on( uid + ":change", function( evt, attr_name, new_val, initiator ) { if ( initiator !== user ) { user.set( attr_name, new_val ); } }); return user; }; var user = new User( 123 ); user.set( "name", "Wolfgang" ); }); HTML: test I added console.dir('test message') which should be logged when a change event gets fired on the input box. In IE i see this message, but in Chr…
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26369683
has title: Data binding with jQuery not working with chrome
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26369683

http://stackoverflow.com/comment/41489796
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26415047
has text: yep i saw that but when you look at the api, there is absolutely no explanation on how it really works or examples.. i'll spend some more hours on the topic i guess ;-) thanks for the answer anyway! (btw i think that you downvoted instead of upvoted ;-) )

http://stackoverflow.com/a/26356212
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26356174
type: Answer
answers question: http://stackoverflow.com/q/26356174
score: 3
downvote count: 0
has body: Create a jQuery object from the span HTML: var s = $(""+word+"x"); $('.tag_boxes').append(s); s.animate({'opacity':1});
type: AcceptedAnswer

http://stackoverflow.com/q/26453236
duplicate of: http://stackoverflow.com/q/1964839
has comment: http://stackoverflow.com/comment/41547349
has comment: http://stackoverflow.com/comment/41547569
has comment: http://stackoverflow.com/comment/41547570
score: 0
has title: Showing full screen indeterminate progress bar on top of all elements
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1964839
has comment: http://stackoverflow.com/comment/41547507
tagged with: css
has answer: http://stackoverflow.com/a/26453307
has body: I wanted to show a full screen indeterminate progress bar on top of all screen elements. My use case is as follows: User is presented with a form with among others, an email id field. The user enters the email id and via ajax that id is matched with a database. While this operation is in progress and the response via ajax controller is awaited, I want a full screen progress spinner to be visible on the entire area of the window and it must have text "Loading....". And while this is happening, all other controls must be disabled. I.e I wanted to set the image on top of all the controls. Once the email is verified, I want to hide that image. I have seen similar effect in many sites.(Not able to recall at this moment). So how do I do it?(setting the z-index does not work for me) EDIT: See this screenshot of odesk.com. This progress bar appears as you search for a job and check/uncheck a category in the left sidebar:
has comment: http://stackoverflow.com/comment/41547473
has comment: http://stackoverflow.com/comment/41547386
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26374064
favorite count: 0
has comment: http://stackoverflow.com/comment/41404512
tagged with: casperjs
type: UnansweredQuestion
downvote count: 2
tagged with: selenium
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/41431578
type: Question
has answer: http://stackoverflow.com/a/26376661
has body: As the title says, do I need a good amount of knowledge in JS before jumping into these two testing utilities? I have a fairly good grasp of HTML/CSS and I've done a good amount of work in ActionScript (various microsites, kiosks, etc.) I'm trying to pickup a useful tool for automation testing, I've tried/done Selenium, I've written some basic Python scripts, though, I just need something for very quick testing. I am not interested in cross-browser compatibility, just something I can run on my machine for basic tests. Examples of some tests: Check for images, to see if they exist on the page Click navigation, i.e., get from point A to point B Capture screenshots Fill forms I'm not an expert in automation, so any and all help/advice/suggestions is very much appreciated.
tagged with: automation
upvote count: 0
score: -2
tagged with: javascript
has title: Can you dive right into CasperJS/PhantomJS with minimal knowledge of Javascript?
answer count: 1

http://stackoverflow.com/comment/41475561
score: 0
has text: What do you mean with pull the url from DOM links themselves?
comment on: http://stackoverflow.com/q/26413473
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41514733
comment on: http://stackoverflow.com/a/26412154
type: AnswerComment
has text: I'm guessing that there are still XP users
score: 0
type: Comment

http://stackoverflow.com/a/26484409
score: 1
answers question: http://stackoverflow.com/q/26482246
upvote count: 1
has body: You can use Scrapy, which is a framework for scraping websites.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41420160
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26382879
has text: I've tried it and I don't get the error in the console.
type: Comment

x-editable
tags question: http://stackoverflow.com/q/26509576
type: Tag
tag name: x-editable
tags question: http://stackoverflow.com/q/26378401

http://stackoverflow.com/q/26409473
downvote count: 1
has title: how to make the game save the best score with if statement javascript?
score: -1
has comment: http://stackoverflow.com/comment/41467308
type: Question
has comment: http://stackoverflow.com/comment/41467562
has body: I am building a simple game as practice that counts the number of taps pressed in 3 seconds i have done everything apart from making it able to save the record score and if there is no record score then to show the old record. GO 0 I am using the if statement at the end but want to know how you would save the high score or if there isnt one to say the old high score. thanks it would be really helpful.
upvote count: 0
tagged with: javascript
favorite count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41467442
has comment: http://stackoverflow.com/comment/41467355
has answer: http://stackoverflow.com/a/26412507
type: UnansweredQuestion

http://stackoverflow.com/comment/41586326
has text: @Ray I think the underlying issue has to do with the fact that you're tying the enabled property to the Controller's enabled property. If you want to have each directive have it's own `enabled` property you would need to make `enabled` into an array for each directive.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26472440
type: AnswerComment

http://stackoverflow.com/comment/41604104
score: 0
type: AnswerComment
type: Comment
has text: Yeah, there's so much code and I have no idea how you are getting that value from, ajax?
comment on: http://stackoverflow.com/a/26484152

http://stackoverflow.com/comment/41610033
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26487959
score: 1
has text: Provide some examples.

http://stackoverflow.com/q/26509773
has title: ZF2 How to use pages javascripts and stylesheets in layout
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/26542943
has comment: http://stackoverflow.com/comment/41656327
type: Question
has comment: http://stackoverflow.com/comment/41663181
tagged with: zend-framework
tagged with: view-helpers
has comment: http://stackoverflow.com/comment/41653525
tagged with: javascript
score: 0
has body: I use zend framework 2. This is my layout.phtml <?php echo $this->doctype(); ?> <?php echo $this->headTitle('Test') ?> <?php /* Vendor CSS */ $this->headLink(array( 'rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/img/favicon.ico' )) ->appendStylesheet($this->basePath() . 'aaaa.css') ->appendStylesheet($this->basePath() . 'bbbb.css'); /* Specific Page Vendor CSS */ $this->headLink() ->appendStylesheet($this->basePath() . 'cccc.css') ->appendStylesheet($this->basePath() . 'dddd.css') /* Theme CSS */ $this->headLink() ->appendStylesheet($this->basePath() . 'eeee.css'); ?> <?php print $this->render('layout/header') ?> <?php print $this->render('layout/left-menu') ?> <?php echo $this->content; ?> <?php print $this->render('layout/right-menu') ?> <?php /* Vendor */ $this->headScript() ->appendFile($this->basePath() . 'aaaa.js') ->appendFile($this->basePath() . 'bbbb.js'); /* Specific Page Vendor */ $this->headScript() ->appendFile($this->basePath() . 'cccc.js') ->appendFile($this->basePath() . 'dddd.js); /* Theme Base, Components and Settings */ $this->headScript() ->appendFile($this->basePath() . 'eeee.js'); ?> This layout is working fine. But Specific Page vendors are not need set in layout.phtml. It will change with content. So i need move /* Specific Page Vendor */ part to related .phtml file. After that My layout and content should be like this. layout.phtml doctype(); ?> <?php echo $this->headTitle('Test') ?> <?php /* Vendor CSS */ $this->headLink(array( 'rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/img/favicon.ico' )) ->appendStylesheet($this->basePath() . 'aaaa.css') ->appendStylesheet($this->basePath() . 'bbbb.css'); /* Theme CSS */ $this->headLink() ->appendStylesheet($this->basePath() . 'eeee.css'); ?> <?php print $this->render('layout/header') ?> <?php print $this->render('layout/left-menu') ?> <?php echo $this->content; ?> <?php print $this->render('layout/right-…
tagged with: zend-framework2
answer count: 1

http://stackoverflow.com/comment/41519741
comment on: http://stackoverflow.com/q/26437771
has text: why don't you use `replace` ? It should be much more easier.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41523612
has text: I'm using Rickshaw in Coffescript. So I need to know the syntax for how to define a function that does exactly what format does in coffescript syntax
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26439790

http://stackoverflow.com/comment/41598062
score: 0
type: AnswerComment
has text: oke, Thanks for the reference! I'll try to find the solution
comment on: http://stackoverflow.com/a/26480880
type: Comment

http://stackoverflow.com/comment/41656786
type: Comment
type: QuestionComment
has text: Shouldn't it be `list[i].getElementsByTagName("li");`?
score: 5
comment on: http://stackoverflow.com/q/26513403

http://stackoverflow.com/comment/41432814
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26389682
score: 0
has text: http://debugmode.net/2013/02/19/how-to-find-index-of-an-item-in-javascript-object-array/

http://stackoverflow.com/a/32235374
has comment: http://stackoverflow.com/comment/96280425
has body: If you just need to add a marker on your map which is clickable, you can use overlays. In your HTML header define your marker's style: then in script part of your file, after the map is created: // add marker var pos = ol.proj.fromLonLat([0.01123, 0.00612]); var marker = new ol.Overlay({ position: pos, positioning: 'center-center', element: $(' ') .popover({ 'placement': 'top', 'html': true, 'content': 'anything...' }) .on('click', function (e) { $(".location-popover").not(this).popover('hide'); }), stopEvent: false }); map.addOverlay(marker);
type: Answer
answers question: http://stackoverflow.com/q/26391195
score: 2
upvote count: 3
downvote count: 1

http://stackoverflow.com/a/26402876
accepted answer of: http://stackoverflow.com/q/26402689
has comment: http://stackoverflow.com/comment/41491362
answers question: http://stackoverflow.com/q/26402689
has comment: http://stackoverflow.com/comment/41459301
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
has body: No, it doesn't work that way. If you want to call a PHP function from Javascript without the page refreshing, you need an XMLHttpRequest. Example: &lt;?php // your php process when called by XMLHttpRequest if($_SERVER['REQUEST_METHOD'] == 'POST') { $vatnum = $_POST['n']; $country='IT'; $a = "Work"; $b = "NotWork"; $url = 'http://isvat.appspot.com/'.$country.'/'.$vatnum.'/'; $response = file_get_contents($url); //global $a, $b; if( $response == 'true' ){ echo $a; } else { echo $b; } exit; } ?&gt; &lt;form method="post" id="form1"&gt; &lt;input name="n" type="text" id="n" /&gt; &lt;input value="Validate" type="submit"&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; // when the form is submitted document.getElementById('form1').addEventListener('submit', function(e){ e.preventDefault(); var n = document.getElementById('n').value; // get the textbox value var xmlhttp = new XMLHttpRequest(); var params = 'n=' + n; var php_url = document.URL; xmlhttp.open('POST', php_url, true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { var response = xmlhttp.responseText; alert(response); // alert the server response } } xmlhttp.send(params); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41455179
has comment: http://stackoverflow.com/comment/41478910
has comment: http://stackoverflow.com/comment/41455333
has comment: http://stackoverflow.com/comment/41455007
has comment: http://stackoverflow.com/comment/41455090
has comment: http://stackoverflow.com/comment/41461034
has comment: http://stackoverflow.com/comment/41496536
has comment: http://stackoverflow.com/comment/41461418
type: Answer

http://stackoverflow.com/q/26473002
score: 1
has title: Loading React Component after AJAX
type: Question
has answer: http://stackoverflow.com/a/26479732
tagged with: reactjs
answer count: 1
tagged with: javascript
tagged with: ajax
upvote count: 1
favorite count: 0
has body: I have a ReactJS component that needs a response from an AJAX request before it can be rendered. I have tried to add a listener to the store, so that when it emits loaded, I call this.setProps(/*props*/) on the component. This doesn't work because the component has children that are also dependent upon that data being loaded. I have also tried using componentWillUpdate and componentWillReceiveProps. I assumed that componentWillReceiveProps was what I was looking for, which does work for the main view on it's own but it doesn't propogate the data down to the children. Any ideas?
type: UnansweredQuestion
downvote count: 0

angular-http
tags question: http://stackoverflow.com/q/26387868
type: Tag
tags question: http://stackoverflow.com/q/26376223
tags question: http://stackoverflow.com/q/26459577
tag name: angular-http

http://stackoverflow.com/a/26442830
upvote count: 1
has body: You have to first cast sum to a Number (not an integer, which is what does |) and if it returns NaN you can assign zero instead like this: array[i]= (+sum) || 0;
accepted answer of: http://stackoverflow.com/q/26442726
answers question: http://stackoverflow.com/q/26442726
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/41649328
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26509338
has text: On firefox I don't even get the first context menu, fyi.
score: 0

http://stackoverflow.com/a/26377995
has body: String.prototype.insertTextAtIndices = function (text) { return this.replace(/./g, function (char, index) { return text[index] ? text[index] + char : char; }); }; //usage var range = { 25: "&lt;span style='color:red'&gt;", 40: "&lt;/span&gt;" }; document.getElementsByTagName("p")[0].innerHTML = document.getElementsByTagName("p")[0].innerHTML.insertTextAtIndices(range); http://jsfiddle.net/4zx37Lhm/1/
answers question: http://stackoverflow.com/q/26377583
downvote count: 0
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/41683458
has text: this is to do with properties vs attributes - the `value` *property* of the DOM element is what you're trying to change, and it gets its *initial* value from the `value` *attribute* of the HTML element. But dynamically updating the *attribute* does not change the *property*. This is a constant source of confusion - check out this question and its answers for example http://stackoverflow.com/questions/5874652/prop-vs-attr
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26503182
score: 1

http://stackoverflow.com/q/26465866
answer count: 0
has comment: http://stackoverflow.com/comment/41570156
tagged with: knockout.js
type: Question
tagged with: javascript
has body: Please excuse me if anything is incorrect. Posting my first ever Question! Hi, its been while since i have started working on konckout in my new project. everything was going good until now as am facing with 2 basic problems I am not able to pre select my dropdown list, with the selected subItem value When i try to change the selected subitem its is not preserved i tried debugging to check whether ko is updating the underlying observable "selectedOption" property of "Item" object, fortunately it is doing but one's i change the item and come back my selected value is not preserved it going back to the first item in the list. i couldn't understand what am missing could anyone explain me why the selectedOption value is not preserved and why am not able pre select my dropdown list Thanks in advance. please find the sample in jsfiddle working sample function Item(data) { //debugger; this.name = data.name; this.subItems = ko.observableArray(data.subItems); this.selectedOption = ko.observable(data.option); //someother properties of this object } function SubItem(data) { //debugger; this.name = data.name; //someother properties of this object } function ViewModel() { var self = this; self.items = ko.observableArray( [ new Item({ name: "Item 1", option: "Sub 12", subItems: [ "Sub 11", "Sub 12", "Sub 13", "Sub 14"] }), new Item({ name: "Item 2", option: "Sub 23", subItems: [ "Sub 21", "Sub 22", "Sub 23", "Sub 24"] }), new Item({ name: "Item 3", option: "Sub 33", subItems: [ "Sub 31", "Sub 32", "Sub 33", "Sub 34"] }) ]); self.selectedItem = ko.observable(); self.onChange = function(vm, event) { debugger; console.log(vm); } } ko.applyBindings(new ViewModel());
score: 0
has title: Ko is not preserving selected value
has comment: http://stackoverflow.com/comment/41571212
has comment: http://stackoverflow.com/comment/41570048
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41569806

http://stackoverflow.com/comment/125771208
has text: This is great code. I'm trying to use it to find certain id elements on the page but it is only working for the first id. Any idea? The code I changed looks like this: `let anchors = $('body').find( "#intro", "#howtoplay", "#game", "#contact" );`
comment on: http://stackoverflow.com/a/26383047
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41592913
type: QuestionComment
has text: Are you using `echo json_encode($array);` on the server to return a JSON object? Also perform `console.log(response);` what does it show you?
comment on: http://stackoverflow.com/q/26478090
score: 0
type: Comment

http://stackoverflow.com/q/26364584
tagged with: ajax
has comment: http://stackoverflow.com/comment/41387229
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41391840
answer count: 0
has title: Is there a way to tell Turbolinks as portion of the page has updated
tagged with: ruby-on-rails
type: Question
has body: I have dynamically added a div onto my document with ajax and I need to tell turbo links the page has updated. I would like to keep using $(".comment") instead of $(document) because the the .arrow class is on multiple items other then $(".comment") $(".comment").on("click", ".arrow-down", function () {
tagged with: javascript
tagged with: jquery
score: 0
tagged with: ruby-on-rails-4

http://stackoverflow.com/a/26386993
type: Answer
accepted answer of: http://stackoverflow.com/q/26357109
has comment: http://stackoverflow.com/comment/53838313
has comment: http://stackoverflow.com/comment/41445647
has comment: http://stackoverflow.com/comment/41445634
answers question: http://stackoverflow.com/q/26357109
downvote count: 1
upvote count: 6
score: 5
has comment: http://stackoverflow.com/comment/77310564
type: AcceptedAnswer
has body: This can be achieved using the following steps in JavaScript: Convert from MathML to XML DOM Convert from XML DOM to plain text Use the "eval" function to get the decimal value of the expression The following code does precisely that: function getDOM(xmlstring) { parser=new DOMParser(); return parser.parseFromString(xmlstring, "text/xml"); } function remove_tags(node) { var result = ""; var nodes = node.childNodes; var tagName = node.tagName; if (!nodes.length) { if (node.nodeValue == "π") result = "pi"; else if (node.nodeValue == " ") result = ""; else result = node.nodeValue; } else if (tagName == "mfrac") { result = "("+remove_tags(nodes[0])+")/("+remove_tags(nodes[1])+")"; } else if (tagName == "msup") { result = "Math.pow(("+remove_tags(nodes[0])+"),("+remove_tags(nodes[1])+"))"; } else for (var i = 0; i < nodes.length; ++i) { result += remove_tags(nodes[i]); } if (tagName == "mfenced") result = "("+result+")"; if (tagName == "msqrt") result = "Math.sqrt("+result+")"; return result; } function stringifyMathML(mml) { xmlDoc = getDOM(mml); return remove_tags(xmlDoc.documentElement); } // Some testing s = stringifyMathML(" 3 + 5 "); alert(s); alert(eval(s)); s = stringifyMathML(" 1 2 + 1 "); alert(s); alert(eval(s)); s = stringifyMathML(" 2 4 "); alert(s); alert(eval(s)); s = stringifyMathML(" 4 "); alert(s); alert(eval(s)); Following the previous code, it is possible to extend the accepted MathML. For example, it would be easy to add trigonometry or any other custom function. For the purpose of this post, I used the tool from mathml editor to build the MathML (used in the test part of the code).
has comment: http://stackoverflow.com/comment/41444829
has comment: http://stackoverflow.com/comment/41446351

http://stackoverflow.com/a/26385777
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26385587
has body: Looks like you want: var optData = $("#company_select option").filter(function(){ return $(this).text() === val; }).data("company_system_name");

http://stackoverflow.com/q/26443967
has comment: http://stackoverflow.com/comment/41530733
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41531453
type: Question
tagged with: javascript
has body: I'm trying to operate a transformation onLoad from a text in order to create a new modified text (the point is I don't wanna use textareas) in simple javascript. Here is what I've been trying to do (but it seems to work only with values coming from textareas) : TEXT Does anyone know how to get the first text between the "p" tags in order to proceed to the transformation ? Thank you in advance !
score: 0
has answer: http://stackoverflow.com/a/26444100
answer count: 1
accepted answer: http://stackoverflow.com/a/26444100
has title: JavaScript: transform a text between tags into a new one also between tags (output)

http://stackoverflow.com/q/26390769
tagged with: jquery
type: UnansweredQuestion
has title: wrapAll not wrapping plain text
type: Question
has comment: http://stackoverflow.com/comment/41435403
has body: There is some HTML that looks like this: Do all declarations for the same static function or variable have to include the storage class static ? When I do $('body').children().wrapAll(" "); to wrap everything into a .container, it works except it doesn't encompass the plain text: static static Do all declarations for the same function or variable have to include the storage class ? How do I fix this so it preserves the original structure?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41434758
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26390813

http://stackoverflow.com/comment/41493108
has text: @HélderGonçalves There really isn't one :( These are your best bets, but they are indirect and subject to both latency (you won't really know until after the first page has loaded, and the JS has run) and the user could navigate away before the call is made, or it could fail to complete - none are ideal.
comment on: http://stackoverflow.com/a/26423773
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41388440
type: Comment
has text: Face palming right now...thanks" I had linked it in via another project... Thanks man!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26365382

http://stackoverflow.com/q/26405798
tagged with: mongoose
has answer: http://stackoverflow.com/a/26451522
tagged with: javascript
has answer: http://stackoverflow.com/a/26406710
favorite count: 0
possible better answer: http://stackoverflow.com/a/26406710
upvote count: 2
accepted answer: http://stackoverflow.com/a/26451522
has comment: http://stackoverflow.com/comment/41460363
tagged with: node.js
has body: This is my document: { password: '87654321', title: 'Organization A', members: [ { tier: 1, joinedDate: Sun May 12 2013 00:00:00 GMT+0200 (CEST), user: 543fc462ed385e5e77a98d56 }, { tier: 2, joinedDate: Sat May 11 2013 00:00:00 GMT+0200 (CEST), user: 543fc462ed385e5e77a98d57 }, { tier: 3, joinedDate: Fri May 10 2013 00:00:00 GMT+0200 (CEST), user: 543fc462ed385e5e77a98d58 } ] } I want to write a query that pulls a member with a given user _.id The pull command is probably what I should use http://mongoosejs.com/docs/api.html#types_array_MongooseArray-pull mongoose.model('organization').findOne({_id:user.organization}, function(err, org){ org.members.pull({'user._id':user._id}); org.save(); }) It's not working. What am I doing wrong? Update My schema: var organizationSchema = new Schema({ title: String, password: { type: String, required: true, index: { unique: true } }, members: [ { tier: { type: Number, required: true, min:1, max:4}, joinedDate: Date, user:{ type: Schema.ObjectId, ref: 'user', required: true, unique:true } } ] });
type: AnsweredQuestion
score: 2
has title: Mongoose, pull from subdocument
type: Question
tagged with: mongodb
answer count: 2
has comment: http://stackoverflow.com/comment/41460381
downvote count: 0

http://stackoverflow.com/comment/41516834
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26436090
has text: what is the `post` in the click handler... you need to share more context to that
score: 0

http://stackoverflow.com/comment/41401187
score: 0
has text: if you log `this` inside of `onConnect` is it actually referring to an instance of the class?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26371981

http://stackoverflow.com/a/26355608
has comment: http://stackoverflow.com/comment/41372365
upvote count: 3
has comment: http://stackoverflow.com/comment/41371112
score: 3
has body: I've had a similar issue a while back. There is a maximum of concurrent I/O operations possible so Node will start writing as many files at the same time as it can, and the rest will be queued until a slot is free. file 1 |-----------------------------------| file 2 |-----------------------------------| file 3 |-----------------------------------| file 4 |-------------------------------------| The above is just an example but it shows the principle, writing 4 files in this case will take twice as long than writing only 3 files.
has comment: http://stackoverflow.com/comment/41371894
answers question: http://stackoverflow.com/q/26355300
downvote count: 0
has comment: http://stackoverflow.com/comment/41371629
type: Answer

http://stackoverflow.com/comment/41637596
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26502699
has text: Your code is working.. What is the purpose of this question ?
type: Comment

http://stackoverflow.com/q/26426881
has comment: http://stackoverflow.com/comment/41499732
favorite count: 0
tagged with: ajax
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26427913
has comment: http://stackoverflow.com/comment/41499930
has comment: http://stackoverflow.com/comment/41499064
has title: After ajax page allready reloads.
downvote count: 1
has comment: http://stackoverflow.com/comment/41499462
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41500509
has comment: http://stackoverflow.com/comment/41498996
has body: I'm just exploring ajax to learn it. I try the following JavaScript test code. Ajax Demo <?php $mysqli=new mysqli('localhost', 'root', 'password', 'ajax'); if ($mysqli->connect_errno) { die("Connect failed". $mysqli->connect_error); } $mysqli->set_charset("utf8"); if ($result = $mysqli->query("select id, name from test;")){ while ($row = $result->fetch_assoc()) { echo $row['id'], " - " , $row['name'], " "; }//while }//if $result->close(); $mysqli->close(); ?> And a few Row For "getprod.php". <?php echo "123"; ?> When I change the value in textbox, Ajax returns me the string "123", as desired and places it in div, but after few seconds, div is again filled with results from MySQL, that's not desired. 1) What's wrong in my code? (Goal is: When I change value in textbox, only returned string from ajax - "123" must be appear in div container permanently.) 2) Textbox change event occurs when it loses focus or when I press ENTER on keyboard. How to fire change event without this action? Thanks in advance.
has answer: http://stackoverflow.com/a/26427913
has answer: http://stackoverflow.com/a/26428235
has comment: http://stackoverflow.com/comment/41501438
accepted answer: http://stackoverflow.com/a/26428235
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41500490
tagged with: javascript

http://stackoverflow.com/a/26501011
downvote count: 0
has comment: http://stackoverflow.com/comment/42393634
type: Answer
has comment: http://stackoverflow.com/comment/41856633
accepted answer of: http://stackoverflow.com/q/26500260
has comment: http://stackoverflow.com/comment/42160956
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26500260
has body: here is my suggestion: Use an ID for "dummy", if you have more than one "dummy" in your dom-tree you get an array with html elements from jquery. $(document).ready(function() { // First init for "dummy" var $dummy = $("#dummy"), dummyFloat = $dummy.css("float"); $(window).resize(function () { var dynamicDummyFloat = $dummy.css("float"); if (dynamicDummyFloat != dummyFloat) { $(".wrapper").scrollLeft(0); dummyFloat = dynamicDummyFloat; } }); });
type: AcceptedAnswer

http://stackoverflow.com/comment/41424536
score: 0
type: Comment
type: AnswerComment
has text: using grails with oracle
comment on: http://stackoverflow.com/a/26385151

http://stackoverflow.com/a/26507951
has comment: http://stackoverflow.com/comment/41648538
score: 1
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26507149
answers question: http://stackoverflow.com/q/26507149
type: AcceptedAnswer
has body: The &lt;button&gt; is the toggling element (toggles the class ".open"). This element could be an &lt;a&gt; or &lt;span&gt; or any containable element . Documentation is correct. To target the element that was selected you have to bind an other event: $(".dropdown-menu").on('click', 'li a', function(){ console.log($(this).text()); });
type: Answer

http://stackoverflow.com/comment/41546342
score: 2
type: AnswerComment
has text: There's nothing wrong with `var connect_args = arguments;`. The `apply` method does take `Arguments` objects as well.
type: Comment
comment on: http://stackoverflow.com/a/26448848

http://stackoverflow.com/a/26361130
has comment: http://stackoverflow.com/comment/41380349
type: Answer
has body: Create the array on the PHP side like this - $array = array(); while($data = mysql_fetch_row($result)) { array_push($array, $data); } echo json_encode($array);
answers question: http://stackoverflow.com/q/26360929
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41380430
upvote count: 1
has comment: http://stackoverflow.com/comment/41380399
has comment: http://stackoverflow.com/comment/41380473

http://stackoverflow.com/comment/41563494
has text: is it a website, the page of which u r opening in android browser of Samsung tab?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26461148

http://stackoverflow.com/a/26399176
has comment: http://stackoverflow.com/comment/41449600
accepted answer of: http://stackoverflow.com/q/26399121
has body: You can do that using Array.prototype.every(): The every() method tests whether all elements in the array pass the test implemented by the provided function. (mdn) Example: var array = [obj1, obj2, obj3, objN]; var allTheSame = array.every(function(element){ return element.key === array[0].key; }); Please note that Array.prototype.every() is IE 9+. However, there's a nice polyfill on the mdn page for older versions of IE. If you really want to use a for loop, you could do it like this: var array = [obj1, obj2, obj3, objN]; var allTheSame = array.length == 1; for(var i = 1; i &lt; array.length &amp;&amp; (array.length &gt; 1 &amp;&amp; allTheSame); i++){ allTheSame = array[0].key == array[i].key; } Try it for: [{key:1},{key:1},{key:1}]; // true [{key:1},{key:1},{key:2}]; // false [{key:1},{key:2},{key:1}]; // false [{key:1}]; // true
type: Answer
answers question: http://stackoverflow.com/q/26399121
score: 7
upvote count: 7
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41650726
score: 0
type: Comment
type: QuestionComment
has text: what exactly is the problem it is working well !
comment on: http://stackoverflow.com/q/26509720

http://stackoverflow.com/q/26389866
has comment: http://stackoverflow.com/comment/41433492
tagged with: math
downvote count: 1
has answer: http://stackoverflow.com/a/26390070
type: Question
has title: Javascript precision with math libraries
upvote count: 4
has comment: http://stackoverflow.com/comment/41433529
has comment: http://stackoverflow.com/comment/41433477
tagged with: javascript
has body: I'm trying to get this calculation done in javascript using Big.js r = (a * b)/ sqrt( ( a*sin(θ) )^2 + ( b*cos(θ) )^2 ) I've also tried math.js and have the same result. You can see the discrepancies in Wolfram and Google calculations, as google is using javascript. Wolfram [=40] vs Google [=43.4008369271] I've done this jsfiddle where you can see it working: http://jsfiddle.net/herkulano/k1h5d4zk/ How do you solve it?
answer count: 1
accepted answer: http://stackoverflow.com/a/26390070
favorite count: 0
has comment: http://stackoverflow.com/comment/41433223
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/41423008
type: Comment
comment on: http://stackoverflow.com/a/26384092
has text: @majidarif router.post('/users', function(req, res){ console.log(req.body) }) and i give { users: '[object Object]' }
type: AnswerComment
score: 0

http://stackoverflow.com/q/26439695
has body: I have been tasked with creating a bowling score calculator in javascript. I am a complete newbie to javascript so I'm not sure where to start. Are there any simple examples of this specific project I can use as reference? I keep finding long and convoluted code for it that doesn't make much sense...
tagged with: javascript
has comment: http://stackoverflow.com/comment/41525512
answer count: 2
downvote count: 4
has title: 10 Pin Bowling Score Calculator in Javascript
has comment: http://stackoverflow.com/comment/41523244
favorite count: 0
has answer: http://stackoverflow.com/a/26440133
score: -4
possible better answer: http://stackoverflow.com/a/46154409
accepted answer: http://stackoverflow.com/a/26440133
has answer: http://stackoverflow.com/a/46154409
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41528060
type: Question
upvote count: 0

http://stackoverflow.com/a/26510211
answers question: http://stackoverflow.com/q/26509756
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41650547
has body: Two problems - as pointed out by others the confusion between equality and assignment, but also an edge case error: actual will count from 0 to number_of_question-1 so you should have: if (actual === number_of_question-1){ //alert("Finished"); window.location.href = 'finished.html'; }

http://stackoverflow.com/comment/41414675
score: 2
comment on: http://stackoverflow.com/q/26379831
has text: Try some `$('.wrapper').filter(…)`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26394061
type: UnansweredQuestion
has title: JSON Array Index Order
has comment: http://stackoverflow.com/comment/41440530
upvote count: 0
tagged with: arrays
tagged with: javascript
favorite count: 0
type: Question
score: -2
downvote count: 2
answer count: 1
has body: There's a system that inputs lines of text as an array e.g., array[123,556,"test",0,0]. When using val().split('\n') i'm able to get each new line to be added to the new array so that each line index is incremented by 1 e.g., array[123,556,"test",0,1] = "line 1" array[123,556,"test",0,2] = "line 2" array[123,556,"test",0,3] = "line 3" array[123,556,"test",0,4] = "line 4" But I need the last two indexes to display in reverse. The arrays need to look like this: array[123,556,"test",1,0] = "line 1" array[123,556,"test",2,0] = "line 2" array[123,556,"test",3,0] = "line 3" array[123,556,"test",4,0] = "line 4" Somehow they're able to get the array index to increment in the 4th index. I'm only able to get it to increment in the 5th index.. I tried .push(0) to add a 0 the end but get errors. Any ideas? Thanks
tagged with: indexing
has answer: http://stackoverflow.com/a/26394262
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/41535404
has text: @RobDel - I've added some inline annotations in the code to help explain what is going on.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26440222

http://stackoverflow.com/a/26388712
accepted answer of: http://stackoverflow.com/q/26371878
answers question: http://stackoverflow.com/q/26371878
has body: So, it appears there's a bug/issue with iOS 8 that's interfering with the 'popup' style of login, not only for google but for a handful of other services: https://devforums.apple.com/message/1044445#1044445 (Apple dev account required to see the above). Long story short, it's an unresolved iOS 8 issue. There are a couple of github issues discussing the above: https://github.com/meteor/meteor/issues/2720 https://github.com/meteor/meteor/issues/2639 The workaround: add 'loginStyle: "redirect"' to the service configuration, ie: ServiceConfiguration.configurations.insert({ service: "google", clientId: "xyz.apps.googleusercontent.com", secret: "123xyz", loginStyle: "redirect" }); Note You will also need to update your Google app in the developer console to include the new redirect URI, ie: http://example.com/_oauth/google
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/48539653
has comment: http://stackoverflow.com/comment/42663107
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/42663135
downvote count: 0

http://stackoverflow.com/comment/41558739
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26459366
has text: Apologies - the syntax is correct in the project, but must have messed it up during the copy/paste. I've edited the question to fix the issue.

http://stackoverflow.com/comment/41439800
comment on: http://stackoverflow.com/a/26393060
score: 0
type: AnswerComment
type: Comment
has text: Thanks so much. This was exactly what I needed. Looks like the core code was using it as an external library. I was able to download the older version and place it internally and everything works now (awaiting our QA team to confirm of course)!

http://stackoverflow.com/comment/41452880
type: QuestionComment
has text: I don't think it is a good approach to add AngularJS to every single page as different applications. You can implement a single page application with refactored pages and a router that will redirect to old pages when they are yet to be refactored.
type: Comment
comment on: http://stackoverflow.com/q/26400894
score: 0

http://stackoverflow.com/comment/41374786
has text: The simple version is you needed to append the new forms inside the wrapper. Not use `before`. Your close handler was attached to a sibling instead of an ancestor :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26358007

http://stackoverflow.com/q/26366868
possible better answer: http://stackoverflow.com/a/26372431
has comment: http://stackoverflow.com/comment/41400862
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26372431
tagged with: knockout.js
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41408235
answer count: 2
downvote count: 4
has answer: http://stackoverflow.com/a/26439517
accepted answer: http://stackoverflow.com/a/26439517
tagged with: validation
has title: How to validate emails onEqual in several divs with them on the same page
favorite count: 0
score: -4
has body: The situation: And I need to validate inputs inside these 2 inputs inside every div to be equal(only inside div). Maybe the main problem is that all divs are dynamically generated, and we don't know exactly their quantity to provide knockout support. How to do that? What is the most elegant solution? Update 1 I've tried: 1. To make some binding using knockout model. But my solution for this was to create some observable property to check inputs values. This is bad way I guess. 2. To use jquery for this. Tried to validate fields via validate class for inputs(http://jqueryvalidation.org/jQuery.validator.addClassRules/) Update 2 My solution was something like that: Emails must be equal But this solution is not ok, because this binding works only once - at page loading, what isn't good. I need to bind this check to text update in these inputs, and I don't know how. Update 3 My suggestion is to deal with it in this way: Make on the first email input this binding http://knockoutjs.com/documentation/textinput-binding.html Bind with similar function in knockout's model as wrote Wayne Ellery. If values aren't equal make error label visible. The main condition is to pass apropriate inputs ids to function, and I guess this will work.

http://stackoverflow.com/comment/41494717
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26423309
has text: @OamPsy If you print the values without any filters you should see the `minus` string. It may be one your filters converting it a integer which cause it to remove string character.

http://stackoverflow.com/comment/126358475
has text: The question is not about React 'listening' and re-rendering the dom. The question is about how a user can listen for a change in state (for example if the state `count` changes from `20` to `21`) and run some code when it changes. `useEffect` does this in React hooks. Not sure what the mechanism was before React hooks, or if there was one.
type: AnswerComment
comment on: http://stackoverflow.com/a/26414427
type: Comment
score: 1

http://stackoverflow.com/q/26412283
answer count: 1
score: 0
has answer: http://stackoverflow.com/a/26482936
has body: I can't find any documentation to confirm or deny that the karma launchers support HTML5 in the browsers. Yet my tests are failing because of some missing HTML5 capabilities. This happens for Firefox, Chrome and PhantomJS. However, everything works as expected when I use the actual browser. I'm using the mule-uploader library which checks for HTML5 APIs before continuing like so: // verify that the browser has the needed HTML5 capabilities if (!(namespace.File &amp;&amp; namespace.FileList &amp;&amp; namespace.Blob &amp;&amp; namespace.FileReader &amp;&amp; namespace.Worker)) { log("HTML5 APIs not available."); return -1; } Do the karma launchers support HTML5?
has title: Karma launchers HTML5 APIs
tagged with: javascript
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41499339
tagged with: karma-runner
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41489159

http://stackoverflow.com/q/26415559
answer count: 0
downvote count: 0
tagged with: jquery
favorite count: 0
has title: jQuery doesn't detect ų
type: Question
tagged with: character
upvote count: 2
has body: I'm using jQuery highlight plugin to highlight. As website is Lithuanian language based I need to detect word with diacritics even if user inputed word without them. I found out this accent option just this part doesn't work 'u': 'ų',, even other letters works perfectly. What can I do to be able to detect ų letter? As in example plugin won't hightlight word mokesčių as you type mokesciu, because of the last ų Example: here var accentedForms = { 'a': 'ą', 'c': 'č', 'e': 'ę', 'e': 'ė', 'i': 'į', 's': 'š', 'u': 'ų', 'u': 'ū', 'z': 'ž' }; var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false, accentInsensitive: false }; jQuery.extend(settings, options); if (settings.accentInsensitive) { for (var s in accentedForms) { words = words.replace(s, '[' + s + accentedForms[s] + ']'); } }
has comment: http://stackoverflow.com/comment/41483591
tagged with: javascript
type: UnansweredQuestion
score: 2

http://stackoverflow.com/comment/41408404
score: 1
type: AnswerComment
has text: @BoLe When the `elapsed` function is created, there will be a variable called `start` in its scope and it will retain the value between multiple calls. So, you can treat that like a private variable.
type: Comment
comment on: http://stackoverflow.com/a/26374805

http://stackoverflow.com/comment/41414792
score: 0
type: AnswerComment
has text: and why in 2nd case `data()` also gives undefined?
type: Comment
comment on: http://stackoverflow.com/a/26379674

http://stackoverflow.com/comment/41551427
comment on: http://stackoverflow.com/q/26455363
score: 1
type: QuestionComment
has text: What vertical blank space, inside the red area or the lines below it or what? Why not add an example instead of an image ?
type: Comment

http://stackoverflow.com/q/26377842
favorite count: 0
downvote count: 3
accepted answer: http://stackoverflow.com/a/26387881
has title: Parse the content of a file and store in an object in JavaScript
has comment: http://stackoverflow.com/comment/41410909
tagged with: regex
has comment: http://stackoverflow.com/comment/41415323
has body: I have a test file 'templates.txt' which I am loading it through an ajax call. The content of the text file is in this format. {template templateA} templateA content {/template} {template templateB} templateB content {/template} {template templateC} templateC content {/template} When I load it through an ajax I get the content of the whole file as a string. Lets assume I have the content of the file in the variable templateContent. var templateContent = myFileContent; But I want to parse this string variable and convert it into an object as follows. { templateA : templateA content, templateB : templateB content, templateC : templateC content } How can I do it in javascript? Can regex be a good option? NOTE : There is requirement for this format. Even Google Closure templates uses the same format. https://developers.google.com/closure/templates/docs/helloworld_js
upvote count: 0
has answer: http://stackoverflow.com/a/26387881
score: -3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41410919
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41634764
score: 0
type: Comment
has text: You probably have duplicate IDs. Be sure not to leave out the [0]. Would you please create a demo.
comment on: http://stackoverflow.com/a/26501413
type: AnswerComment

http://stackoverflow.com/comment/41630775
comment on: http://stackoverflow.com/q/26498634
score: 0
type: Comment
has text: I was just experimenting. I took away the id, and it worked still. @AnthonyForloney Not sure if it's proper code, but it seems to work. I'll put what I have above under "edit" One thing though, each time I click "add item" it's supposed to save to the text area. Right now it adds it, but then when I input new values, it replaces the old ones.
type: QuestionComment

http://stackoverflow.com/a/26433743
type: Answer
answers question: http://stackoverflow.com/q/26405298
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41560187
has body: Add a reference to the function you are using, because setInterval returns the function reference. Working Example code here in the Splash view: and below: this.count = 0; this.timerFunc = Timer.setInterval( function(){ this.count += 1; this.surface.setContent('count ' + this.count); }.bind(this), 1000); this.surface.on('click', function(){ Timer.clear(this.timerFunc); }.bind(this));
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26405298

http://stackoverflow.com/a/26705674
accepted answer of: http://stackoverflow.com/q/26353839
type: Answer
has body: Actualy to fix the issue i simply enabled the cookies. I guess it was necessary to load the page. The code: webClient.getCookieManager().setCookiesEnabled(true);
answers question: http://stackoverflow.com/q/26353839
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41407587
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26375791
has text: Please format your post properly. http://stackoverflow.com/help/how-to-ask

http://stackoverflow.com/comment/41573303
has text: @ПечальныйМир edit your question, and put the PHP codes also, i'd like to see how you are generating those data
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26467442
type: Comment

http://stackoverflow.com/q/26465062
answer count: 1
has title: crossrider extension installed on all browsers but working only in chrome
favorite count: 0
has answer: http://stackoverflow.com/a/26471057
tagged with: crossrider
downvote count: 1
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/26471057
type: Question
tagged with: javascript
has body: I have successfully installed the my crossrider extension on Chrome, Firefox and IE (all up to date) but the browser button (although enabled on all) only works for Chrome. Background code seems to work, since I can trigger alerts. My background.js looks like this: appAPI.ready(function() { var popupDims = { CH: {height: 400, width: 400}, FF: {height: 400, width: 400}, IE: {height: 400, width: 400}, SF: {height: 400, width: 400} }; if ("CHFFIESF".indexOf(appAPI.platform) !== -1) { appAPI.browserAction.setPopup({ resourcePath:'popup.html', height:popupDims[appAPI.platform].height, width:popupDims[appAPI.platform].width }); } else { alert('This extension is not supported on your browser'); }}); In my popup.html I have some javascript: function crossriderMain($) { // load libraries eval(appAPI.resources.get('select2.js')); $('[as-trigger]').click(function () { // retrieves the information for the active tab appAPI.tabs.getActive(function(tabInfo) { activeUrl = tabInfo.tabUrl; appAPI.request.get({ url: 'http://...', onSuccess: function(response, additionalInfo) { // show message }, onFailure: function(httpCode) { console.log('GET:: Request failed. HTTP Code: ' + httpCode); } }); }); }) $('[as-project-dropdown]').select2().on('select2-selecting', function (e) { // some jquery code }); appAPI.request.get({ url: 'http://...', onSuccess: function(response, additionalInfo) { var dataObject = JSON.parse(response); $.each(dataObject.data, function(key, value) { $('[as-project-list]').append('some html...'); }); $('[as-companyname]').html(dataObject.company); }, onFailure: function(httpCode) { console.log('GET:: Request failed. HTTP Code: ' + httpCode); } });} And in my firefox console I can see an error thrown by my extension: MyExtension &lt;Warning: document.getElementById(...) is null Function-name: appAPI.request.get User callback&gt; @Crossrider support: my app id is 65982
score: 0
tagged with: firefox-addon
tagged with: google-chrome-extension

http://stackoverflow.com/comment/41549978
has text: Which version of jQuery are you using?
score: 0
comment on: http://stackoverflow.com/q/26454540
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41565918
has text: can you tell me why this is happening , and why mine not working.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26463754

http://stackoverflow.com/comment/41577862
score: 0
type: Comment
type: QuestionComment
has text: Automatically when its activated
comment on: http://stackoverflow.com/q/26469996

http://stackoverflow.com/comment/41406796
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26375309
has text: I recommend to use console.log() instead of alert for debugging

http://stackoverflow.com/a/26503172
has comment: http://stackoverflow.com/comment/41638326
accepted answer of: http://stackoverflow.com/q/26502895
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26502895
type: AcceptedAnswer
has body: Your question is of mathematics nature - combinations and permutations. You are actually asking the number of possible permutation for string length 7. The formula is factorial(numOfchar). In this case 7! = 7x6x5x4x3x2x1 = 5040. public static void main(String[] args) { String str = "ABCDEFH"; System.out.println("Number of permutations for " + str + " is : " + factorial(str.length())); } public static int factorial(int n) { if (n == 0) return 1; int result = factorial(n-1)*n; return result; } Program Output: Number of permutations for ABCDEFH is : 5040 Since you tagged Java, this is one way you can get the it done with Java.

http://stackoverflow.com/comment/41393821
score: 0
type: Comment
type: QuestionComment
has text: yes, I checked the console, I put alerts everywhere and the alert(result) gives me all the DIVS that are being created.. its containing it. the problem is I dont know how to extract them.
comment on: http://stackoverflow.com/q/26368095

http://stackoverflow.com/comment/41615093
score: 0
comment on: http://stackoverflow.com/q/26490508
has text: Can you just set the textarea to use a monospaced font? Then your method would likely work. Edit: [here's how](http://stackoverflow.com/questions/2032652/how-do-i-get-an-html-text-area-with-monospaced-text-using-css).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41535194
has text: @net.uk.sweet Yes. This is the exact format. Only content inside the brackets changes. Assume there won't be any square brackets in the Blah content.
type: QuestionComment
comment on: http://stackoverflow.com/q/26446298
score: 0
type: Comment

http://stackoverflow.com/q/26420349
type: Question
has body: I use a plugin call http://www.skitter-slider.net/ with jquery and I meet a problem: I want to rewrite the default img css style: .box_skitter .box_clone img { position: absolute; top: 0; left: 0; z-index: 20; } but I can't rewrite by the element class, id, etc.. $('.box_skitter .box_clone img').css({'width':w+'px','height':h+'px'}); because the plugin will create the img element dynamically, means It's no effect that I set the height, width for the element img so what's the solution?
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41486852
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41486945
has answer: http://stackoverflow.com/a/26420723
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41486825
tagged with: css
has title: how to rewrite the css rule without the element in jquery?

http://stackoverflow.com/comment/41563893
comment on: http://stackoverflow.com/q/26462518
type: Comment
type: QuestionComment
has text: an RGB color consists of 3 color channels: R (0-255), G (0-255), B (0-255). So you could just do: `RGB(quantity & 255, (quantity >> 8) & 255, (quantity >> 16) & 255)` and you have a function for calculating a color between 0 and 16581375. Apply that knowledge to your values and coming up with a function for it is easy
score: 0

http://stackoverflow.com/a/26411139
score: 1
answers question: http://stackoverflow.com/q/26410304
upvote count: 1
type: Answer
has body: You can simply put a JavaScript play inside a function and call it when required, like this: function PlayDing(){ var audio1 = new Audio('correct.mp3'); audio1.play(); } function PlayCross(){ var audio2 = new Audio('incorrect.mp3'); audio2.play(); }
downvote count: 0

http://stackoverflow.com/a/26391193
has comment: http://stackoverflow.com/comment/41435876
has comment: http://stackoverflow.com/comment/41439964
has body: What you're trying to do is basically doomed to fail. This line: navslide1 = $('nav.slide ul li:nth-child(1) a.mobile-nav-hover'); creates a jQuery object that includes all the elements in the DOM that match the selector at the point that the code is executed. If that's before you've added the class "mobile-nav-hover" to any element, then it'll be empty. What you probably want to do is use delegated event handling. Make that variable just be the selector string: navslide1 = 'nav.slide ul li:nth-child(1) a.mobile-nav-hover'; Then: $("body").on('touchstart click', navslide1, function() { $(navslide1).css({ "background-color": "#ffffff", "color": "#000000" }); }).on('touchend click', navslide1, function() { setTimeout(function() { $(navslide1).css({ "background-color": "transparent", "color": "#ffffff" }); }, 120); }); You can do that outside the useragent test, if you want to, and just have the test add the class. The whole thing might get a lot simpler if you used Modernizr or something to detect the availability of touch events. (Note that your current check wouldn't account for the many Windows-based PCs and tablets with touch screens.) If you do that, then you don't have to check anything, and you don't have to add any classes; you can just prefix any selector string with ".touch" to make sure they only take effect on touch-enabled clients, or ".no-touch" on non-touch-enabled clients.
upvote count: 2
has comment: http://stackoverflow.com/comment/41436136
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41435851
has comment: http://stackoverflow.com/comment/41435908
answers question: http://stackoverflow.com/q/26390925
type: Answer
accepted answer of: http://stackoverflow.com/q/26390925
score: 2
has comment: http://stackoverflow.com/comment/41439580
downvote count: 0
has comment: http://stackoverflow.com/comment/41436145

http://stackoverflow.com/comment/41648968
score: 0
comment on: http://stackoverflow.com/a/26509212
has text: I'm trying haha but i have to wait 3 more minutes??
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41472763
comment on: http://stackoverflow.com/a/26412248
has text: @Dorvalla my logout script was setting `$user_id = $_SESSION["id"]` whereas the timeout script was setting `$user = $_SESSION["id"]` while the SQL was trying to match the `user_id` field to `$user_id` in both scripts
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/26487078
answer count: 1
has comment: http://stackoverflow.com/comment/41611248
has comment: http://stackoverflow.com/comment/41608372
accepted answer: http://stackoverflow.com/a/26487127
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: Question
tagged with: regex
has body: I have a validation to allow only alphabets and characters. No special characters are allowed. But i need to allow one value like 'No Access'. How can i do this? var filter = /^(?=.*\d+.*)(?=.*[a-zA-Z]+.*)[\da-zA-Z]{6,}$/; var pass = String(name).search(filter) != -1; name is the value of the textbox.
has answer: http://stackoverflow.com/a/26487127
has title: Regex Validation should allow particular value
upvote count: 1

http://stackoverflow.com/comment/41442789
has text: Remove event listener...WHY did I not think of that? lol. Thank you!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26395336

http://stackoverflow.com/comment/41483225
score: 0
has text: ok i posted the full code of both pages.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26418153

http://stackoverflow.com/comment/117689701
comment on: http://stackoverflow.com/q/26507641
has text: I think it's generally a bad idea to filter emojis from a text field, we allow them in everything now a days -- file names, anything you can think of -- I wouldn't be surprised if they started popping up actual person names in the next couple of decades.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26390037
score: 1
has comment: http://stackoverflow.com/comment/41433454
has comment: http://stackoverflow.com/comment/41433795
has body: Try the following: preg_replace("/([\x{d800}-\x{dbff}])([\x{dc00}-\x{dfff}])/u", "emoji", $strText); PCRE doesn't support the \uXXXX format, so you can use \x{XXXX} instead. Also you'll need the u modifier (at end of regex) for dealing with UTF-8 Information on syntax from http://www.regular-expressions.info/unicode.html Perl and PCRE do not support the \uFFFF syntax. They use \x{FFFF} instead. Information on u modifier from http://php.net/manual/en/reference.pcre.pattern.modifiers.php u (PCRE_UTF8) This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern and subject strings are treated as UTF-8. This modifier is available from PHP 4.1.0 or greater on Unix and from PHP 4.2.3 on win32. UTF-8 validity of the pattern and the subject is checked since PHP 4.3.5. An invalid subject will cause the preg_* function to match nothing; an invalid pattern will trigger an error of level E_WARNING. Five and six octet UTF-8 sequences are regarded as invalid since PHP 5.3.4 (resp. PCRE 7.3 2007-08-28); formerly those have been regarded as valid UTF-8.
has comment: http://stackoverflow.com/comment/41433528
upvote count: 1
answers question: http://stackoverflow.com/q/26389545
type: Answer
downvote count: 0

http://stackoverflow.com/a/26392168
type: Answer
has body: This was a red herring; the URL was wrong but the log file mentioned a missing template so I was focused in the wrong direction. I had to get a custom redirection piece of code from one of the developers on this project and I have it working now.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26391208
upvote count: 1

ios
tags question: http://stackoverflow.com/q/26419086
tags question: http://stackoverflow.com/q/26471526
type: Tag
tags question: http://stackoverflow.com/q/26419135
tags question: http://stackoverflow.com/q/26407488
tags question: http://stackoverflow.com/q/26502455
tags question: http://stackoverflow.com/q/26412336
tags question: http://stackoverflow.com/q/26433968
tags question: http://stackoverflow.com/q/26439843
tags question: http://stackoverflow.com/q/26379687
tags question: http://stackoverflow.com/q/26438990
tags question: http://stackoverflow.com/q/26482480
tags question: http://stackoverflow.com/q/26401355
tags question: http://stackoverflow.com/q/26411091
tag name: ios
tags question: http://stackoverflow.com/q/26424432
tags question: http://stackoverflow.com/q/26483541
tags question: http://stackoverflow.com/q/26456060
tags question: http://stackoverflow.com/q/26499785
tags question: http://stackoverflow.com/q/26508724
tags question: http://stackoverflow.com/q/26508535
tags question: http://stackoverflow.com/q/26439902
tags question: http://stackoverflow.com/q/26509872
tags question: http://stackoverflow.com/q/26412104
tags question: http://stackoverflow.com/q/26371878
tags question: http://stackoverflow.com/q/26428637
tags question: http://stackoverflow.com/q/26458050
tags question: http://stackoverflow.com/q/26434265
tags question: http://stackoverflow.com/q/26410066
tags question: http://stackoverflow.com/q/26401037
tags question: http://stackoverflow.com/q/26476653
tags question: http://stackoverflow.com/q/26392725
tags question: http://stackoverflow.com/q/26480121

http://stackoverflow.com/comment/41609794
comment on: http://stackoverflow.com/q/26487804
has text: possible answer: http://stackoverflow.com/questions/3390396/how-to-check-for-undefined-in-javascript
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41559719
has text: ok, i show my all angularjs code
comment on: http://stackoverflow.com/q/26459708
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41407239
comment on: http://stackoverflow.com/a/26361620
type: AnswerComment
score: 0
type: Comment
has text: It's because you input has weird new lines and spaces. it's easy to fix the function to remove leading white spaces though.

http://stackoverflow.com/q/26490919
type: Question
has comment: http://stackoverflow.com/comment/41616536
tagged with: javascript
score: 0
answer count: 2
has title: How to control an Iframes site with buttons and links?
tagged with: jquery
has answer: http://stackoverflow.com/a/26491764
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26491034
tagged with: php
has body: I have an iframe and i want to navigate through a list of external websites with some previous and next buttons however i wanted to have the links visible as well on a sidebar so when clicked it automatically goes to that site in the iframe. I previously had tried some php with ajax and also just regular javascript/jquery with onclick events etc and thought this would be a fairly task easy however so far i have not been able to get this working correctly. The current html for the page i need this on is: &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="author" content=""&gt; &lt;link rel="icon" href="resources/favicon.ico"&gt; &lt;title&gt;Site Browser&lt;/title&gt; &lt;!-- Bootstrap core CSS --&gt; &lt;link href="css/bootstrap.min.css" rel="stylesheet"&gt; &lt;!-- Custom styles for this template --&gt; &lt;link href="css/dashboard.css" rel="stylesheet"&gt; &lt;style type="text/css"&gt; body,html,.main-display-area,.col-md-10 { height:100%; } .myframe { width: 100%; height: 100%; position:absolute;" } .frame-container { padding-left: 0px; padding-top: 0px; } &lt;/style&gt; &lt;!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --&gt; &lt;!--[if lt IE 9]&gt; &lt;script src="js/html5shiv.min.js"&gt;&lt;/script&gt; &lt;script src="js/respond.min.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; &lt;/head&gt; &lt;body&gt; &lt;nav class="navbar navbar-default navbar-fixed-top" role="navigation"&gt; &lt;div class="container-fluid"&gt; &lt;div class="navbar-header"&gt; &lt;a class="navbar-brand" href="#"&gt;Site Browser&lt;/a&gt; &lt;/div&gt; &lt;div&gt; &lt;form class="navbar-form navbar-right" id="navForm" method="post" action="/"&gt; &lt;div class="form-group"&gt; &lt;input value="&lt; Previous" id="previous" class="btn btn-s…
type: UnansweredQuestion
tagged with: iframe

http://stackoverflow.com/comment/41530775
type: AnswerComment
has text: what happens to value, if they were assigned by using `Uint32` but read from the same buffer using `Uint8`?
type: Comment
comment on: http://stackoverflow.com/a/26443432
score: 0

http://stackoverflow.com/q/26442726
downvote count: 4
has comment: http://stackoverflow.com/comment/41528625
answer count: 2
accepted answer: http://stackoverflow.com/a/26442830
has body: When trying to get false for NaN I am also ruining negative numbers -0.2|0 //this will always return zero If the number is negative What I wanted to do was a bitwize inline as quick as possible asking as little as I can as I am setting the answer into an array at the same time as I am asking. array[i]=(sum)|0 my sum sometimes will produce NaN Ok, to make my question clearer and get to the root... why is -0.2 false when -1 is not? -0.2 is not zero! zero is false but -0.2 is less than zero -0.2!==0
has comment: http://stackoverflow.com/comment/41528561
tagged with: nan
favorite count: 0
has title: How not to ruin negative numbers NaN|0
has comment: http://stackoverflow.com/comment/41528545
score: -3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41528567
has comment: http://stackoverflow.com/comment/41528500
has answer: http://stackoverflow.com/a/26442830
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26443845
has answer: http://stackoverflow.com/a/26443845
has comment: http://stackoverflow.com/comment/41528532
tagged with: javascript

http://stackoverflow.com/a/26481627
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26476527
has body: Your client side JS code looks fine. The problem is with your server side code. In the /signin POST request function you are not giving any response(You are just logging it in the console). That is why your client side JS code does not get any kind of response to process whether it is "success" or "failure". That is why after trying for a lot of times, it finally goes into "always". The always function is executed either in an event of server timeout or situations where there is no response. Try returning a response from your signin function. You could do this by using the ".json" method provided by the "res" parameter that you are passing to your request function. Like this: app.route('/signin') .get(function(req, res, next) { res.render('signin.html',{}); }) .post(function(req, res, next) { if (req.body.email) { console.log(req.body.username + req.body.email + req.body.pass); res.json("Success"); } else { console.log('not ok') res.json("Error"); } }); Or anything else that you want to return from the server.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26476527

http://stackoverflow.com/a/26368597
has body: Your code works perfect. Just add some value to div's. Like Hello a b c Are your divs empty?
has comment: http://stackoverflow.com/comment/41398000
has comment: http://stackoverflow.com/comment/41395238
has comment: http://stackoverflow.com/comment/41394847
answers question: http://stackoverflow.com/q/26367830
type: Answer
has comment: http://stackoverflow.com/comment/41397032
has comment: http://stackoverflow.com/comment/41394610
has comment: http://stackoverflow.com/comment/41396993
score: 0

http://stackoverflow.com/a/41182141
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26408635
has body: You have different ways to achieve it, it depends if your spelling has to be focused on a subject (like medical word spelling) or is it general. Create yourself a dictionary (not the best choice and too long to make) make a query to online dictionaries like google try Jspell Evolution (the installation is a little annoying but once done it works very well Jspell Evolution website you can look at typo.js typo.js article Yesterday I found this article that is 10 times better than the others : Article for javascript spell check locales where you can also have spelling for other languages/locales and not only english locale.
upvote count: 1
type: Answer

http://stackoverflow.com/a/26458646
type: Answer
has body: Javascript Calculator Add Sub Multi Div
answers question: http://stackoverflow.com/q/26458544
score: 0

http://stackoverflow.com/q/26454048
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jQuery handler not being called on form submit
favorite count: 0
has body: My code to call a jquery function when a form is submitted is never being called. I've checked the format of the code over and over again, and everything seems in order. Any clue how to fix this? Thanks HTML: Study Name Study Description Number of Participants jQuery:
has answer: http://stackoverflow.com/a/26454067
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26454067
score: -1

http://stackoverflow.com/comment/41572923
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26463238
has text: It seems to be a little difficult... if i have 100 author, this solution will become a trouble

http://stackoverflow.com/q/26436684
tagged with: javascript
downvote count: 5
has comment: http://stackoverflow.com/comment/41517934
has answer: http://stackoverflow.com/a/26436748
type: AnsweredQuestion
upvote count: 0
score: -5
favorite count: 0
type: Question
has title: Regular expression for "At least 8 Characters long include at least one letter and one numeric"
has comment: http://stackoverflow.com/comment/41518404
answer count: 1
accepted answer: http://stackoverflow.com/a/26436748
has comment: http://stackoverflow.com/comment/41517903
has body: Regular expression for "At least 8 Characters long include at least one letter and one numeric" using javascript. and string can have special characters .
linked to: http://stackoverflow.com/q/7684815
has comment: http://stackoverflow.com/comment/41517960

http://stackoverflow.com/q/26488179
downvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41611062
favorite count: 0
has comment: http://stackoverflow.com/comment/41611042
has answer: http://stackoverflow.com/a/26491157
type: UnansweredQuestion
has body: When page gets any way of movement - window resizing, scrolling, hover, images used as icons does re-render and makes sides ruff, its very well seen on images with transparent background and circular border (like in example), is there any way to fix that? Example &lt;body&gt; &lt;style&gt; body{ background: black; } img{ max-width: 5vw; transition: 1s ease; } img:hover{ max-width: 6vw; } &lt;/style&gt; &lt;img src="http://www.iconsdb.com/icons/preview/white/whatsapp-xxl.png"&gt; &lt;/body&gt; in this case when hovered, image will appear with sharp borders, some may say pixelated, and after some miliseconds it will go back to smooth borders, here is a fiddle for you - http://jsfiddle.net/o3qk5uaL/
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/9986226
upvote count: 3
has title: Images losing quality for second when interacting with page
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/72609307
score: 3

http://stackoverflow.com/comment/41562557
has text: @JoachimPileborg Changed the URL. Thanks for the hint, I pasted the wrong one before.
comment on: http://stackoverflow.com/q/26461725
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26458529
tagged with: javascript
score: 0
has title: What's the disadvantage of creating prototype methods inside the object?
possible better answer: http://stackoverflow.com/a/26458547
has answer: http://stackoverflow.com/a/26458688
has answer: http://stackoverflow.com/a/26458547
type: AnsweredQuestion
has body: I have seen people take two approaches when they create javascript objects, they sometimes define the prototype functions outside the main object and sometimes they do it inside. Defining the prototype functions inside the object has the advantage of using private variables and functions, what's the advantage of defining it outside? function something (params) { this.name = params.name; this.color = params.color; _someprivatefunction = function () {}; something.prototype.publicFunction = function () {_someprivatefunction() }; } As opposed to: function something (params) { this.name = params.name; this.color = params.color; _someprivatefunction = function () {}; } something.prototype.publicFunction = function () {//can't call the private function here }; EDIT: as suggested in the comments down below, this is a third option (but the problem with this is now the private function cant access any of the private variables inside the constructor.) (function () { function something (params) { this.name = params.name; this.color = params.color; } _someprivatefunction = function () {}; something.prototype.publicFunction = function () {_someprivatefunction() }; }());
has comment: http://stackoverflow.com/comment/41556967
accepted answer: http://stackoverflow.com/a/26458688
type: Question
has comment: http://stackoverflow.com/comment/41559865
answer count: 2

http://stackoverflow.com/a/26411440
type: Answer
answers question: http://stackoverflow.com/q/26411332
score: 0
has comment: http://stackoverflow.com/comment/41490672
has body: The real question is, what's the point of the second drop down box. Why dont you just display all of the movies in a "table" once they've selected the actor. I'd suggest a unified "Search" box, and on the PHP side, querying both your movies and actors, displaying all results that way? If they choose a autoComplete value that is of type actor, display all the actor's movies. If they select an autoComplete value that is of type "movie" - display all the movies. Effectivly - you're eliminating the By Actor or By Movie radio in favor of a better search bar.

http://stackoverflow.com/q/26489805
tagged with: jsf
has body: I have this text in my JSF bean: "\\name" On JSF page it looks like this: "\name" Now, I want pass this string to the javascript function function showAlert(name) { alert(name); } &lt;h:commandLink onclick="showAlert(#{myData.name})"&gt; &lt;h:outputText value="#{myData.name}"/&gt; &lt;/h:commandLink&gt; However in firebug console I get error, which says that : SyntaxError: illegal character var a=function(){showAlert(\\name);};var b=function... What is wrong with this code? One backslash escapes other backslash, however I still get this error. How can I fix this?
has comment: http://stackoverflow.com/comment/41615665
type: Question
has title: JSF 1.2 text to Javascript text. How to escape backslashes
has comment: http://stackoverflow.com/comment/41616589
tagged with: javascript
has comment: http://stackoverflow.com/comment/41617942
tagged with: jsf-1.2
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26494659
accepted answer: http://stackoverflow.com/a/26494659
type: AnsweredQuestion

http://stackoverflow.com/comment/42714513
type: Comment
has text: how can make work this without `JQuery` because the above example works with only `jQuery` but i don't use `jquery` form my page for this one method i need to add `jquery` is there any way to work without use of jQuery
score: 0
comment on: http://stackoverflow.com/a/26375464
type: AnswerComment

http://stackoverflow.com/q/26440870
possible better answer: http://stackoverflow.com/a/26441014
has answer: http://stackoverflow.com/a/26441012
has answer: http://stackoverflow.com/a/26441014
type: AnsweredQuestion
score: 3
tagged with: syntax
upvote count: 3
has body: &gt; a = ["key","value"] ["key", "value"] &gt; o = {a[0]:a[1]} SyntaxError: Unexpected token [ But this is OK &gt; o = {} Object {} &gt; o[a[0]] = a[1]; "value" &gt; o Object {key: "value"} browser version: Chrome 37.0.2062.124 m Why Syntax error ? Dose here introduce a new context ? I don't familiar the ECMA spec.
type: Question
tagged with: object
accepted answer: http://stackoverflow.com/a/26441012
tagged with: arrays
tagged with: javascript
has title: javascript how initialize object use array
has answer: http://stackoverflow.com/a/32077391
answer count: 3
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26458501
has comment: http://stackoverflow.com/comment/41556926
score: 1
type: Question
tagged with: textarea
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I've seen a number of solutions to 'printing a div' or 'printing an area of a page' but not one that addresses the problem I'm having: I've tried the following javascript function: var mywindow = window.open('', 'my div', 'height=400,width=600');mywindow.document.write(' my div '); mywindow.document.write(' '); mywindow.document.write($('.page').html()); mywindow.document.write(' '); mywindow.print(); mywindow.close(); And that displays all the page elements, but NOT any text input in the textarea elements. Likewise I've used the printThis jQuery plugin: $('.page').printThis(); But that, similarly, includes the bounding boxes of the textareas, but NOT any text that might be inside them. Is there some way to ensure text in a textarea element is sent to the printer too?
has comment: http://stackoverflow.com/comment/41556975
tagged with: printing
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has title: Printing a textarea element with text included
answer count: 0

http://stackoverflow.com/a/26485875
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41608329
downvote count: 0
has comment: http://stackoverflow.com/comment/102299908
has body: An alternative: var a = [2,3,2], result = []; for(var i = 0; i &lt; a.length; i++){ if(getAllIndexes(a, a[i]).length === 1) result.push(a[i]); } console.log(result); function getAllIndexes(arr, val) { var indexes = [], i = -1; while (~(i = arr.indexOf(val, i+1))) indexes.push(i); return indexes; }
has comment: http://stackoverflow.com/comment/41606306
type: Answer
answers question: http://stackoverflow.com/q/26485588

http://stackoverflow.com/q/26498825
has title: Is it possible to get values before elements exist in the DOM
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/26498868
has body: I've got some tabs on a site, and when a tab is clicked I'd like to hide a Load more button if that tab does not contain any data. To do this I wanted to check the value being returned before it actually exists in the DOM. My code looks something like: $(document).ready(function() { $('#tabs li').click(function(event){ var id = 1; var tab_id = 2; $(".l").load("show.php?id="+id, {"tab_id": tab_id}); var load = ($("show.php?id="+id, {"tab_id": tab_id})).val(); alert(load); }); }) The idea being that if variable load is not null the show the Load more button, if it is null then hide the load button. I'm sure I'm not taking the best approach, any suggestions would be most welcome.
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41630309
has comment: http://stackoverflow.com/comment/41630333
has answer: http://stackoverflow.com/a/26498879
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/112976530
type: Comment
score: 1
has text: what's the catch with this website, unlimited free? they don't list any paid add-ons either
comment on: http://stackoverflow.com/a/36494235
type: AnswerComment

postgresql
tags question: http://stackoverflow.com/q/26421109
tag name: postgresql
type: Tag

http://stackoverflow.com/q/26504641
tagged with: javascript
score: 0
has body: I am trying to add this code in Sencha Touch, but it´s not working.. items: [ { xtype: 'label', tpl: [' {[c.Text.getText("SC_ORDER_A_TOTAL_NET_AMOUNT")]} ' + ' {netamount} ' + ' {lightvalue} '].join() } ] Maybe, it´s not possible to do this.. any clue? I need to configure different labels with different hidden option, sometimes it´s true and sometimes it´s false.
answer count: 1
tagged with: sencha-touch
tagged with: extjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26508732
has title: tpl inside of Items[] on Sencha Touch 2
type: Question

http://stackoverflow.com/comment/41506168
score: 1
comment on: http://stackoverflow.com/a/26429440
type: AnswerComment
has text: Until today, I didn't realize there was any FUD. In any case, this document may help. It's quite readable as far as language specs go. http://www.typescriptlang.org/Content/TypeScript%20Language%20Specification.pdf
type: Comment

http://stackoverflow.com/q/26374487
score: 2
answer count: 0
type: Question
has title: Angular html5 mode to work with gh-pages hosting for SEO
tagged with: github-pages
tagged with: javascript
upvote count: 2
has body: I'm using Angular and Firebase for SPA. How do we get html5 mode to work with gh-pages so the dynamic bits of the site are crawled and indexed? I've set html5 mode using $location and set the base url to '/'. Also included &lt;meta name="fragment" content="!" /&gt; in the index.html This works but returns a cannot get /whatever when reloading the page it's on. Some posts point to rewriting the url on the web server but we can't do this with gh-pages. Is there another way to make sure the site's dynamic content gets crawled? I don't care about pretty urls but the site's seo strategy includes adding articles so it would be a big hassle to make static pages just for the crawlers. Site is at Forging Technology Struggling with this last bit to complete the project. Thanks in advance! EDIT: Using the resolve property with a deferred promise in routing does the trick, except to get the firebase data $scope'd takes a 2000ms $timeout in the controller. Unfortunately, the $timeout makes google still crawl and index a page without data..
tagged with: seo
downvote count: 0
tagged with: github
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/41499590
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26426998
has text: Thanks but there isn't a set value for these fields. this is an example so fields 1 would be first name, field 2 last name, etc..

http://stackoverflow.com/comment/41369476
type: Comment
has text: I am sorry, I do not know much about Chrome. However, I searched it with google, it seems lots of programmers had encountered the same problem and they already found solutions. Please refer to http://stackoverflow.com/questions/17950598/using-iframe-with-local-files-in-chrome
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26354334

http://stackoverflow.com/comment/41449160
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26393371
has text: you'd better embed the code into the question text, so node.js experts can see it and help you. Also, outline what the problem is (e.g. you get an error or just the result you receive does not match what you think it should be - then specify, what the expected vs actual difference is)
score: 0

http://stackoverflow.com/comment/41442824
type: AnswerComment
has text: It does work on my example, maybe your removeStyle function is doing something wrong? Check that example: http://jsfiddle.net/floribon/kLrc2Ltr/
comment on: http://stackoverflow.com/a/26393474
type: Comment
score: 0

http://stackoverflow.com/comment/41544081
has text: *"I think I've loaded the jquery and breakpoints.js already"* - Can't you just open browser console and ensure it they are loaded or not..?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26451183
score: 0

http://stackoverflow.com/comment/41467359
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/26409462
has text: This will also match 234
type: Comment

http://stackoverflow.com/comment/41583765
has text: @Sam, I would have to know the exact relationships between the ~3 pages, (sub)domains, snippets?, independent UA accounts(?) to know what would happen as far as using them in a funnel. But if you are trying to limit the goal to specific source links, you should be able to just add another parameter as long as your login ignores them, i.e. `/login?demo=1&campaign=hubspot1` You could also do this 'properly' with the utm campaign builder but that will blow away existing source information which is a bad idea if this is advertising across subdomains of your own site?
type: Comment
comment on: http://stackoverflow.com/a/26424568
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41507728
type: QuestionComment
has text: Okay thank you.. I was just exploring options. I thought of something like this but didn't find anything.
comment on: http://stackoverflow.com/q/26431186
score: 0
type: Comment

http://stackoverflow.com/comment/41494034
type: Comment
type: QuestionComment
has text: your above sample code with `r` will create duplicate `_id`, are you sure this is the case?
comment on: http://stackoverflow.com/q/26424316
score: 0

http://stackoverflow.com/q/26470877
has body: I have some difficulties to get the authentification workflow working. I tried JSO https://github.com/andreassolberg/jso/blob/master/README-getting-started.md here is my test code (ignore the login fields) Login login: password: I'm not sure if I've got the workflow right as every time I want to fetch data from the URL I need to give the authorisation to use api. I thought the first time I try to fetch data I need to authorize, but then I use token but it doesn't work this way with my code. Can somebody please give a good example how to use JSO, Hello.js or any other Javascript Client Code with FosOAuthServerBundle
type: Question
tagged with: hello.js
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Javascript Client for FOSOAuthServerBundle
tagged with: fosoauthserverbundle
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: oauth-2.0

http://stackoverflow.com/comment/41511019
type: QuestionComment
has text: Also what does "the same problem occurs when i move the rails app to the staging server" that have to do with anything you should specify the port.
comment on: http://stackoverflow.com/q/26433061
score: 0
type: Comment

http://stackoverflow.com/comment/41495023
has text: Serialize expects a `form` element and not a `div`. Change it to a form and it should work.
comment on: http://stackoverflow.com/q/26423521
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/41615604
type: Comment
type: QuestionComment
score: 0
has text: Here is a good place to start - http://www.codecademy.com/en/tracks/javascript
comment on: http://stackoverflow.com/q/26490823

http://stackoverflow.com/comment/41375607
type: Comment
type: QuestionComment
has text: @HendryTanaka: Is that going to be overkill?
comment on: http://stackoverflow.com/q/26358402
score: 0

http://stackoverflow.com/comment/41432486
score: 0
type: QuestionComment
has text: Those two subtleties are just things I noticed before getting into what can appear before the `@`, and whether you're breaking on the right `@`.
comment on: http://stackoverflow.com/q/26388648
type: Comment

http://stackoverflow.com/comment/41572420
type: Comment
has text: Hi, tried that and am still getting the li's loading twice on mobile. I think the issue is jquery mobile firing the script twice.
comment on: http://stackoverflow.com/a/26467054
type: AnswerComment
score: 0

http://stackoverflow.com/a/26398208
score: 0
type: Answer
has body: Not sure about your problem without more detail. Use below code to detect again: function supportCanvas() { /* maybe use code below for detail: var cvs = document.createElement('canvas'); alert(typeof cvs.getContext); // if support, output "function" */ return !!document.createElement('canvas').getContext; }
answers question: http://stackoverflow.com/q/26397904
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26397904

http://stackoverflow.com/comment/41592749
score: 6
comment on: http://stackoverflow.com/q/26477966
type: Comment
type: QuestionComment
has text: I'd suggest you not try to prevent entering 0 as the first digit. Just clean up any leading zeroes before you actually use the field. Remember you can get values into fields in ways other than just pressing keys such as copy/paste and drag/drop so trying to enforce things exactly from the keyboard doesn't keep you from having to clean up the value at the end anyway. Also, trying to block the paste function is just downright annoying. I hate sites that do that. There's no good reason to block it because it's my business how I provide the input, not yours.

http://stackoverflow.com/q/26384968
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26385151
accepted answer: http://stackoverflow.com/a/26385207
has answer: http://stackoverflow.com/a/26385151
has comment: http://stackoverflow.com/comment/41424128
type: Question
has comment: http://stackoverflow.com/comment/41424294
tagged with: pagination
has comment: http://stackoverflow.com/comment/41432424
tagged with: javascript
tagged with: grails
has body: I am looking for some technique which will get me started to do server side pagination on mouse scroll. I have a large data set which I want to load in chunks and later dynamically load more on mouse scroll but at the server side. I came across ngInfiniteScroll but this looks like client side. Is there any method that can help me get started with this ?
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26385207
has title: AngularJS Server side pagination on mouse scroll
has comment: http://stackoverflow.com/comment/41424005
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41432633
tagged with: infinite-scroll

http://stackoverflow.com/comment/41476255
type: Comment
score: 0
has text: I'm saying you essentially want `parent.remove()`, because `parent` is the `.vote` clicked, but you are adding HTML to it right before.
comment on: http://stackoverflow.com/q/26414079
type: QuestionComment

http://stackoverflow.com/q/26376101
favorite count: 0
type: AnsweredQuestion
has body: I am trying to plot a scatter graph using highcharts. I get the dates and value properly. The weird thing happening is that lets say I must have the graph plotted between 5th AUG to 25th OCT but it is plotting the data at 5th SEP to 25th NOV. It is jumping a whole month. Here is my code. var generate_scatter = function(data) { var range = [] for (a in data['response']){ receive_date = a.split("-"); temp = [Date.UTC(parseInt(receive_date[0]), parseInt(receive_date[1]), parseInt(receive_date[2])),data['response'][a]]; range.push(temp); } $('#container').highcharts({ chart: { type: 'scatter', zoomType: 'xy' }, title: { text: 'Number of packages received in the warehouse against time.' }, subtitle: { text: 'Source: MENAERP Database' }, xAxis: { type: 'datetime', dateTimeLabelFormats: { // don't display the dummy year month: '%e. %b', year: '%b' }, title: { text: 'Date' }, startOnTick: true, endOnTick: true, showLastLabel: true }, yAxis: { title: { enabled: true, text: 'Number of packages received in warehouse' } }, legend: { layout: 'vertical', align: 'left', verticalAlign: 'top', x: 100, y: 70, floating: true, backgroundColor: (Highcharts.theme &amp;&amp; Highcharts.theme.legendBackgroundColor) || '#FFFFFF', borderWidth: 1 }, plotOptions: { scatter: { marker: { radius: 5, states: { hover: { enabled: true, lineColor: 'rgb(100,100,100)' } } }, states: { hover: { marker: { enabled: false } } }, tooltip: { headerFormat: '&lt;b&gt;{series.name}&lt;/b&gt;&lt;br&gt;', pointFormat: '{point.x:%e. %b}: {point.y:.2f} Packages' } } }, series: [{ name: 'Packages', color: 'rgba(223, 83, 83, .5)', data : range }] }); }; I have checked all the dates in data they are correct. No error in the firebug console either. Whats wrong ? P.S: The range array looks like this after iteration. [[1411862400000,127],[1410393600000,162],[1412985600000,278],[1410912000000,147],[1410048000000,172],[1410825600000,177],[1414368000000,362],[1410220800000,180],[1411257600000,143],[1411171200000,324],[14117…
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41408447
score: 1
possible better answer: http://stackoverflow.com/a/26376827
has answer: http://stackoverflow.com/a/26376748
has answer: http://stackoverflow.com/a/26376827
has title: Highcharts jumping a whole month
answer count: 2
accepted answer: http://stackoverflow.com/a/26376748
tagged with: highcharts
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41408098

http://stackoverflow.com/q/26498318
tagged with: google-chrome
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41629852
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26499030
favorite count: 0
tagged with: repaint
has title: Repainting on google chrome lag and glitch
accepted answer: http://stackoverflow.com/a/26499030
tagged with: http://stackoverflow.com/tag/html
has body: On the page http://bit.ly/1t9P8jS, when we scoll down the page, the fixed menu background color glitch. This bug occurs only on Google Chrome. I change the Z-index, changed the .on('scroll') to a function on requestAnimationFrame, nothing repair it. You can scroll down where it has 10 logos and go over the menu, you will see it. What can cause this? Why it's only on google chrome? I never saw a background-color glitching like this. Thank you very much for your help!
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/41539801
type: AnswerComment
type: Comment
has text: Which OS? Which Chrome version? How do you change the system date? On my system (Linux+Chromium38) setting the date from command line with `date` works fine.
score: 0
comment on: http://stackoverflow.com/a/26448817

http://stackoverflow.com/q/26452146
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: dictionary
tagged with: node.js
has answer: http://stackoverflow.com/a/26452165
score: 2
type: AnsweredQuestion
upvote count: 2
has body: Attempting to build a dictionary using key that comes via function parameter. var progres_mark = function(progress_state) { var now = Date(); console.log({ progress_state : now }) } progres_mark("encode") Expected { 'encode': 'Sun Oct 19 2014 18:22:33 GMT+0300 (IDT)' } Actual { progress_state: 'Sun Oct 19 2014 18:22:33 GMT+0300 (IDT)' } What’s going on?
accepted answer: http://stackoverflow.com/a/26452165
type: Question
has title: Using function parameter value as dictionary key

http://stackoverflow.com/comment/41453338
type: QuestionComment
comment on: http://stackoverflow.com/q/26401105
type: Comment
has text: In the `MultiSelectList` I am not using the 3rd parameter which is a collection type, does this matter?
score: 0

http://stackoverflow.com/comment/41490592
type: Comment
type: QuestionComment
has text: I notice this: `app.controller` and `appServices.factory`. So are ur factory and controller in different module? If so, did you inject ur sevice properly?
comment on: http://stackoverflow.com/q/26421460
score: 0

http://stackoverflow.com/a/31071809
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26460369
has body: I encountered this exact issue. What I ended up doing was toggling a class that included display:block; when slidetoggle was complete. I don't know the reason, but mobile safari wipes out inlnie styles added by jQuery functions when the user scrolls. But it doesn't seem to wipe out classes added by jQuery. Mobile safari works in mysterious ways, and I'm equally curious as to why this is The code should be something like this: $("#button").click(function(){ $("nav").slideToggle(function(){ $("nav").toggleClass('iosfix'); }); }); Then in my css - .iosfix { display:block; } Hope that helps!

http://stackoverflow.com/a/26537868
has body: Here's a jsfiddle, with blue line visible. You can click inside and outside the circle, also try clicking below both endpoints. The green circle is just for esthetics (ie: replace it with a favourite pet picture :-) Tested to work in IE9, latest Chrome and FF (Oct 2014). Edit: Added drag function. The code below is the original fiddle. var s = Snap(400,400); var circleX = 100, circleY = 100, circleRadius = 57; var stroke_width = 20; var blueCircle = s.circle(circleX, circleY, circleRadius); var hcp = Math.Pi*circleRadius; // half circle perimeter = 179.0 //Arc Path var d='M 43,100 A 57,57 0 0 1 43,100'; var arcPath = s.path(d); arcPath.attr({ fill: "none", stroke: "red", "stroke-width": stroke_width }); // Line Path var L1 = s.path("M "+circleX+" "+circleY +"L 0 0"); blueCircle.attr({ fill: "none", stroke: "skyblue", "stroke-width": stroke_width, "stroke-dasharray": "0,179,179" }); var c1 = s.circle(0,0,5).attr({ fill: "none",stroke: "green" }); function OnMouseDown(evt) { var mouseY = Math.min(evt.clientY,100); // limit mouseY to 100 L1.attr({ d: "M "+circleX+" "+circleY +"L "+evt.clientX+" "+mouseY }); var totalLength = L1.getTotalLength(); if (totalLength &lt; circleRadius) { // smaller, extend line var ratio = circleRadius/totalLength; var x_len = evt.clientX + (evt.clientX - circleX)*ratio; var y_len = mouseY + (mouseY - circleY)*ratio; L1.attr({ d: "M "+circleX+" "+circleY +"L "+x_len+" "+y_len }); } var PAL = L1.getPointAtLength(circleRadius); c1.attr({ cx: PAL.x , cy: PAL.y }); draw_arc(PAL.x,PAL.y); } function draw_arc(endX,endY) { // Draw SVG arc // point starts on left at 43,100, // Arc Box height is 57,57 (radius) // Ends at (endX,endY) var newArc ='M 43,100 A 57,57 0 0 1 '+endX+','+endY; arcPath.attr({ 'd': newArc }); } document.onmousedown = OnMouseDown; &lt;script src='//cdnjs.cloudflare.com/ajax/libs/snap.svg/0.3.0/snap.svg-min.js'&gt;&lt;/script&gt;
has comment: http://stackoverflow.com/comment/41999373
upvote count: 1
has comment: http://stackoverflow.com/comment/41817080
score: 1
accepted answer of: http://stackoverflow.com/q/26499849
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26499849
type: Answer

http://stackoverflow.com/a/28060737
answers question: http://stackoverflow.com/q/26354593
score: 0
has body: JqGrid supports the pivot grid see below link http://www.trirand.com/jqgridwiki/doku.php?id=wiki:pivotsettings it loaded only once if you want to change the rows and column at runtime use GridUnload before creating and loading the grid. jqGrid GridUnload/ GridDestroy
type: Answer

http://stackoverflow.com/a/35961730
has body: On zTree v3.x, You need two things: 1) In settings, add a callback var setting = { ... callback: { onCheck: zTreeOnCheck } }; 2) ztreeOnCheck in the callback, you get with each check/unchek all selected nodes. Sample function zTreeOnCheck(event, treeId, treeNode) { var treeObj = $.fn.zTree.getZTreeObj("treeDemo"); var nodes = treeObj.getCheckedNodes(true); console.log(nodes); //Here are all of the selected nodes };
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26398667
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26398667
has comment: http://stackoverflow.com/comment/124936110
type: AcceptedAnswer

http://stackoverflow.com/q/26488002
favorite count: 0
tagged with: android
upvote count: 1
type: AnsweredQuestion
tagged with: android-webview
linked to: http://stackoverflow.com/q/8696489
score: 1
accepted answer: http://stackoverflow.com/a/26523528
type: Question
possible better answer: http://stackoverflow.com/a/26494009
has body: I am trying to develop a video app for the Amazon FireTV using the Amazon WebView component. I cannot make the videos play automatically and I have tried using the HTML5 video DOM properties and events and also setting the video tag property autoplay="autoplay". Here is the HTML code: Test player Your browser does not support Video rendering The Java code for initializing the WebView is as follows (in the onCreate method): this.wrapper = (AmazonWebView) findViewById(R.id.wrapper); factory.initializeWebView(this.wrapper, 0xFFFFFF, false, null); this.wrapper.setFocusable(false); // Never allow focus on the WebView because it blocks the Play/Pause, Fast Forward and Rewind buttons AmazonWebChromeClient webClient = new AmazonWebChromeClient(); this.wrapper.setWebChromeClient(webClient); // Needed in order to use the HTML5 element AmazonWebSettings browserSettings = this.wrapper.getSettings(); browserSettings.setPluginState(AmazonWebSettings.PluginState.ON); browserSettings.setJavaScriptEnabled(true); this.wrapper.addJavascriptInterface(new JSChannel(this.wrapper), "appChannel"); browserSettings.setUseWideViewPort(true); I have also set internet permissions and hardware acceleration in the manifest. Do I need to add something to the Java code in order for the videos to play automatically?
has answer: http://stackoverflow.com/a/26494009
tagged with: javascript
tagged with: html5-video
tagged with: amazon-fire-tv
answer count: 2
downvote count: 0
has title: HTML5 video not starting automatically in Amazon WebView
has answer: http://stackoverflow.com/a/26523528

http://stackoverflow.com/comment/41468557
comment on: http://stackoverflow.com/a/26409883
type: Comment
has text: Now I see what I was doing. You're right. The issue is the difference between calling sortChange('avgWords') and sortChange(avgWords). One looks for the property, the other looks for a function. All this time, and it was caused by two ''! Thanks.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41522829
type: QuestionComment
comment on: http://stackoverflow.com/q/26439449
has text: I want to set $scope.getUnsolvedTickets as the default filter but I want to be able to change filtering later from the sidebar.
score: 0
type: Comment

http://stackoverflow.com/comment/96280425
score: 0
comment on: http://stackoverflow.com/a/32235374
type: Comment
has text: The question is specific to ol.Feature
type: AnswerComment

http://stackoverflow.com/q/26493285
has comment: http://stackoverflow.com/comment/41620257
tagged with: javascript
has comment: http://stackoverflow.com/comment/41620204
has answer: http://stackoverflow.com/a/26493598
score: 0
linked to: http://stackoverflow.com/q/3767924
answer count: 1
tagged with: arrays
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41620197
has comment: http://stackoverflow.com/comment/41620290
has body: I am working on some project. I have used to javascript array to store and then send these value to server using the ajax call. I have create array like below: var item1 = "first value"; var item2 = 123; var item3 = "last ele "; var data = [item1, item2, item3]; console.log(data); The array elements are the mixture values, means int/string. Immediate after, I have tried to print array in the console but it says undefined. Does anyone know to resolve this? I have also tried to just initialize one array and print it. But that also not possible. AS: var data_array = [1, 2, 3]; console.log(data_array); Still it say "undefined".
upvote count: 2
type: UnansweredQuestion
downvote count: 2
tagged with: internet-explorer-10
has title: in IE 10 javascript array does not work
has comment: http://stackoverflow.com/comment/41620715
type: Question

http://stackoverflow.com/a/26502688
has comment: http://stackoverflow.com/comment/41638320
has body: Use JQuery to change the font weight. This can also be done in Javascript with a bit of editing. HTML: Example 1 Example 2 Example 3 JQuery: $( "#test" ).change(function() { $("#test").css("font-weight","800"); }); Link to JSFiddle
score: 0
has comment: http://stackoverflow.com/comment/41639717
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41638473
has comment: http://stackoverflow.com/comment/41637482
type: Answer
has comment: http://stackoverflow.com/comment/41641998
has comment: http://stackoverflow.com/comment/41641778
has comment: http://stackoverflow.com/comment/41641367
accepted answer of: http://stackoverflow.com/q/26502576
has comment: http://stackoverflow.com/comment/41637399
answers question: http://stackoverflow.com/q/26502576
has comment: http://stackoverflow.com/comment/41641452
has comment: http://stackoverflow.com/comment/41638059

atomic
type: Tag
tag name: atomic
tags question: http://stackoverflow.com/q/26400072

http://stackoverflow.com/comment/41386055
type: Comment
has text: Check the database hour. Sometimes the hour of your db is one hour behind... I've had that issue. Also you can look at individual docs. Just add one in the mongo console and the retrive it without filters, look at the timestamp
comment on: http://stackoverflow.com/q/26364229
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41559874
score: 1
comment on: http://stackoverflow.com/a/26459969
type: AnswerComment
type: Comment
has text: Works like a charm. I was sure i could use `split()` with regex but i never knew `match()` could work as well in junction with flags.

http://stackoverflow.com/comment/41626932
score: 0
type: Comment
type: QuestionComment
has text: Of course you're right about the ID's. Noob error. ;) As I said in one of the comments under Gregory's answer, I want the arrows to toggle the ` `'s inside `.single-item`, the `.slider-for` is taken care of by `.slider-nav` that I omitted in the example code. I quess my question was not clear, should have provided the whole code. Sorry about that.
comment on: http://stackoverflow.com/q/26494699

http://stackoverflow.com/q/26399074
type: Question
has title: Getting object Object error when Jquery call
has body: I am trying to call api through Jquery ajax.Here is my simple jquery code $(document).ready(function () { jQuery.support.cors = true; $.ajax({ url: 'http://[MyServername]/api/tracking/GetLocation?DeviceId=352136061098261', type: 'GET', dataType: 'json', contentType: 'application/json; charset=utf-8', success: function (data) { alert('success'); }, error: function (error) { alert('error'); } }); It directly moves to the error function and returns [object Object] error.
has comment: http://stackoverflow.com/comment/41448668
has answer: http://stackoverflow.com/a/26401493
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: asp.net-ajax
tagged with: asp.net-web-api
tagged with: javascript
linked to: http://stackoverflow.com/q/7852225
tagged with: jquery
has comment: http://stackoverflow.com/comment/41449424
favorite count: 0
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/41448918
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41449627
has comment: http://stackoverflow.com/comment/41448759

http://stackoverflow.com/comment/41482152
has text: yes .. `div.parent-list-workorder` is already exist in `body`. ANyways I tried your code but my `console.log` give me this error: `Uncaught SyntaxError: Unexpected token ILLEGAL.` in line 25 which is the `$(" `.
comment on: http://stackoverflow.com/a/26417522
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41629231
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26498006
has text: Yeah, looking at it again there is an issue with your collection since you call `fetch` during initialize. You need to add a listener event since fetch is async.
type: Comment

http://stackoverflow.com/q/26485638
has answer: http://stackoverflow.com/a/26487317
accepted answer: http://stackoverflow.com/a/26487317
has comment: http://stackoverflow.com/comment/41606214
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41605938
has body: Input: This script may take a while to run, especially on a busy podmaster. Generating Syslog TopN list on node for last 3 hours. Top 5 hosts for Day: Oct8 between 02:00:00 and 02:59:59 Rank Number of Alerts Host ---- ---------------- ---- 1 3124 aaa.ab.com 2 2294 bbb 3 2157 ccc 4 832 ddd 5 816 eee Top 5 hosts for Day: Oct8 between 01:00:00 and 01:59:59 Rank Number of Alerts Host ---- ---------------- ---- 1 5495 fff 2 2625 ggg 3 998 hhh 4 752 iii 5 741 jjj Top 5 hosts for Day: Oct8 between 00:00:00 and 00:59:59 Rank Number of Alerts Host ---- ---------------- ---- 1 2747 kkk 2 876 lll 3 780 mmm 4 724 nnn 5 309 ooo I have used the below regular expression to match this format. \s+1+\s+([\d]+)\s+([\w]+)[\S\s]*?\s+1+\s+([\d]+)\s+([\w]+)[\S\s]*?\s+1+\s+([\d]+)\s+([\w]+) the output for above expression is $2 = aaa.ab.com $4 = fff $5 = kkk But I need the regular expression to match the ranks rank 1 separately. Example output: $2 = aaa.ab.com $4 = fff $5 = kkk we have to write a regex to match both ab.com and ab.com not present cases. Please help me to sort it out.
tagged with: regex
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Get the host name with dot using regex
type: Question
has comment: http://stackoverflow.com/comment/41608009
tagged with: javascript

http://stackoverflow.com/comment/41448450
type: QuestionComment
comment on: http://stackoverflow.com/q/26395286
has text: Why would you want to use external code, if qooxdoo is shipped the fully featured [``DateField`` and ``DateChooser``](http://demo.qooxdoo.org/3.5.1/demobrowser/#widget~DateField.html)?
score: 0
type: Comment

pebble-watch
tags question: http://stackoverflow.com/q/26433309
tag name: pebble-watch
type: Tag

http://stackoverflow.com/a/26441656
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26438022
answers question: http://stackoverflow.com/q/26438022
has body: Cookie is available with websocket. Just login and store a session/cookie for the user as normal. The you will know who it is. Or, just send the cookie as the first message after connecting.
score: 0

http://stackoverflow.com/q/26450121
type: Question
has title: Select elements with empty spaces
tagged with: javascript
has answer: http://stackoverflow.com/a/26450189
possible better answer: http://stackoverflow.com/a/26450168
score: 0
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41541882
downvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41541770
has comment: http://stackoverflow.com/comment/41541765
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26450168
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41541844
has comment: http://stackoverflow.com/comment/41541768
has body: I have a button when clicked it hides all table rows with empty td elements however when my page renders I get some td elements that when I open them in firebug look like this: How can I select fields that have these invisible spaces in them ? For some reason tag acts like a block element example: &lt;b&gt;&lt;/b&gt; Will produce as is However &lt;b&gt; ........// This happens because I have if/else statements ........@if($value == '').. ........@endif.. ....&lt;/b&gt; All the ... turn into white space. Won't turn to &lt;b&gt;&lt;/b&gt; as one would expect same. Can I fix this with CSS or is there a way to select these fields with jQuery. element:empty wont work.
accepted answer: http://stackoverflow.com/a/26450189

http://stackoverflow.com/q/26364930
tagged with: javascript
score: -1
has title: Re-initializing Javascript array inside loop re-initializes it each time through the loop
has comment: http://stackoverflow.com/comment/41387522
favorite count: 0
has body: I wrote this code to create an array but if I check array at the iteration ending only contains the last element created. It should have 7 elements because the iteration happened 7 times. for (i = 0; i &lt; intersects[0].object.geometry.vertices.length; i++) { console.log(i);// print 7 times var dist=euclideanDistance(intersects[0].object.geometry.vertices[i], intersects[0].point); map = {v:intersects[0].object.geometry.vertices[i], d:dist}; var array=[]; array.push(map); } console.log(array); //only contains one last element
has answer: http://stackoverflow.com/a/26365074
type: AnsweredQuestion
downvote count: 1
possible better answer: http://stackoverflow.com/a/26365074
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26364967
accepted answer: http://stackoverflow.com/a/26364967
upvote count: 0
has comment: http://stackoverflow.com/comment/41387947

http://stackoverflow.com/comment/41523358
has text: See the addition to my answer showing how you can get the radian angle of the mouse vs any rectangle's centerpoint. Then just plug that angle into `context.rotate(theRadianAngle)`. Cheers!
comment on: http://stackoverflow.com/a/26408229
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41500390
type: AnswerComment
has text: Thanks for your answer. But i can use neither single liner code to apply plugin nor with a class.
type: Comment
comment on: http://stackoverflow.com/a/26427615
score: 0

http://stackoverflow.com/a/26400810
answers question: http://stackoverflow.com/q/26400768
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26400768
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
has body: Yes. You can do this through the change event on your .services_list1 element by using jQuery's next() method to select the next element: $('.services_list1').change(function() { // Add a class to .services_list2 $(this).next().addClass('newClass'); }); Demo In this demo, if you change the first select option, the second select will be given a new class and its styling will change. $('.services_list1').change(function() { // Add a class to .services_list2 $(this).next().addClass('newClass'); }); .newClass { background: #f00; } Change Me Select This Value 1 Value 2

http://stackoverflow.com/q/26397933
has body: I am running a placeholder over an input field on a login page. On android (4.3) it auto fills the user and password fields on page load. Using Javascript I am able to get the length of the autofilled user input but when I run the same function on the password input it returns 0. Even when I debug using Chrome Remote Debugging it show that the password input field is "" with a length = 0. Yet android chrome shows the password in the field. Is there anyway around this. I just need detect when the input field is not empty so I can hide the placeholder. $(document).ready(function(){ setTimeout(function () { alert($("#password").val().length); checkPlaceholder("#password"); }, 1000); }); function checkPlaceholder(x) { if($(x).val().length === 0){ $(x).parent().find(".input_placeholder").removeClass("placeholder_hide"); } else { $(x).parent().find(".input_placeholder").addClass("placeholder_hide"); } }
has comment: http://stackoverflow.com/comment/41446852
type: Question
score: 5
upvote count: 5
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: android
tagged with: autofill
favorite count: 0
type: UnansweredQuestion
has title: Password input field length = 0 on autofill (android chrome)
tagged with: google-chrome
has answer: http://stackoverflow.com/a/27021542

http://stackoverflow.com/a/52773201
upvote count: 1
has body: Compress your image using https://tinyjpg.com or https://tinypng.com. Always make sure your image is as losslessly compressed as possible, it will create a huge difference in loading time.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26452407

http://stackoverflow.com/comment/41648070
comment on: http://stackoverflow.com/a/26489317
score: 0
type: AnswerComment
type: Comment
has text: Hi Uporabnik003, thanks for your dedication. Unfortunately, this is not an alert box issue. I used them to replicate the main problem, but I'm not using them in my project (I'm using balloons/divs). Your solution is actually being used by me somewhere else in my project and is a good one, but not helpful in this case. I just updated the main description and I'm thinking now this to be a synchronism issue. Please have a look at the new project and try the Thread.Sleep with 5ms and 150ms. I guess you'll understand the problem. Thanks!

http://stackoverflow.com/comment/41642591
has text: Thanks for answering, I'm checking.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26505774

http://stackoverflow.com/a/26360805
has body: I have figured it out, I have put the .datepicker method after the complete function of ajax since I am populating the data from an ajax request. so instead of putting the .datepicker on .ready function. Here's the sample code I created: function GetInfo() { $.ajax({ type : "POST", url : "test", data : "{}", contentType : "application/x-www-form-urlencoded", dataType : "json", success : function(response) { }, complete : function(e) { $("#id-of-the-DOM-end-element") .datepicker( { minDate : new Date($("#id-of-the-DOM-start-element").val()), 'http://jqueryui.com/resources/demos/datepicker/images/calendar.gif' }); });
type: Answer
accepted answer of: http://stackoverflow.com/q/26359960
score: 0
answers question: http://stackoverflow.com/q/26359960
type: AcceptedAnswer

http://stackoverflow.com/comment/41444446
has text: Thanks, I've updated my question. Most of the solutions I've found talk about horizontal and vertical scaling, I haven't come across anything that describes the correct way to handle lots of session data.
score: 0
comment on: http://stackoverflow.com/q/26396320
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41581661
has text: possible duplicate of [jquery: fade css background image change](http://stackoverflow.com/questions/5002351/jquery-fade-css-background-image-change)
comment on: http://stackoverflow.com/q/26472082
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26467711
has answer: http://stackoverflow.com/a/26467863
accepted answer: http://stackoverflow.com/a/26467863
type: AnsweredQuestion
has title: I want a certain div show up/be selected when all other divs aren't showing/selected - jQuery
score: 1
tagged with: hide
tagged with: toggle
has body: I want to know how I can show a certain div, when all other divs aren't showing anymore. I've tried toggle, but that create a mess. I've used Hide, but after it is hidden it don't show anymore. I recommend you to watch my fiddle then you'll know what I mean. HTML: 1 2 3 1 2 3 "I WANT THIS DIV GONE EVERYTIME I LET DIV 1, 2 OR 3 SHOW BY CLICKING THE BUTTONS. BUT SHOW UP AGAIN WHEN 1, 2 OR 3 IS NOT SHOWING/SELECTED" JavaScript: $(document).ready(function () { var $targets = $('.target'); $('#clicks .click').click(function () { var $target = $($(this).data('target')).toggle(); $targets.not($target).hide() }); }); http://jsfiddle.net/73z48jr2/1/
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26467856
downvote count: 0
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26467856

http://stackoverflow.com/q/26471939
answer count: 1
downvote count: 0
tagged with: javascript
has title: How to create a utils library in angular
has answer: http://stackoverflow.com/a/26472165
favorite count: 0
has body: I'm pretty new to Angular. Sorry for the basic question but I couldn't find info about how to write a library in Angular the proper way. The reason is to benefit from Angular modules as well as testability/mocks. The library I am transferring my code to Angular but a big part of my code is written based on a library that I've developed over a couple of months. Imagine something like underscore. So my initial thought was to wrap it in an angular module like: angular.module('mylib', []) .factory('map', map) .factory('reduce', reduce) .factory('find', find); function map (... Each factory function is testable and stuff. And then use it like: angular.module('app', ['mylib']) .controller('MainCtrl', ['$scope', 'map', MainCtrl]); function MainCtrl($scope, map) { ... do stuff with map ... This is fine for a couple of functions I guess but my library has over 20 functions and it's just too much boilerplate to define every one of them as a factory and then inject them into my controller. Second solution Another way is to have just one factory that returns an object. Kinda like this: angular.module('mylib', []) .factory('mylib', mylib) function mylib () { var exports = {}; exports.map = function (... exports.reduce = function (... exports.find = function (... return exports; } And then use it like this: angular.module('app', ['mylib']) .controller('MainCtrl', ['$scope', 'mylib', MainCtrl]); function MainCtrl($scope, mylib) { ... do stuff with mylib.map ... But... Is this a good approach? What would a good way to write a utility library in Angular and use it? Readability and maintainability are important but I prefer not to have so much boilerplate code.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41581430
has comment: http://stackoverflow.com/comment/41581495
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41581452
has comment: http://stackoverflow.com/comment/41581356
has comment: http://stackoverflow.com/comment/41581409
score: 4
type: Question
upvote count: 4

http://stackoverflow.com/comment/41562464
type: Comment
type: QuestionComment
has text: Can you show the desired output?
comment on: http://stackoverflow.com/q/26461768
score: 0

http://stackoverflow.com/comment/41626522
type: Comment
type: QuestionComment
has text: Correct. But I thought maybe there was still something that I was doing incorrectly, but it just happened to work in the old version. I am really new to angular.
comment on: http://stackoverflow.com/q/26494833
score: 0

http://stackoverflow.com/a/26950924
type: AcceptedAnswer
type: Answer
has body: MrUpsidown was right. My bounding box was wrong because I was referencing ....geometry.location.k directly instead of the LatLng object. Refactoring the code accordingly corrected the problem.
answers question: http://stackoverflow.com/q/26452941
accepted answer of: http://stackoverflow.com/q/26452941
score: 0

http://stackoverflow.com/comment/41624151
type: Comment
comment on: http://stackoverflow.com/q/26495350
type: QuestionComment
has text: Did you include the google map JavaScript?
score: 0

http://stackoverflow.com/comment/41568217
comment on: http://stackoverflow.com/q/26438319
score: 0
type: Comment
type: QuestionComment
has text: I'm trying to make sense of this. If you are interested in the fields having a value then should your if statement be like this: **if(value==''){..throw your error}else{..all good}** ? I don't understand why you are checking the element id.

http://stackoverflow.com/a/26377536
type: Answer
upvote count: 1
has body: Try this : $(function(){ $('g text:contains(abc)').closest('g').append('&lt;text&gt; extra added abc &lt;/text&gt;'); });
downvote count: 0
answers question: http://stackoverflow.com/q/26377498
score: 1

http://stackoverflow.com/comment/41529141
comment on: http://stackoverflow.com/a/26443015
score: 0
type: AnswerComment
type: Comment
has text: Is it possible to get reversal for self-answer, don't you know? Maybe try?

http://stackoverflow.com/q/26360175
upvote count: 2
type: UnansweredQuestion
downvote count: 2
duplicate of: http://stackoverflow.com/q/6274339
has answer: http://stackoverflow.com/a/26360220
tagged with: numbers
type: Question
has body: My exact requirement is to return all numbers from 1 to 2000 randomly and shouldn't repeat a number twice. So we can say if i have function generateRnNumber(){ var arr = [1,2,3,4,5,6,7,8,9,10,...2000]; randomNumber = Math.floor((Math.random()*2000)); return randomNUmber; } So if i call generateRnNumber a number between 1 - 2000 which is not returned before, or a unique number so if i call 2000 times i should get all the numbers but in random order. I don't want to keep an array with 2000 elements. Please help me in writing this function.
answer count: 2
tagged with: random
has title: Generate 10 Unique Random Numbers between 1 to 10 in javascript
has answer: http://stackoverflow.com/a/26360221
tagged with: javascript
score: 0
tagged with: range
linked to: http://stackoverflow.com/q/6274339
tagged with: unique
favorite count: 0

http://stackoverflow.com/q/26501929
has body: I'm currently building a website in bootstrap 3 that has a particular type of collapse/toggle. I'm using the default bootstrap js code. I have a text paragraph and a button. The button is used to toggle the collapse. What I'm trying to do is wrap the whole block (including the paragraph) in a anchor link that will toggle the collapse whether the user clicks the button OR the paragraph of text. I've attached a jsfiddle of the current code I have in a jfiddle to help explain the problem. What I've done so far, is I've added the following to the html code and the collapse toggles as it should when I link on the anchor around the whole collapse: &lt;a href="#" data-toggle="collapse" data-target="#intro-text"&gt; the issue is that the button which contains text and a sprite image (which the sprite and the text changes state from "OPEN" to "CLOSE" and vice-versa depending whether it is collapsed or not) and this is not triggered when the paragraph is used to trigger the collapse. What I want is the button to change it's state when the collapse is triggered when the paragraph is clicked. I'm not sure whether this is a css or javascript issue (but leaning towards js). Any Help would be greatly appreciated.
tagged with: twitter-bootstrap
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41636037
accepted answer: http://stackoverflow.com/a/26502469
has title: Bootstrap 3 Toggle Changing button text and icon on toggle
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26502469
tagged with: twitter-bootstrap-3

http://stackoverflow.com/comment/41415275
score: 0
has text: Added to the main post
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26379660

http://stackoverflow.com/comment/41421272
has text: Yes, I'm running the script and then redirecting when the user clicks the button. I'm unfamiliar with the `ob` functions.
score: 0
comment on: http://stackoverflow.com/a/26383484
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41538580
comment on: http://stackoverflow.com/a/26448340
score: 1
type: AnswerComment
has text: Thanks so much for your response! The edits you suggested made the sound play properly. Unfortunately I don't really understand how asynchronous functions work. Was the playSound() method being executed at the same time as the decodeAudioData method? Was that what was causing the error specifically? Thanks again for your help!
type: Comment

http://stackoverflow.com/comment/41441158
has text: I noticed that when you search for something and then search for another word the .hide class value doesn't reset so it messes up the scrolling for following searches. I made little bit of changes to the js and you can see it here: http://jsfiddle.net/o13vongn/2/ Is there a more easier/efficient way of doing this?
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26374105
type: Comment

http://stackoverflow.com/comment/41500064
score: 0
type: AnswerComment
type: Comment
has text: As I said in my answer, you can of course use it with key up as well, [try this](http://jsfiddle.net/5qt58n0v/).
comment on: http://stackoverflow.com/a/26426998

http://stackoverflow.com/q/26362917
has body: We have a simple jquery ajax call we made a more button and on button click it call another php file on my local computer server its working good even once it work good on when i made it live on server but suddenly it stop working live. Following code working good on local computer server but when i made it live then its not working &lt;script src="http://code.jquery.com/jquery-1.10.2.min.js"&gt;&lt;/script&gt; &lt;div align="center"&gt;&lt;input type="button" id="morejobs" class="m-btn blue buttonSmall tmargin" data="?id=111&amp;page=2" value="More Jos &amp;raquo;" /&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; $("#morejobs").click(function () { var datavalue = $(this).attr("data"); //$("#morejobs").text('Loading..'); if (datavalue) { $.ajax({ type: "GET", url: "new_keyword_city_common.php", data: datavalue, cache: false, success: function (data) { $("#friendsugmore").html(''); $("#friendsugmore").html(data); } }); } return false; }); &lt;/script&gt; What can be issue when same code working good on local server but not live
has comment: http://stackoverflow.com/comment/41384159
tagged with: javascript
score: -1
type: Question
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41383649
answer count: 1
has comment: http://stackoverflow.com/comment/41383666
tagged with: jquery
has title: Jquery ajax call not working when page is deployed
favorite count: 0
has comment: http://stackoverflow.com/comment/41384687
tagged with: ajax
has comment: http://stackoverflow.com/comment/41383854
has comment: http://stackoverflow.com/comment/41384163
has comment: http://stackoverflow.com/comment/41383831
has answer: http://stackoverflow.com/a/26363285
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41383653
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41383731

http://stackoverflow.com/comment/41472360
comment on: http://stackoverflow.com/q/26412056
score: 0
type: Comment
type: QuestionComment
has text: @aarosil `var directoryPath += item.name` is invalid syntax and directoryPath is not saved from one step of the loop to the next... but your idea gave me the answer! `var directoryPath = path + item.name `

http://stackoverflow.com/a/26448583
has body: There are multiple ways to do this -- easiest is to use ng-include to include the template of the module. See this plunker for an example. Ofcourse it's also possible to add a scope variable to an directive and let this do a ng-include with that variable.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26448005
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26448005

http://stackoverflow.com/comment/41695907
comment on: http://stackoverflow.com/q/26472533
has text: We ended up having to wait until the page reloads and evaluate a variable that is one state by default and another after the form is submitted. I'm still unsure why this was a Safari "only" issue.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26366232
type: AnsweredQuestion
upvote count: 0
tagged with: micr
type: Question
duplicate of: http://stackoverflow.com/q/949433
tagged with: javascript
has answer: http://stackoverflow.com/a/26366519
tagged with: http://stackoverflow.com/tag/c
accepted answer: http://stackoverflow.com/a/26366519
downvote count: 11
has body: somebody explain this please don't anyy me with ridiculous code #include&lt;stdio.h&gt; #include&lt;conio.h&gt; int main() { int a = 5 ; printf( "%d %d %d %d %d", a, ++a, a++,--a,a--); getchar(); return 0; }
has comment: http://stackoverflow.com/comment/41392964
score: -11
answer count: 1
has comment: http://stackoverflow.com/comment/41389909
tagged with: variables
favorite count: 0
linked to: http://stackoverflow.com/q/949433
has comment: http://stackoverflow.com/comment/41389886
tagged with: http://stackoverflow.com/tag/html
has title: Assignment aand Precedence of operators in c

http://stackoverflow.com/comment/41629661
has text: why is the link tag not in the head?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26498459

http://stackoverflow.com/a/26467463
type: AcceptedAnswer
downvote count: 0
has body: If you declare module, you should use: var app = angular.module("myApp", []); This notation: var app = angular.module("myApp"); could be used later to retrive that module and append stuff to it The more other modules you will need, you can inject them into that array, e.g. var app = angular.module("myApp", ['ui.router']);
type: Answer
answers question: http://stackoverflow.com/q/26467304
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/26467304

http://stackoverflow.com/q/26474981
has comment: http://stackoverflow.com/comment/41587368
has comment: http://stackoverflow.com/comment/41587629
has body: I am trying to build an apple.com like search icon and I have read most of the other posts about this. I am using css for the smooth transition and on and off click search expansion. (no js) The current problem I am having is I only want to only show the search icon and none of the input box (no background color or border) when the box is contracted. (I want to see the search icon and nothing else) It is a bit difficult for me since the search icon is placed as the background to the search bar. Any suggestions how to accomplish this? I tried to use js to create and hide a separate search icon and overlay it on the input bar, but its getting messy and it is not a great solution. Please let me know! Fiddle: http://jsfiddle.net/simonzhu91/go17ab2x/ .search { width:360px; position:relative; top:2px; padding:8px 5px 8px 30px; border:1px solid #ccc; background:white url(http://i.imgur.com/lFkqn.png) left center no-repeat; } #search input { width: 30px !important; -moz-transition: width 0.5s ease-out !important; -webkit-transition: width 0.5s ease-out !important; transition: width 0.5s ease-out !important; border: 0 !important; outline: 0 !important; -webkit-appearance:none !important; -moz-appearance:none !important; appearance:none !important; } #search input:focus { width: 200px !important; -moz-transition: width 0.5s ease-out !important; -webkit-transition: width 0.5s ease-out !important; transition: width 0.5s ease-out !important; border: default !important; background: default !important; } Will AC the first working solution =)
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/41588349
has comment: http://stackoverflow.com/comment/41587822
favorite count: 0
has comment: http://stackoverflow.com/comment/41587534
type: UnansweredQuestion
tagged with: input
has comment: http://stackoverflow.com/comment/41587571
tagged with: css
answer count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41587762
has comment: http://stackoverflow.com/comment/41587425
type: Question
has title: Apple.com Search like Icon and Search Pop Out
tagged with: javascript

http://stackoverflow.com/q/26394840
has answer: http://stackoverflow.com/a/26395363
accepted answer: http://stackoverflow.com/a/26395363
has comment: http://stackoverflow.com/comment/41442556
has body: I'm working with results from the Facebook Javascript SDK, and the "attachments" part of the object is giving me trouble. When looking at the object it's all good, but when I try to display it on my website, it says these properties are undefined. Am I parsing incorrectly? Here's the object: { "id":"xxx_xxx", "from":{ "id":"xxxx", "name":"User Name" }, "to":{ "data":[{ "name":"Group Name", "id":"xxxx" }] }, "picture":"url of image", "link":"url", "object_id":"Object ID", "type":"photo", "created_time":"2014-10-15T21:09:19+0000", "updated_time":"2014-10-15T21:09:19+0000", "attachments":{ "data":[{ "media":{ "image":{ "height":551, "src":"Image Source", "width":720 } }, "target":{ "id":"742450405803347", "url":"target URL" }, "type":"photo", "url":"URL" }] } And here's the code to display the "attachments" part on the website (I know it's messy, please ignore that): post_div_html += ' ------------------ \ Media-Image-Source: ' + feed.attachments.data[0] + ' \ Target URL: ' + feed.attachments.data[1] + ' \ Type: ' + feed.attachments.data[2] + ' \ URL: ' + feed.attachments.data[3] + ' '; Now, just to be clear, what you see there results in 'undefined' being displayed as the value on my website. Everything else I have tried has resulted in an error saying that 'feed.attachments.data.whatever is undefined'. Anyone have any ideas on how I need to be displaying this stuff?
type: AnsweredQuestion
has title: Part of Facebook object is displaying as undefined, but it isn't undefined
type: Question
tagged with: object
tagged with: javascript
tagged with: facebook-graph-api-v2.0
score: 0
answer count: 1
tagged with: facebook-javascript-sdk

http://stackoverflow.com/comment/41530723
comment on: http://stackoverflow.com/a/26443432
has text: @MuhammadUmer : You can have any type of view on a byte buffer : you can have them treated as 8,16, 32 bit signed or unsigned integer Arrays + the 32/64 float views + the clamped view . See this tutorial about the typed array, from html5rocks : http://www.html5rocks.com/en/tutorials/webgl/typed_arrays/
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/26419787
has body: I'm trying to validate my JavaScript closure understating and i come to strange behavior which i can't understand. Lets write the first loop: var funcs = []; for (var i = 0; i &lt; 3; i++) { funcs[i] = function() { console.log("My value: " + i); }; } for (var j = 0; j &lt; 3; j++) { funcs[j](); } this will output My value: 3 My value: 3 My value: 3 which is what i expected. But now lets change the second loop a little bit: var funcs = []; for (var i = 0; i &lt; 3; i++) { funcs[i] = function() { console.log("My value: " + i); }; } for (var i = 0; i &lt; 3; i++) { // i only changed the j var to i funcs[i](); } the output will be: My value: 0 My value: 1 My value: 2 Could someone explain me why i get different results in the second example? Here is a example which i wrote in angularjs: http://plnkr.co/edit/CipIQe9x8QBX7AFg4xfI?p=preview
favorite count: 0
has comment: http://stackoverflow.com/comment/41485990
tagged with: angularjs
duplicate of: http://stackoverflow.com/q/750486
has title: Strange Javascript closure loop behavior
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41486166
upvote count: 1
linked to: http://stackoverflow.com/q/750486
score: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41486113
type: Question
has comment: http://stackoverflow.com/comment/41485926
has comment: http://stackoverflow.com/comment/41486212
downvote count: 0

http://stackoverflow.com/q/26367168
has comment: http://stackoverflow.com/comment/41392367
score: 0
has title: Why does there seem to be a delay in firing my click() event?
type: Question
has comment: http://stackoverflow.com/comment/41391609
has body: I've got a grid with an Accept/Decline radio button set in each row. When a radio button is clicked, an ajax call is made to check if any of the rows need to be disabled, and the grid is refreshed. I have some code that should immediately disable all the radio buttons when one is clicked so the user cannot choose additional options until the refresh occurs: $('input').click(function(){ $('input').prop('disabled', true); }); but even this simple code has a lag of ~500ms on the page before it takes affect. Other times it happens almost immediately. I don't have much control over the overall HTML/other scripts on the page that may be running or causing this to slow down if that is the culprit. Is there anything I can do just in terms of setting up the event listeners to disable the radio buttons more quickly, or prevent them from being clicked?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41391911
has comment: http://stackoverflow.com/comment/41391675
answer count: 1
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26367419
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26497415
has comment: http://stackoverflow.com/comment/41627764
has answer: http://stackoverflow.com/a/26497495
tagged with: math
score: -1
type: Question
has comment: http://stackoverflow.com/comment/41628007
answer count: 2
has comment: http://stackoverflow.com/comment/41627823
has answer: http://stackoverflow.com/a/26497678
tagged with: arrays
tagged with: javascript
has body: I have an assignment right now which requires that I use Math.random() stored in a variable which I have named randomNumberBetween0and5 (It's actually Math.floor((Math.random() * 5) + 0); which returns a number between 0 and 5. I use this number to refer to the index of some arrays elsewhere in the code.) I call it twice more later in my code, but I need Math.random() to execute only once then store its' value in the randomNumberBetween0and5 variable for later use without changing if I call the variable two or three more times. I've tried to store the value of randomNumberBetween0and5 in another variable and (as expected) that didn't help the situation. Any help would definitely be appreciated! Thank you! (Here's all of the code just in the case you'd like to see it.) var names = ["Lázaro", "Aviram", "Samuel", "Miles", "Felix"]; // Defining an array of random names var people = []; // Declaring the array to hold each instance of the 'Person' object // For() to create one new instance thrice for three names of the 'names' array in the 'Person' object defined in 'person.js' for (var i=0;i &lt; 3;i++) { var randomNumberBetween0and5 = Math.floor((Math.random() * 5) + 0); // Randomly choosing a number for the arrays to be passed to the 'Person()' object's methods defined in 'person.js' var newInstance = new Person.generate(names.splice(randomNumberBetween0and5,randomNumberBetween0and5+1),Person.actions[randomNumberBetween0and5],Person.jobs[randomNumberBetween0and5],i+1); // Creating a new instance of the 'Person()' object and passing a random name, action (from the Person object's properties), and job (also from the Person object's properties), along with the current loop number for the row to use (i begins at 0 so it becomes 1,2,3 instead of 0,1,2 when a 1 is added) //people.push(newInstance); // Adding the new instance to the 'people' array of instances people.push(newInstance); // Adding the newly created instance of 'Person' to the variable 'people' }; // Ending the …
downvote count: 2
tagged with: random
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41627738
has title: How could I keep Math.random() from returning a different value each time I call the variable it's stored under?
type: UnansweredQuestion

http://stackoverflow.com/q/26467378
has comment: http://stackoverflow.com/comment/41572534
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41572822
tagged with: jquery
has answer: http://stackoverflow.com/a/26468010
has title: How do you move items betwen two listboxes on MVC - JQuery not working
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41577237
linked to: http://stackoverflow.com/q/17108607
has body: I have looked at other SO topics on this and they end up being either really old or using WebForms. I have an MVC view in which I have two listboxes. I want to move items back and forth between the two listboxes. The View is: @using (Html.BeginForm()) { @Html.ListBoxFor(m =&gt; m.SelectedAttributes, Model.Attributes, new {id="listBoxAvail", SIZE = 5} ) &lt;input type="submit" name="add" id="add" value="MoveRight" /&gt; &lt;input type="submit" name="remove" id="remove" value="MoveLeft" /&gt; @Html.ListBoxFor(m =&gt; m.SelectedAttributes2, Model.SelectedItems, new { id = "listBoxSel", SIZE = 5}) } The ViewModel is: public class OptInViewModel { public IEnumerable&lt;string&gt; SelectedAttributes { get; set; } public IEnumerable&lt;string&gt; SelectedAttributes2 { get; set; } public IEnumerable&lt;SelectListItem&gt; Attributes { get; set; } public IEnumerable&lt;SelectListItem&gt; SelectedItems { get; set; } } And the Controller code is: public ActionResult Index() { AttributeEntities db = new AttributeEntities(); List&lt;SelectListItem&gt; listSelectListItems = new List&lt;SelectListItem&gt;(); List&lt;SelectListItem&gt; listSelItems = new List&lt;SelectListItem&gt;(); foreach (var attributes in db.HarmonyAttributes) { SelectListItem selectList = new SelectListItem { Text = attributes.AttributeName, Value = attributes.AtrributeLabel, Selected = false }; listSelectListItems.Add(selectList); } foreach (var sel in db.SelectedHarmonyAttributes) { SelectListItem selList = new SelectListItem { Text = sel.CustomLabel, Value = sel.HarmonyAttribute_ID.ToString(), Selected = false }; listSelectListItems.Add(selList); } OptInViewModel viewModel = new OptInViewModel { Attributes = listSelectListItems, SelectedItems = listSelItems }; return View(viewModel); } I used JQuery to try to do this but it's not working (nothing gets transferred to 2nd listbox). Anyone kinow what's wrong? &lt;script src="~/Scripts/jquery-2.1.1.js"&gt;&lt;/script&gt; &lt;script&gt; $(function () { $("add").…
has answer: http://stackoverflow.com/a/26477214
has comment: http://stackoverflow.com/comment/41572442
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript

http://stackoverflow.com/comment/41506543
score: 1
type: Comment
type: QuestionComment
has text: Read through this page on event basics: http://learn.jquery.com/events/event-basics/
comment on: http://stackoverflow.com/q/26430884

http://stackoverflow.com/comment/48275218
has text: It is true in Firefox 37, but it doesn't seem to work at all. `window.crypto.signText` is undefined.
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26407109

http://stackoverflow.com/a/26429408
answers question: http://stackoverflow.com/q/26429029
upvote count: 1
score: 1
has body: I ran it in console and I found that you have a topic what contain a white sapce. new Question("Imaginary Numbers", "What is \u221A(-1)^8?", ["i", "-i", 1, -1], 1) and I got an error: Error: Syntax error, unrecognized expression: input[name=Imaginary Numbers]:checked A solution is to remove the space from the topic Imaginary Numbers, new Question("Imaginary_Numbers", "What is \u221A(-1)^8?", ["i", "-i", 1, -1], 1)
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41621121
type: Comment
comment on: http://stackoverflow.com/q/26489545
type: QuestionComment
has text: Have you tried invoking it in JS console? (like Chrome Dev Tools at F12)
score: 0

http://stackoverflow.com/a/26379948
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41414999
accepted answer of: http://stackoverflow.com/q/26379784
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41415400
answers question: http://stackoverflow.com/q/26379784
has body: This fades #div1, #div2, #div3 and #div4 to 0 opacity in 2 seconds with a 2 seconds delay. $(document).ready(function() { $('#div1').delay(2000).fadeTo(2000, 0); $('#div2').delay(4000).fadeTo(2000, 0); $('#div3').delay(6000).fadeTo(2000, 0); $('#div4').delay(8000).fadeTo(2000, 0); }); JSFiddle demo
has comment: http://stackoverflow.com/comment/41414867
type: Answer

http://stackoverflow.com/comment/41464040
type: QuestionComment
comment on: http://stackoverflow.com/q/26407691
score: 0
type: Comment
has text: is the html in the file you specified?

http://stackoverflow.com/comment/41422959
type: AnswerComment
score: 0
type: Comment
has text: you can put tag into " ", then the href attribute will contain an url for the action that you want to call
comment on: http://stackoverflow.com/a/26384253

http://stackoverflow.com/a/26492864
has body: You can use the text() method to set the text of an element: $('.form-control-static').text($('#ccnum').val());
answers question: http://stackoverflow.com/q/26492849
has comment: http://stackoverflow.com/comment/41621870
score: 4
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/41620325
downvote count: 0

http://stackoverflow.com/q/26355451
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/26355875
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 1
has title: Factory design pattern with AngularJS, is this the right way?
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
tagged with: design-patterns
score: 2
has body: I would like to implement Factory design pattern in AngularJS, so that the right kind of object can be created, but I'm not sure how that fits inside whole framework thing. Let's say there are different types of Products in AngularJS application, Clothing and Ebooks: Product | | Ebook Clothing and I would like to instantiate concrete type of object based on some criteria, for example type field returned from database, should I do that like this ? : // pseudo-code ProductController Factory.createObject(type) If that's OK, is it ok to store Factory function inside that controller and where should I store concrete constructor objects that represent products(like function Ebook()) ?

http://stackoverflow.com/a/26401219
has comment: http://stackoverflow.com/comment/41452281
type: Answer
answers question: http://stackoverflow.com/q/26400894
score: 0
has body: Define your route like this angular.module('app', []) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/user/edit/:id', { templateUrl: '/edit.html', controller: 'editCtrl' }) }]); // inside your controller you do this angular.module('app').controller('editCtrl', ['$scope', '$routeParams', function($scope, $routeParams){ // $routeParams is the key here // you can access it by doing console.log($routeParams.id) }])

http://stackoverflow.com/comment/41493509
comment on: http://stackoverflow.com/a/26379116
type: Comment
has text: thanks johnroe for reply. I tried this and its works. But there is a another problem occurring. that because this program work in javascript so when i resubmit the data then it cross the div boundry and make new pie chart very near to old one. But i want that if i resubmit the data then it should override the old one and create the new one with fresh data.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41601302
score: 0
type: AnswerComment
type: Comment
has text: Hi, I still am having troubles implementing this to make it work :\ @Jerodev
comment on: http://stackoverflow.com/a/26481617

http://stackoverflow.com/comment/41454334
has text: Overriding jQuery's CORS support detection is not "using CORS".
comment on: http://stackoverflow.com/a/26402228
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41380220
comment on: http://stackoverflow.com/q/26361129
score: 0
type: QuestionComment
type: Comment
has text: This is usually done by loading the page again, since you cannot simply take a snapshot of the DOM and restore it. I'm not familiar with Jasmine, though.

http://stackoverflow.com/comment/41535963
has text: Like I said: you'll need to do the bulk. We can help you with timer logic, but you have to write the game.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26446569
type: Comment

http://stackoverflow.com/a/26491394
has body: Put the class name in the submit button. Also use the anonymous functions because you are calling the trigger function but you are not telling it what to do. Here is two ways you can proceed after you fix the class name: Method 1: $(".kn-submit").trigger("click", function(){ // what you want to do });//trigger function Method 2: $(".kn-submit").click(function(){ // what you want to do });//click function
answers question: http://stackoverflow.com/q/26491159
type: Answer
score: 0

http://stackoverflow.com/q/26378656
score: 0
has comment: http://stackoverflow.com/comment/41412883
type: Question
tagged with: arrays
has comment: http://stackoverflow.com/comment/41413230
has comment: http://stackoverflow.com/comment/41412961
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41413472
has answer: http://stackoverflow.com/a/26379709
has comment: http://stackoverflow.com/comment/41413239
answer count: 1
has comment: http://stackoverflow.com/comment/41412516
has body: I have for example fields in my HTML form: GroupName = Group1 GroupElements = 2 Text1_1 = empty File1_1 = blah.jpg Text1_2 = Some text File1_2 = empty GroupName = Group2 GroupElements = 1 Text2_1 = empty File2_1 = blah2.jpg User picks a group name, then decides of a number of elements, for each element he might choose to attach a file OR type in some text. Later on I have a javascript array like this: array[0][0] = GroupName; //Group1 array[0][1] = GroupElements; //2 array[0][2][0] = "#File1_1"; array[0][2][1] = "#Text1_2"; array[1][0] = GroupName; //Group2 array[1][1] = GroupElements; //1 array[1][2][0] = "#File2_1"; //this is an id of first chosen element (attached file **OR** text input) At this point, I have yet no idea how to pass this data to .php file. I need to pass the whole array both with mixed-type elements (text or file)
tagged with: php
accepted answer: http://stackoverflow.com/a/26379709
has title: Passing an HTML form and JS array to PHP
type: AnsweredQuestion

http://stackoverflow.com/a/26415547
type: Answer
has body: I would recommend the replace() function. If you have already tried this and it did not work, what were your results? For example, inside your while statement, you can call: myDivText.replace(m[1], "ReplacedWord"); or myDivText.replace(m[1], m[1]+"_Replaced");
score: 0
answers question: http://stackoverflow.com/q/26415503
has comment: http://stackoverflow.com/comment/41479612

http://stackoverflow.com/q/26450006
has comment: http://stackoverflow.com/comment/41541534
score: 0
has title: Replacing a JavaScript function
tagged with: tampermonkey
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41541798
has body: There is a JavaScript file attached to the page's source and I am wanting to edit and overwrite a function from it using TamperMonkey so I can change what the function does, is this possible? This is the function: function handleNext () { switch(curIndex){ case 0: startLoading(); $.getJSON(API_URL + getSubdomain() + "/names", function(res) { if(res.A == true) { moveToSection($("#section-name-links"), $("#section-user-prefrences")); } else { finishLoading(); displayError("Incorrect"); } }).fail(function() { finishLoading(); displayError("An error occured"); }); break; case 1: startLoading(); var success = true; if($("#prefrences input[name=name]").val() == ""){ displayError("Please enter your name"); success = false; } if($("#section-user-prefrences input[surname=surname]").size() &gt; 0 &amp;&amp; $("#section-user-prefrences input[surname=surname]:checked").size() == 0){ displayError("Please enter your last name"); success = false; } if(!success){ finishLoading(); return; } var rewardid = $("#section-user-prefrences input[name=reward]:checked").val(); $.post(API_URL + getSubdomain() + "/names", { nameid: namesid || -1, username: $("#section-user-prefrences input[name=name]").val() }, function(res) { moveToSection($("#section-user-prefrences"), $("#section-thank-you")); $("#continue").hide(); }).fail(function() { finishLoading(); displayError("An error occured"); }); break; } } And what I'm aiming to do is change the function to something along the lines of: function handleNext () { switch(curIndex){ case 0: startLoading(); moveToSection($("#section-name-links"), $("#section-user-prefrences")); }).fail(function() { finishLoading(); displayError("An error occured"); }); break; case 1: startLoading(); var success = true; if(!success){ finishLoading(); return; } break; } }
type: Question
tagged with: overriding
tagged with: replace
has comment: http://stackoverflow.com/comment/41543056
has comment: http://stackoverflow.com/comment/41542231
has comment: http://stackoverflow.com/comment/41541808
tagged with: javascript

http://stackoverflow.com/q/26460215
has title: phonegap Ajax Call returns error=undefined in android device
has answer: http://stackoverflow.com/a/26478262
type: Question
has body: i have enabled CORS, tried both get and post method,at first the ajax call was working fine but now it works fine in the browser but when I test it on my device it goes into the error function and i get error=undefined any help would be appreciated $("#createEvent_btn").click(function(e) { //alert("in the function "); if ($("#registerInfo").valid()) { $(this).addClass('ui-disabled'); start = $("#startDate").val(); end = $("#endDate").val(); venue = $("#place").val(); var data2 = $("#registerInfo").serialize(); var params = data2; alert(params); //console.log(data2); var url = 'http://domain/th/registerEvent.php'; //ajax.open("POST", url, true); //ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); // ajax.setRequestHeader("Content-length", params.length); //ajax.setRequestHeader("Connection", "close"); var modurl = url + "?" + params; alert(modurl); ajax.open("GET", modurl, true); ajax.onreadystatechange = function() { if (ajax.readyState == 4 &amp;&amp; ajax.status == 200 || ajax.status == 0) { //alert(ajax.response); id = ajax.response; alert(id); $('#createEvent_btn').removeClass('ui-disabled'); setPeoplepage(); } }; ajax.onerror = function(e) { alert("Error ocurred. Error = " + e); }; ajax.send(params); } });
has comment: http://stackoverflow.com/comment/41564232
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41564859
tagged with: ajax
score: 0
tagged with: android
answer count: 1
tagged with: cordova
type: UnansweredQuestion

http://stackoverflow.com/q/26397924
tagged with: javascript
has title: add and remove input field function
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26398122
has answer: http://stackoverflow.com/a/26397989
has body: I have a problem with the deleting function, is my code wrong or something? The add function is working fine though.......... plus how to insert the data from the added input field into the database? Add More Fields No.Telefon: Lokasi: the sql....... <?php require("dbase.php"); if ($_POST) { $id_akaun = isset($_POST['id_akaun']) ? $_POST['id_akaun'] : ''; $daerah = isset($_POST['daerah']) ? $_POST['daerah'] : ''; $kategori_akaun = isset($_POST['kategori_akaun']) ? $_POST['kategori_akaun'] : ''; $bahagian = isset($_POST['bahagian']) ? $_POST['bahagian'] : ''; $jenis = isset($_POST['jenis']) ? $_POST['jenis'] : ''; $no_telefon = isset($_POST['no_telefon']) ? $_POST['no_telefon'] : ''; $lokasi = isset($_POST['lokasi']) ? $_POST['lokasi'] : ''; $id = isset($_POST['id']) ? $_POST['id'] : ''; $sql = mysql_query("INSERT INTO maklumat_akaun VALUES ('', '$id_akaun' , '$daerah' , '$kategori_akaun' , '$bahagian' )"); $sql = mysql_query("INSERT INTO detail_akaun VALUES ('', '$jenis' , '$no_telefon' , '$lokasi', '".mysql_insert_id()."' )"); echo " "; echo " "; } ?>
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26398122
upvote count: 1
tagged with: php
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26398390
accepted answer: http://stackoverflow.com/a/26397989
score: 0
answer count: 3

http://stackoverflow.com/a/26433614
accepted answer of: http://stackoverflow.com/q/26433176
answers question: http://stackoverflow.com/q/26433176
type: Answer
has comment: http://stackoverflow.com/comment/41535281
has comment: http://stackoverflow.com/comment/41611412
has body: Did you want some thing like this: DEMO? $(function() { $('#SPECIAL').on('change', function() { if ($('option:selected', this).is('[data-img]')) { $('#modal_special').find('.modal-body').html(' Image will go here: ') .append(' ') .end().modal('show'); } }); $('.accept').on('click',function() { //do something $('#modal_special').modal('hide'); }); });
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41587464
has comment: http://stackoverflow.com/comment/41533953
has comment: http://stackoverflow.com/comment/41611292
has comment: http://stackoverflow.com/comment/41610826
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41551052

http://stackoverflow.com/comment/41455965
score: 0
comment on: http://stackoverflow.com/a/26400448
type: Comment
has text: Updated my answer with sample jquery ajax and link for tutorial
type: AnswerComment

http://stackoverflow.com/q/26390853
has title: HTML checkbox handling
score: 0
linked to: http://stackoverflow.com/q/2330209
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/18217588
has answer: http://stackoverflow.com/a/26391025
favorite count: 0
has answer: http://stackoverflow.com/a/26391081
has answer: http://stackoverflow.com/a/26391143
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26391139
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41434916
has comment: http://stackoverflow.com/comment/41434935
linked to: http://stackoverflow.com/q/8206565
has answer: http://stackoverflow.com/a/26391141
has comment: http://stackoverflow.com/comment/41437876
type: Question
has body: So I have a group of checkboxes like this: [x] No stuff [ ] Stuff 1 [ ] Stuff 2 [ ] Stuff 3 When any of the stuff checkboxes are clicked, I want the "No Stuff" one automatically deselected. Also, I would like everything to be deselected if "No stuff" gets selected. Can someone point me in the right direction? Thanks.
tagged with: javascript

http://stackoverflow.com/q/26465443
type: Question
has answer: http://stackoverflow.com/a/26465611
has comment: http://stackoverflow.com/comment/41568818
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41568841
tagged with: angular-ui
accepted answer: http://stackoverflow.com/a/26465611
favorite count: 0
tagged with: angularjs
has title: Angular ui-router nested views separated templates and controllers
upvote count: 1
has comment: http://stackoverflow.com/comment/41569237
type: AnsweredQuestion
tagged with: angular-ui-router
score: 1
has body: I have following files: index.html car.html truck.html mainCtrl.js carCtrl.js truckCtrl.js and want to make such routes: #/search (template: index.html, controller: mainCtrl.js) #/search/car (template: car.html, controller: carCtrl.js) #/search/truck (template: truck.html, controller: truckCtrl.js) index.html contains two links one which must redirect to #/search/car and second: #/search/truck car.html &amp; truck.html must load in nested view Please someone help me to accomplish this task

http://stackoverflow.com/q/26379482
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/41414046
has body: I would like to dynamically use javascript to hide some markers in a dynamic layer embedded on top of a normal map with Google Maps API v3. My code generally looks like this: function init_form() { document.getElementById('change_select_element').addEventListener('change', function () { // Somehow hide some markers based on user input. }); } var map; function initialize() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(20, -121) }; map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); // The example layer I use here lacks markers, but the one I use will have some. var layer = new google.maps.visualization.DynamicMapsEngineLayer({ layerId: '06673056454046135537-08896501997766553811', map: map, suppressInfoWindows: true, clickable: true }); init_form(); } google.maps.event.addDomListener(window, 'load', initialize); I'm wondering if there's some DOM element representation of a marker that I could conveniently latch onto and apply CSS styles like display:none to. For instance, it'd be nice to be able to hide any of the markers on a map like this one dynamically: http://maps.google.com/gallery/details?id=zah9NJ0CwqNw.kAx_b7jm9Uz0&amp;hl=en
answer count: 0
type: Question
has title: Can I programmatically hide markers in a dynamic layer in Google Map API v3?
score: 0
has comment: http://stackoverflow.com/comment/41417297
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/41502473
score: 0
type: QuestionComment
type: Comment
has text: Without being totally conscious of it, I think of more unique variable names to prevent confusion or conflict with ported or native code within a larger script/application.
comment on: http://stackoverflow.com/q/26428575

http://stackoverflow.com/comment/41632618
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26499462
has text: I feel so stupid, got it sorted. Thanks for the help guys, wouldn't have clicked with me otherwise. I just used the 'data' variable to call the id. Arun P, you're comment made me realise how simple it was and how stupid I am. I had a look at the UI but wanted to get it with the native Drag and Drop as this is part of a larger project and I wanted to learn a few new tricks. Thanks for all the help! $("#mybillets").append(""+data+" ");
score: 0

http://stackoverflow.com/a/30690282
has comment: http://stackoverflow.com/comment/49452524
answers question: http://stackoverflow.com/q/26401809
has comment: http://stackoverflow.com/comment/49457053
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: This has not received an answer, perhaps you found one? If not: Let me start off with the question in your comments, as it sounds like solving that question in the end solves the original question. How can I create separated views of the same array? This is essentially Bergi's proposal from the comments, slightly modified. It answers the How. When you create an ArrayBuffer you can access the underlying array of bytes from multiple typed Arrays by passing that array buffer as an initial parameter. I've found JavaScripture -- ArrayBuffer to be quite helpful in the past with TypedArrays. So the following reserves 8 bytes in memory and accesses it as both a 64-bit float and 8 byte ints. var myBuff = new ArrayBuffer(8); var myU8Arr = new Uint8Array(myBuff); var myFloat64Arr = new Float64Array(myBuff); so if you say set the first byte in the buffer to 1, and then access that value from the float you will get a narly float: myFloat64Arr[0] = 10000; console.log(myFloat64Arr[0])//prints 0; myU8Arr[7] |= 128;//sets sign bit of IEEE 754 Double-precision float. //setting the sign because it's more straightforward than if another //bit was to be set. console.log(myFloat64Arr[0]);//prints -10000 ... all dependent on system endianess So, now that the question from the comments has been answered: How can I use the least significant bit to tag my numbers? Directly addressing the question; I don't see a problem with using the Typed Arrays. We can bitwise on the underlying bytes in the underlying Array Buffer without worrying that the byte will be turned into a 64-bit float and mess things over. Sticking with your "stack" of floats will get you the added performance. Simple create the ArrayBuffer and then both the Uint8Array and Float64Array instead of an array of numbers (or an array of Tags). Otherwise you could make a Tag function with an ArrayBuffer, Uint8Array and Float64Array attributes in it's scope and then create new instances of it for each number... but this doesn't save yo…
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26401809
has comment: http://stackoverflow.com/comment/49457197
score: 1

http://stackoverflow.com/q/26508049
has comment: http://stackoverflow.com/comment/41667771
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41646828
has body: I looking for how to access input tag in form via jquery. I made something like below : HTML test press and in common.js function checkValidation(formName){ var form = $('#' + formName); form.children('input').each(function(k){ var obj = $(this); console.log(obj.val()); } }; I can get value from input tags without hidden type. How can I get hidden type also at once. I found follow article. But if I use this, it looks have to iterate form twice which I do not want to. Link : jQuery access input hidden value Is there any way to access hidden and not hidden at once? Thanks :D P.S/ I also curious about access multiple selector. I have tried form.children('input, textarea, select').each(function(i){//do something}); but does not work. Would you find anything wrong from here?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26508103
has comment: http://stackoverflow.com/comment/41646702
linked to: http://stackoverflow.com/q/4376664
possible better answer: http://stackoverflow.com/a/26508107
has title: how to access input tag in form with jquery?(include hidden type)
has answer: http://stackoverflow.com/a/26508107
tagged with: input
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26508103
score: -1
tagged with: forms
type: Question
answer count: 2
tagged with: hidden
upvote count: 0

http://stackoverflow.com/comment/41586051
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26470439
has text: I'm accepting this as it answers the first question. Will create a new post for how to target the results.

http://stackoverflow.com/comment/41596961
has text: @menorah84 You can inject the `$scope` into the service factory as well: `.factory('find', ['$scope', function($scope) { ... }]);`. I updated the answer.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26480241
type: Comment

http://stackoverflow.com/comment/96522259
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/34939005
score: 1
has text: Actually, `concatMap` is anything but parallel. As stated in the docs (https://www.learnrxjs.io/operators/transformation/concatmap.html) `concatMap` does not subscribe to the next observable until the previous completes. Read more here: https://blog.angularindepth.com/practical-rxjs-in-the-wild-requests-with-concatmap-vs-mergemap-vs-forkjoin-11e5b2efe293

http://stackoverflow.com/comment/41497517
comment on: http://stackoverflow.com/q/26426298
score: 6
has text: Good question. But I think this one is better in Programmers SE (conceptual thing). Additionally, utility libs like Underscore have [`_.isUndefined`](http://underscorejs.org/#isUndefined)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26412348
has comment: http://stackoverflow.com/comment/41473445
has comment: http://stackoverflow.com/comment/41473152
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41476006
tagged with: hyperlink
type: Question
has comment: http://stackoverflow.com/comment/41473118
has comment: http://stackoverflow.com/comment/41473371
tagged with: url
tagged with: javascript
has body: I am trying to create custom links for all the individuals in a page. Each individual has a separate id. How can I create the links using GET parameter. The data is being pulled using JSON Javascript $.getInfo = function() { var selected_reference_id = $.cookie("selected_reference_id"); $.ajax({ url: "assets/functions/editor.php", type: "post", data: {selected_reference_id: selected_reference_id}, success: function(data) { var json_data = JSON.parse(data); console.log(json_data); console.log(json_data[0].profile_image_url); $("#editor_name").html(json_data[0].name); $("#profile_description").html(json_data[0].profile_description); $("#profile_picture").html(' '); $("#main_video").html(' \n\ \n\ To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video \n\ '); $("#editor_tags").append(json_data[0].is_sports); $("#editor_tags").append(json_data[0].is_weddings); $("#editor_tags").append(json_data[0].is_travel); $("#editor_tags").append(json_data[0].is_everyday_moments); $("#editor_tags").append(json_data[0].is_special_occasions); $("#editor_tags").append(json_data[0].is_motion_graphics); $("#editor_tags").append(json_data[0].is_promo); $("#editor_tags").append(json_data[0].is_tutorials); $("#editor_tags").append(json_data[0].is_crowdfunding); $("#editor_tags").append(json_data[0].is_collage); $.each(json_data, function(index) { //console.log(data[index].email); var addRow = ' \n\ \n\ To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video \n\ '; // var addRow = ' \n\ // \n\ // \n\ // \n\ // \n\ // \n\ // '; if (index !== 0) { $("#work-preview").append(addRow); } }); // $("#main_video").html(' \n\ // \n\ // \n\ // '); // if (json_reserve.alreadyReserved === 0) { // $("#upload_row").show(); // $.timer(json_question[0].timeleft); // } else { // $.dialogAlreadyReserved(); //a function I defined to pop up a dialog // $.throbberHide(); // } } }); }; $.getInfo(); PHP <?…
has comment: http://stackoverflow.com/comment/41473065
has title: How to create links with GET parameter
has comment: http://stackoverflow.com/comment/41475151
tagged with: get
score: 0
has comment: http://stackoverflow.com/comment/41473117

backbone-forms
tags question: http://stackoverflow.com/q/26491031
tags question: http://stackoverflow.com/q/26461302
tag name: backbone-forms
type: Tag
tags question: http://stackoverflow.com/q/26470057

http://stackoverflow.com/a/26357652
type: Answer
has body: $dirs = $_REQUEST['myDirs']; use $_REQUEST then you will get &amp; post data
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26357322

http://stackoverflow.com/a/26439665
answers question: http://stackoverflow.com/q/26438219
has body: By changing the fetch command in my Backbone router file I was able to fix the problem initialize: -&gt; @collection = new Movieseat.Collections.Movieseats() @collection.fetch() To initialize: -&gt; @collection = new Movieseat.Collections.Movieseats() @collection.fetch({reset: true})
has comment: http://stackoverflow.com/comment/41527442
score: 0
type: Answer

http://stackoverflow.com/comment/41396757
type: QuestionComment
comment on: http://stackoverflow.com/q/26369674
has text: POST request is the same POST request no matter how you send it: AJAX, curl or form submit.
score: 0
type: Comment

http://stackoverflow.com/q/26358402
tagged with: javascript
has comment: http://stackoverflow.com/comment/41375607
accepted answer: http://stackoverflow.com/a/26358474
score: 0
has comment: http://stackoverflow.com/comment/41375561
answer count: 1
has comment: http://stackoverflow.com/comment/41375451
tagged with: jquery
has comment: http://stackoverflow.com/comment/41375498
has comment: http://stackoverflow.com/comment/41375139
has comment: http://stackoverflow.com/comment/41375642
type: AnsweredQuestion
has title: update text on a textarea as user types, based on the syntax?
has answer: http://stackoverflow.com/a/26358474
linked to: http://stackoverflow.com/q/26351435
tagged with: coffeescript
type: Question
has body: For example I have a textarea and I'm typing this: Bolded and italic and bold+italic as I am typing this to my textarea, the text will become bolded or italic like this: Bolded and italic and bold+italic Note that it does not have to be or , it could be **text** and it becomes text, I have no problem on creating the custom syntax, I just need to know if it is possible to update it live in js or jquery? I was thinking of using (this is in CoffeeScript): $('div#mdEditor').on 'change', -> # but no idea how to continue? UPDATE It does not have to be textarea though, I am using a contenteditable div so I can parse it on live if needed, again, I have no idea how.
has comment: http://stackoverflow.com/comment/41375358

http://stackoverflow.com/comment/41527811
has text: @ruakh: I'd implement IEEE-style equality for the "ieee32" and "ieee64" types, and equivalence-based equality for the others [note, however, that the only promotions allowed with the equality-test operator would be lossless integer promotions; to when different values of different FP types, I would require code to cast one value to match the precision of the other, since neither direction of cast would be semantically correct in all cases].
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26426444
type: AnswerComment

http://stackoverflow.com/comment/41621217
score: 0
type: Comment
has text: already tried that, it needs to rotate so that it's positioned top left after rotation
comment on: http://stackoverflow.com/a/26491683
type: AnswerComment

http://stackoverflow.com/comment/41661647
comment on: http://stackoverflow.com/a/26498454
has text: I refer to the case: While using routers show those subview parts, when I refresh after I click tab of homeview to show the subview whole page as intended, the route to it in router is reached so its corresponding method, which creates a subview instance and call render of it from inside router. But in general, first, the app is loaded with home view before it reaches a point it shows a subview upon a click event to navigate to subviews route, and it already have rendered its, homeview, own parts like title bar and navbar that includes clickable tabs to show the subviews.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26422927
has title: Open differents divs from the same function
type: Question
has comment: http://stackoverflow.com/comment/41491283
tagged with: javascript
tagged with: jquery
score: 0
has body: I try open differents divs from the same function , my idea it´s change the name of div in each click for generate random divs and call each div My Script : function load_edit(id,data) { var number = 1 + Math.floor(Math.random()*9999999); //alert("ok"+number); jQuery(".db_edit_float_content").attr("id","db_edit_float_content"+number); jQuery("#db_edit_float_content"+number).slideDown(2000); jQuery(""+id).show(1000).load("edit.php"+data); } The Code HTML : The script works perfectly , but no get different divs in each click , only shows one and nothing more , i think must works because the name of id change , but no get finally works right Thank´s for the help , the best regards
answer count: 1
has answer: http://stackoverflow.com/a/26422990
has comment: http://stackoverflow.com/comment/41491237
has comment: http://stackoverflow.com/comment/41491629
type: UnansweredQuestion

http://stackoverflow.com/q/26475641
answer count: 0
has comment: http://stackoverflow.com/comment/41639938
type: Question
has title: DFP AD Code (Javascript) causing PHP Notice: Undefined index Errors
tagged with: session
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41588651
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41588995
tagged with: php
has body: I've recently notice a large number of PHP "Undefined index" errors in my php logs. The errors all looked like this (but were for many different variables (this one is for gender) and different lines) and all are $_SESSION Variables: I think worked through the related site code to work out what was causing the errors. Finally I've found if I comment out the DFP AD Slots (Javascript - shown below) the errors stop occuring. (there are more slots - I've just shown one)

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/26466555

http://stackoverflow.com/comment/41463699
has text: it's looks to basically be a "let's try and be cute" version of `if info.hasClass('has-error') { info.removeClass('has-error') } else { info.addClass('has-error'); }`
type: Comment
comment on: http://stackoverflow.com/q/26407429
score: 0
type: QuestionComment

http://stackoverflow.com/q/26413084
has title: Javascript: Cannot assign to read only property '_epoch' of false
upvote count: 6
has comment: http://stackoverflow.com/comment/41474287
has comment: http://stackoverflow.com/comment/41474173
has comment: http://stackoverflow.com/comment/41474450
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41474196
has answer: http://stackoverflow.com/a/26478723
linked to: http://stackoverflow.com/q/2428409
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26478723
score: 6
tagged with: google-api-js-client
favorite count: 0
has body: I have a method to process the response from my google javascript client (gapi): var processResponse = function(response) { result._state = 'loaded'; response._epoch = (new Date()).getTime(); ... A few times I have gotten the following error: TypeError: Cannot assign to read only property '_epoch' of false at processResponse (http://0.0.0.0:9000/scripts/services/haparaapi.js:110:31) at wrappedCallback (http://0.0.0.0:9000/bower_components/angular-scenario/angular-scenario.js:20892:81) at http://0.0.0.0:9000/bower_components/angular-scenario/angular-scenario.js:20978:26 at Scope.$eval (http://0.0.0.0:9000/bower_components/angular-scenario/angular-scenario.js:21967:28) at Scope.$digest (http://0.0.0.0:9000/bower_components/angular-scenario/angular-scenario.js:21796:31) at Scope.$apply (http://0.0.0.0:9000/bower_components/angular-scenario/angular-scenario.js:22071:24) at http://0.0.0.0:9000/bower_components/angular-gapi/modules/gapi-client.js:121:32 at https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_GB.hE_reuZ6VdE.…/ed=1/am=AQ/rs=AGLTcCPj66Crj6soG8dKJE8lBSc_RPXXKA/cb=gapi.loaded_0:604:138 at https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_GB.hE_reuZ6VdE.…/ed=1/am=AQ/rs=AGLTcCPj66Crj6soG8dKJE8lBSc_RPXXKA/cb=gapi.loaded_0:579:311 at Object.&lt;anonymous&gt; (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_GB.hE_reuZ6VdE.…1/ed=1/am=AQ/rs=AGLTcCPj66Crj6soG8dKJE8lBSc_RPXXKA/cb=gapi.loaded_0:163:76) This bug doesn't usually happen so I haven't managed to log what the response actually looked like. What does the error mean? Should I not be assigning values to the response?

http://stackoverflow.com/comment/41368544
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26354339
score: 0
has text: could you try lynda.com without the extension? It redirects visitors to a different page (course browser).

http://stackoverflow.com/comment/41466157
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26408789
has text: @deKajoo if you don't reference the item, you would be going against `$scope.showfull`
type: Comment

http://stackoverflow.com/comment/41512250
comment on: http://stackoverflow.com/q/26433663
type: Comment
type: QuestionComment
has text: there is no `d.results` you just want `data.d.ApprovalCounter` without using `each`
score: 1

http://stackoverflow.com/a/26374026
has comment: http://stackoverflow.com/comment/87464517
answers question: http://stackoverflow.com/q/26373737
has comment: http://stackoverflow.com/comment/87126493
type: Answer
has comment: http://stackoverflow.com/comment/41429168
downvote count: 0
score: 21
has comment: http://stackoverflow.com/comment/41431015
has comment: http://stackoverflow.com/comment/87117914
has comment: http://stackoverflow.com/comment/41441293
upvote count: 21
has body: TL;DR: You cannot do this. You can use Data URI Scheme to embed an image in HTML. If an emails MIME type is text/html you can do the same. You will have to encode your image with a suitable encoding (e.g.: base64). For example: However, you cannot include HTML in the body part of the mailto: URL. The content of the body parameter is considered plain-text as per RFC 2368. The special hname "body" indicates that the associated hvalue is the body of the message. The "body" hname should contain the content for the first text/plain body part of the message. The mailto URL is primarily intended for generation of short text messages that are actually the content of automatic processing (such as "subscribe" messages for mailing lists), not general MIME bodies. So if you use a URL encoded HTML as the body parameter of a mailto: URL, here is what happens: Write Email! Result:

http://stackoverflow.com/q/26435894
has answer: http://stackoverflow.com/a/26435942
score: -2
tagged with: performance
has answer: http://stackoverflow.com/a/26435954
downvote count: 2
accepted answer: http://stackoverflow.com/a/26435970
tagged with: javascript
tagged with: jquery
answer count: 4
has body: Are there any site that allow developers to truly and dependably see how their app/site will look on various devices/platforms/versions?
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26435970
has title: Is there any dependable way to see my web-app on different browsers/platforms
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/26435942
has answer: http://stackoverflow.com/a/26435958

http://stackoverflow.com/comment/41510880
has text: How did you miss the `Error: Bootstrap's JavaScript requires jQuery` message in the JavaScript error console??
comment on: http://stackoverflow.com/q/26430908
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26370662
has body: I'm trying to parse a price out of a html document: Here is how the HTML element looks like: 0,11€ Total: There is a , and I don't want to be restricted to either the left or the right side of the ,, in the example above I would love to get the int 11 and for 399,99 I would love to get 39999. Here is my current solution: var currentPrice = parseFloat(document.getElementById("market_buynow_dialog_totals_total").innerHTML.replace(/[,€]/g, "")); However there is an exception that breaks my little solution: The price can be 300,-- or 250,-- too at times. In this cases currentPriceis 300 or 250 instead of the desired 30000 or 25000. I'm trying to find an elegant and especially short solution for this problem. Can you help me out?
tagged with: parsing
tagged with: parsefloat
possible better answer: http://stackoverflow.com/a/26370755
has answer: http://stackoverflow.com/a/26370755
type: AnsweredQuestion
type: Question
score: 0
answer count: 2
tagged with: javascript
has title: Parsing a price with , and ,-- exception with parseFloat()
has answer: http://stackoverflow.com/a/26370860
accepted answer: http://stackoverflow.com/a/26370860

http://stackoverflow.com/a/26415553
has comment: http://stackoverflow.com/comment/41478925
downvote count: 0
has comment: http://stackoverflow.com/comment/41478854
has comment: http://stackoverflow.com/comment/41478744
type: Answer
has body: You can do this using a callback ... var r = s.replace(/"[^"]+"/g, function(v) { return v.replace(/,/g, '###'); });
has comment: http://stackoverflow.com/comment/41480198
has comment: http://stackoverflow.com/comment/41480326
has comment: http://stackoverflow.com/comment/41479918
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/41479757
has comment: http://stackoverflow.com/comment/41478772
answers question: http://stackoverflow.com/q/26415470

http://stackoverflow.com/q/26452054
favorite count: 0
possible better answer: http://stackoverflow.com/a/26452078
score: 0
has answer: http://stackoverflow.com/a/26452064
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26452305
has answer: http://stackoverflow.com/a/26452072
answer count: 4
upvote count: 2
downvote count: 2
has body: I'm looking for a good way to get one or more usernames preceded by a @ symbol in a string. Some example strings could be: "@username this is just a test string" "Blabla bla @username this is just a test string" "Message for @username1, @username2 and @username_three: this is just a test string! - @username4" Any solutions? I've not been able to find anything.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26452064
type: Question
has answer: http://stackoverflow.com/a/26452078
has title: Javascript: get username substring(s) beginning with @ symbol
tagged with: javascript

http://stackoverflow.com/comment/41530547
has text: personally I find this a bit misleading mentioning the selector which never has anything to do with whether a method is defined or not. `$('failedSelector')` will always be an object ( assuming jQuery is available)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26443353

http://stackoverflow.com/q/26502824
has body: In bootstrap JS (I checked version 3.2.0) some function definitions have a plus sign at first and 'use strict'; in the following: +function ($) { 'use strict'; ... } 'Use strictly'; as I guess is AMD definition syntax maybe. Can someone explain about this syntax and meaning and where is better to use this pattern? Thanks. UPDATE: It seems the + sign (Or any arbitrary unary operator) uses to turn the function declaration into an expression. Check here for more info: https://stackoverflow.com/a/11897575/332420
tagged with: javascript
score: 2
accepted answer: http://stackoverflow.com/a/26503006
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41638764
has title: Bootstrap JS functions definitions
has comment: http://stackoverflow.com/comment/41638186
linked to: http://stackoverflow.com/q/11897423
type: AnsweredQuestion
upvote count: 2
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26503006
type: Question
has comment: http://stackoverflow.com/comment/41637346

http://stackoverflow.com/comment/41614308
has text: listening to hashchange will not work in html5mode. always use $routeChangeStart with angular
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26490105

http://stackoverflow.com/comment/41600409
type: QuestionComment
has text: in which case just put all the code in (named) functions and _reinvoke those functions!_
comment on: http://stackoverflow.com/q/26482250
score: 0
type: Comment

http://stackoverflow.com/q/26410893
tagged with: angularjs
type: AnsweredQuestion
has title: Angular Module Loading
type: Question
has answer: http://stackoverflow.com/a/26411605
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26411605
has body: If I have this module: angular.module('myMod', []) .factory('MyService', ['$http', 'Common', function ($http, Common) { var neededUrl = Common.myUrl; }]); And I loaded up my app modules this way: angular.module('myApp', [ 'myMod' ]) .factory('Common', function () { return { myUrl: "/Some/Url" } }); Will myMod be able to pick up on the Common dependency and load it up? Or is it better to do this: angular.module('common.module', []) .factory('Common', function () { return { myUrl: "/Some/Url" } }); angular.module('myApp', [ 'common.module', 'myMod' ])
answer count: 1

http://stackoverflow.com/q/26440555
tagged with: angular-promise
upvote count: 1
type: Question
has body: I want to create a cache for my http requests, so I want to duplicate the $http callbacks. this is my function: function getData() { if(cacheExists()) { return cache; } return $http({ method: 'POST', url: 'http://something.com', params: {something} }); } and this is how I handle it: getData() .success(function(data) { $scope.spot = data.data; console.log($scope.spot); }).error(function(data) { console.log('error'); }); this will work perfectly with angularjs $http method, but will not work with my "cache", becuase the "cache" should have those callbacks: success &amp; error, how do I create them?
type: AnsweredQuestion
score: 1
tagged with: caching
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: callback
favorite count: 0
tagged with: angularjs
has title: AngularJS callback, copy the behavior of $http. Turn cache into promise
has answer: http://stackoverflow.com/a/26440773
accepted answer: http://stackoverflow.com/a/26440773

http://stackoverflow.com/comment/41405715
comment on: http://stackoverflow.com/q/26373987
has text: Why can't you just use a form?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41610480
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63413/discussion-between-sean-lafferty-and-lars-kotthoff).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26477860

http://stackoverflow.com/q/26506653
has body: i want to show the specific form by id using jstl.in my view i have list of data.and for each list there is button for editting that data for that particular list. &lt;c:choose&gt; &lt;c:when test="${!empty lists}"&gt; &lt;c:forEach items="${lists}" var="list"&gt; &lt;table class="data"&gt; &lt;input type="submit" value="edit list" id="${list.listNo }" onClick="openEdit(id)" class="blue_button" style="width: 94%;" /&gt; &lt;form:form id="${list.listNo }" style="display:none;" method="post" action="//${list.listNo}" modelAttribute="list"&gt; &lt;table id="list"&gt; //it contains form data for list ,its generating form for each listno.this list no is integer like 234,777. so what should i include in my javascript code so that it will show that particular form.?
score: 0
answer count: 1
has title: how to display data which contains number in div id in jstl
type: UnansweredQuestion
tagged with: spring-mvc
type: Question
tagged with: jstl
tagged with: javascript
has answer: http://stackoverflow.com/a/26735079

http://stackoverflow.com/a/26357673
has body: the error at this line was the issue. Table rows starts from 0 index. so dont need to increment the rows index change to this table.rows[i].cells[0].innerHTML = (i + 1);
answers question: http://stackoverflow.com/q/26357499
score: 0
type: Answer

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/26434783
tags question: http://stackoverflow.com/q/26397741
tags question: http://stackoverflow.com/q/26481339
tags question: http://stackoverflow.com/q/26453703
type: Tag
tags question: http://stackoverflow.com/q/26493664

http://stackoverflow.com/comment/41435796
comment on: http://stackoverflow.com/a/26370354
has text: @lonesword it will base the changes on bitmap regional changes wheater they are a line, icon, text etc. - it sees all as a bitmap change (differential) and will try to capture the smallest region of change and transfer that as a bitmap block encoded in various ways (exception for VNC is of course key strokes and mouse position). The key here IMO is to establish a simple protocol/JSON definition that will allow you to use simple commands for drawing operations and byte streams/base-64 for pure bitmap data (ie. images).
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41473324
has text: your best bet is to recreate the javascript functions in c# and process the html after you retrieve it.
comment on: http://stackoverflow.com/q/26412578
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/45116283
type: Comment
comment on: http://stackoverflow.com/a/28387546
has text: Thanks for the pointer! I'm (a little) surprised that you're saying this basic building block has fundamental internal problems. I hope the team over there looks at your solution. However, my question was more general: I was looking for overall guidance on AngularJS memory leak protection and best/expected practices.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41571115
type: Comment
type: QuestionComment
has text: When i submit the form Firefox gives me a pop-up asking me which account i would like to change the password for, i then select the account i am logged in as but then nothing happens
score: 0
comment on: http://stackoverflow.com/q/26466220

http://stackoverflow.com/comment/41479796
comment on: http://stackoverflow.com/q/26416102
has text: how can i do that?i mean what method should use, or what topic should i make research on? @Felk
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41631853
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26492417
has text: Thank you so much! Building the object first fixed it!!
score: 0

http://stackoverflow.com/comment/41485812
type: Comment
type: QuestionComment
has text: possible duplicate of [PhantomJS failing to open HTTPS site](http://stackoverflow.com/questions/12021578/phantomjs-failing-to-open-https-site)
comment on: http://stackoverflow.com/q/26415188
score: 0

http://stackoverflow.com/q/26391208
score: 0
answer count: 1
tagged with: pyramid
type: UnansweredQuestion
tagged with: python
tagged with: templates
has body: I'm adding a page to a complex Pyramid-based app that uses Handlebar templates. I need a file download URL that doesn't need a template, but the system is giving me a 404 code for missing template anyway. How do I tell a view at configuration time "do not use a handlebar template with this one?"
has answer: http://stackoverflow.com/a/26392168
type: Question
has title: Pyramid app with handlebar.js: I don't need a template for this view; how to disable?
tagged with: javascript

http://stackoverflow.com/q/26493281
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41620141
tagged with: ajax
has answer: http://stackoverflow.com/a/26493534
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
score: 0
has title: How to add classes for each piece of text pulled by Ajax from another site
has answer: http://stackoverflow.com/a/26493783
has comment: http://stackoverflow.com/comment/41620258
type: Question
answer count: 2
has body: i'm pulling data from my wordpress site, to my mobile site (different sites). Wordpress = php and mobile site = static html. Obviously i want the same content in both sites, because it is the 'same'. I've got to pull the data and display in HTML, now I need to manipulate that data, add classes, take chunks of text, is this possible? My code below: $(document).ready(function () { var pageName; var content; $('li a').on('click', function (){ pageName = $(this).attr('url'); $.ajax({ type: 'GET', url: 'http://mywebsite.com/' + pageName + '/?json=1', contentType: 'application/json', dataType: 'jsonp', success: function(data) { content = data.page.content; if (data.page.url === 'http://mywebsite.com/about/') { $('.testing').html(content); } else { $('.testing').html('nothing to do'); } }, error: function(error) { console.log(error); } }); }); }); I'm only accepting texts from my page "about" for now. Now, I need to take off some things, for example: There is a text in my about pages in the wordpress site: " Hi, my name it's Marcelo, i love girls " And i want display in the mobile app this: "Hi, my name it's Marcelo, i love" Or maybe adding a Class or a ID to use differently.. I don't know how manipulate the texts, titles, and images.. Any help is welcome.

http://stackoverflow.com/q/26414643
tagged with: node.js
type: AnsweredQuestion
tagged with: hello.js
has body: I've been wondering about this for a little bit and I've done a bit of searching, but found nothing (except for this, which is different). I'm attempting to clarify the differences between Hello.js and Passport.js, and figure out what the use cases are for both. On the surface, aside from one being client-side and one being node middleware, they seem to deliever similar functionality, and they are both modular. I've done a bit of poking around with Passport, but haven't tried Hello.js yet. What are the main differences between the two libraries, and what use cases would prefer one library over the other?
linked to: http://stackoverflow.com/q/11974947
score: 10
has answer: http://stackoverflow.com/a/26676449
tagged with: authentication
upvote count: 10
type: Question
answer count: 2
has title: Hello.js vs Passport.js?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41479825
tagged with: passport.js
favorite count: 0
accepted answer: http://stackoverflow.com/a/26676449
possible better answer: http://stackoverflow.com/a/36958619
has answer: http://stackoverflow.com/a/36958619

http://stackoverflow.com/comment/41602496
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26483380
has text: So, are you getting any console errors? Did you try adding the `http://`? Also, I'd rather see the IE icon, than having the browser open ;-)

http://stackoverflow.com/q/26358500
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
tagged with: bootstrap-tour
has title: How to skip 10 steps in Bootstrap Tour?
accepted answer: http://stackoverflow.com/a/26796372
has comment: http://stackoverflow.com/comment/42105782
has body: I have a situation, when I have a tour containing eleven steps. In each step the popup contains "Prev", "Next", "End Tour" buttons. Instead of using "End Tour" to "skip", I try to skip all the steps and go to the 11th step, but I can't get this to work. steps: [ { element: "#mobile", title: "Mobile Number", content: "Click ‘Next’ to view the next search field, Click ‘Previous’ to view the previous search field and click ‘skip’ to select End result.", placement: "right", backdrop: true, orphan: true, template: function (step) { return "&lt;div class='popover tour'&gt;&lt;div class='arrow'&gt;&lt;/div&gt;&lt;h3 class='popover-title'&gt;&lt;/h3&gt;&lt;div class='popover-content'&gt;&lt;/div&gt;&lt;div class='popover-navigation'&gt;&lt;button class='btn btn-xs btn-pink' data-role='prev'&gt;« Prev&lt;/button&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;button class='btn btn-xs btn-danger' data-role='next'&gt;Next »&lt;/button&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;button class='btn btn-xs btn-success' data-role='skip'&gt;Skip&lt;/button&gt; &lt;/div&gt; &lt;/nav&gt; &lt;/div&gt;" }, onNext: function () { dir = 'next'; }, onPrev: function () { }, onShown: function () { } } ] Here i am using data-role as "skip ".and how can i use this as a function like that onShow(), onEnd(), etc. I tried goTo(i) method also not working.
favorite count: 0
tagged with: twitter-bootstrap
upvote count: 1
has comment: http://stackoverflow.com/comment/42062698
possible better answer: http://stackoverflow.com/a/35579441
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42097059
has answer: http://stackoverflow.com/a/35579441
has answer: http://stackoverflow.com/a/26796372
type: Question

http://stackoverflow.com/a/26374533
has body: use session... First include jquery-1.9.1.js and jquery.session.js TO STORE: $(function() { $.session.set("myVar", "Hello World!"); }); TO READ: $(function() { alert($.session.get("myVar")); }); use: print_r($_SESSION); //to check what are the sessions created... more reference here
type: Answer
has comment: http://stackoverflow.com/comment/41425922
answers question: http://stackoverflow.com/q/26374458
score: 0

http://stackoverflow.com/comment/41481204
score: 0
has text: What do you mean by "*submitting a button*"?
comment on: http://stackoverflow.com/q/26417038
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41564620
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26462820
has text: @TrueBlueAussie "web applications that are not hosted at the domain root" what is this restriction? Question was not subjected to that kind of restriction right?

http://stackoverflow.com/q/26398352
has body: I implemented jasny bootstrap in one of my webpages for Offcanvas push menu. It opens whenever i click on the button. But it closes when either I click on button again or anywhere outside(body) of Jasny Off-canvas . How do i call a function whenever jasny off-canvas is closed. I searched for events but only body class is appended to (.canvas-slid) when canvas opens and this class gets removed on closing. Jasny canvas i implemented is : http://jasny.github.io/bootstrap/examples/navmenu-push/
tagged with: jasny-bootstrap
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26398788
accepted answer: http://stackoverflow.com/a/26398788
upvote count: 1
has title: Call a function on closing Jasny Off canvas
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/41500487
has text: @user3710243 - why not? The plugin method is poorly written if it can't handle more than one target element at a time. What user experience problem are you actually trying to solve?
comment on: http://stackoverflow.com/a/26427615
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26390662
downvote count: 0
favorite count: 0
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/26390795
type: AnsweredQuestion
tagged with: underscore.js
has body: Is it possible from a backbone.js view to render an underscore.js template with a variable that is not defined in the related Backbone.js model? take the can't find variable: username error. the template to be rendered: <input id="username" type="text" placeholder="Username" name="username" value= <%=username%> > Remember me Login Register rendering line from the view: this.$el.html( this.template_login( this.loginModel ) ); line form the loginModel model file: define([ 'underscore', 'backbone', ], function(_, Backbone) { var LoginModel = Backbone.Model.extend({ urlRoot: '/login', initialize: function(){ this.fetch(); }, }); return LoginModel; }); I set the model manually. But still take the can't find variable error as in the first render case. same model above: define([ 'underscore', 'backbone', ], function(_, Backbone) { var LoginModel = Backbone.Model.extend({ urlRoot: '/login', defaults: { username: "abc", }, initialize: function(){ this.fetch(); }, }); return LoginModel; }); Both cases result in: ReferenceError: Can't find variable: username Only if I give an hardcoded model json into the template_login it works. this.$el.html( this.template_login( {username: "Joe"} ) );
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/26391778
has title: Rendering Backbone.js view with template variable undefined in the model
type: Question
has answer: http://stackoverflow.com/a/26391778
tagged with: javascript
has answer: http://stackoverflow.com/a/26390795
answer count: 2

tcp
type: Tag
tags question: http://stackoverflow.com/q/26382523
tags question: http://stackoverflow.com/q/26478673
tags question: http://stackoverflow.com/q/26358273
tag name: tcp

http://stackoverflow.com/a/26510080
has comment: http://stackoverflow.com/comment/41650333
score: 3
accepted answer of: http://stackoverflow.com/q/26509976
downvote count: 0
answers question: http://stackoverflow.com/q/26509976
has comment: http://stackoverflow.com/comment/41650350
has body: for in is for iterating properties, so I suppose you could do: for(var i=0; i &lt; app.members.length; i++) { for (var prop in app.members[i]) { output.innerHTML += ("&lt;p&gt;&lt;b&gt;" + prop + ":&lt;/b&gt; " + app.members[i][prop] + "&lt;/p&gt;"); } }
has comment: http://stackoverflow.com/comment/41650354
has comment: http://stackoverflow.com/comment/41650407
has comment: http://stackoverflow.com/comment/41650444
has comment: http://stackoverflow.com/comment/41650321
has comment: http://stackoverflow.com/comment/41650280
upvote count: 3
has comment: http://stackoverflow.com/comment/41650286
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26485049
has comment: http://stackoverflow.com/comment/42967756
tagged with: getusermedia
has body: In pre-WebRTC googletalkplugin days, one could disable AGC (automatic gain control for the microphone) by adding audio-flags: 1 to the config file. However, since Google Hangouts now use WebRTC, it often happens that while I'm chatting with someone, my microphone level shoots all the way down so that I'm more or less silent on the other side. I've also had correspondents whose mic volume was boosted all the way up, repeatedly. I've reproduced this behaviour on http://opentokrtc.com/ which also uses WebRTC. By making loud popping sounds into my microphone, I can get the level to go all the way down in a few steps. I can do this both on Chrome 38 and FireFox 34 beta. However, when I use a local application, such as Audacity, on my Ubuntu 14.04.1 machine, I am not able to affect the microphone level by making loud popping noises. In other words, it really looks like WebRTC is the culprit here. It seems that on Chrome's implementation, one can configure WebRTC AGC by passing the googAutoGainControl to the getUserMedia() call. On FireFox I have not been able to find the equivalent. My question is: As a WebRTC end-user, how can I configure my browser (Chrome or FireFox) to disable AGC, as AGC does not work correctly on my setup?
favorite count: 0
has comment: http://stackoverflow.com/comment/42986440
has comment: http://stackoverflow.com/comment/42950814
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41607122
has answer: http://stackoverflow.com/a/37469476
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/45942469
has answer: http://stackoverflow.com/a/29485265
has comment: http://stackoverflow.com/comment/45942546
score: 17
upvote count: 17
type: Question
answer count: 2
tagged with: firefox
downvote count: 0
tagged with: webrtc
tagged with: javascript
has title: How can I disable automatic gain control (AGC) in WebRTC web-apps such as Google Hangouts or OpenTokRTC

http://stackoverflow.com/a/26450351
score: 0
type: Answer
has body: A good solution is to find marker with specified attribute : $(data).find("marker[name='your name']") this will select a marker with specified name. source : http://api.jquery.com/attribute-equals-selector/
answers question: http://stackoverflow.com/q/26448752
has comment: http://stackoverflow.com/comment/41565457
has comment: http://stackoverflow.com/comment/41554454

http://stackoverflow.com/q/26468777
type: Question
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
tagged with: jquery
has title: How to make images visible in when lazy loading
score: 0
answer count: 1
tagged with: lazy-loading
has comment: http://stackoverflow.com/comment/41575321
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26468901
tagged with: css
has body: I am trying to "lazy load" a bunch of pictures using jquery but they don't appear on the screen when loading the page. I know xhtml, basic js and css. I have seen many different solutions to "lazy load" but I haven't been able to make any of them work. This is the code: My question is: what is it that I am doing wrong so that when I load the page the file "image.jpg" doesn't appear.

http://stackoverflow.com/a/26552241
type: AcceptedAnswer
type: Answer
has body: I was able to resolve this issue by putting another script import for the controllers directly into the main.html.
answers question: http://stackoverflow.com/q/26510561
accepted answer of: http://stackoverflow.com/q/26510561
score: 0

http://stackoverflow.com/q/26407897
type: Question
tagged with: php
has body: below is my current code that pulls the html BEFORE &lt;td class="winner betting-movement"&gt; 11/8&lt;img src="/images/site/blue-arrow-small.gif" width="6" height="11"&gt;6/4 &lt;/td&gt; Then replaces images with text After &lt;html&gt;&lt;body&gt;&lt;td class="winner betting-movement"&gt;$movement = $article-&gt;childNodes-&gt;item(12)-&gt;ownerDocument-&gt;saveHTML($article-&gt;childNodes-&gt;item(12))."&lt;br /&gt;"; &lt;? php @$dom3-&gt;loadHTML($movement); $xpath5 = new DOMXPath($dom3); foreach($xpath5-&gt;query('//img[contains(@src, "blue")]') as $link) { $link-&gt;parentNode-&gt;replaceChild($dom3-&gt;createTextNode(" &gt; "), $link); } foreach($xpath5-&gt;query('//img[contains(@src, "red")]') as $link) { $link-&gt;parentNode-&gt;replaceChild($dom3-&gt;createTextNode(" &lt; "), $link); } echo $dom3-&gt;saveHTML();?&gt; works great but all i need to do now is output the new saved html as just the inner text e.g "11/8 &gt; 6/4" echo $dom3-&gt;saveHTML()-&gt;textContent; sadly the last line doesn't work and im reaching out to see if anyone could point me in a quick fix for this?
has title: DomDocument -> outputting changed html
score: 0
has answer: http://stackoverflow.com/a/26408049
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41465491

http://stackoverflow.com/comment/41435312
has text: Then godspeed, and no insult. I should expect reproach when trying to help others. And I am unable to comment and find out more about the issue in question, so it makes it a little hard so I'm helping in any way I can. Hopefully OP can see the practical in what is there. I'm answered A, to the best of my ability. I apologize it's not to your liking, I'm new. So thank you for your comment I will try to teach people to fish for steak instead. Thank you Alvaro. :)
type: Comment
comment on: http://stackoverflow.com/a/26390341
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41516103
score: 0
comment on: http://stackoverflow.com/q/26435663
type: QuestionComment
has text: Might want to check out [this post](http://stackoverflow.com/questions/8036167/how-can-i-fix-the-webpage-orientation-to-portrait-only-for-ipad-and-iphone)
type: Comment

http://stackoverflow.com/comment/41492364
type: QuestionComment
has text: Quentin: I didn't find my answer there. And that's the reason I have added the new question. Also in my question I have added that in NOTE section. Some answer links are showing 404 on the [thread](http://stackoverflow.com/questions/720826/how-to-check-if-a-visitor-is-using-the-latest-version-of-his-her-browser)
comment on: http://stackoverflow.com/q/26423193
score: 0
type: Comment

http://stackoverflow.com/comment/41500366
score: 0
has text: @mitchj -- what about the state and the status? (My bet: status is 500.)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26414295

http://stackoverflow.com/a/26529656
answers question: http://stackoverflow.com/q/26453226
type: Answer
score: 1
upvote count: 1
has body: I've seen something similar to this. This MSDN article may explain it. Handling daylight saving time using JavaScript http://msdn.microsoft.com/en-us/library/ie/jj863688%28v=vs.85%29.aspx In Windows Internet Explorer 9 and previous versions of Windows Internet Explorer, dates are customized by applying the ECMAScript specification's rules for storing daylight saving time adjusted times internally. To improve accuracy, especially with dates in the past (historical dates), Internet Explorer 10 relies on the system's rules for storing daylight saving time adjusted times. This topic contains the following sections:
downvote count: 0

http://stackoverflow.com/q/26368863
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/41430754
downvote count: 0
score: 1
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/26389780
has body: Did the latest version of android chrome break jquery pageY values or am I missing something completely? Specifically the pageX/pageY values returned from a mouse event. &lt;script&gt; $( document ).on( "click", function( event ) { $( "#log" ).text( "pageX: " + event.pageX + ", pageY: " + event.pageY ); }); &lt;/script&gt; http://api.jquery.com/event.pagex/ Everything looks great on Windows Chrome, or Android Firefox. The values displayed on this page when tapping/hovering are WAY wrong for android chrome. Negative numbers, larger number than expected, numbers changing when zooming/scrolling when they shouldn't etc. I've tried a couple different builds of jquery on the jsfiddle site, all broken for android chrome. Here's a fiddle with it changed to "click" instead of "mousemove": http://jsfiddle.net/eLvbmqdg/4/ Again, desktop, iphone, and android firefox work as expected. Android chrome 38.0.2125.102 seems very broken. I have code in production that expects pageY to be... accurate. That code hasn't been changed in a while, and all of a sudden things are breaking. Ideas? Is anyone else seeing this? Was this always broken somehow?
tagged with: javascript
tagged with: jquery
answer count: 2
upvote count: 1
has title: Did Android chrome pageY value change with the latest chrome update?
has answer: http://stackoverflow.com/a/26391374
favorite count: 0

three.js
tags question: http://stackoverflow.com/q/26472717
tag name: three.js
tags question: http://stackoverflow.com/q/26389311
tags question: http://stackoverflow.com/q/26497903
tags question: http://stackoverflow.com/q/26427233
tags question: http://stackoverflow.com/q/26504971
tags question: http://stackoverflow.com/q/26487858
tags question: http://stackoverflow.com/q/26387075
tags question: http://stackoverflow.com/q/26376411
tags question: http://stackoverflow.com/q/26483167
tags question: http://stackoverflow.com/q/26371847
tags question: http://stackoverflow.com/q/26466798
tags question: http://stackoverflow.com/q/26463244
tags question: http://stackoverflow.com/q/26400534
tags question: http://stackoverflow.com/q/26434614
type: Tag
tags question: http://stackoverflow.com/q/26438566
tags question: http://stackoverflow.com/q/26458711
tags question: http://stackoverflow.com/q/26400058
tags question: http://stackoverflow.com/q/26488739
tags question: http://stackoverflow.com/q/26418591
tags question: http://stackoverflow.com/q/26437657
tags question: http://stackoverflow.com/q/26381461
tags question: http://stackoverflow.com/q/26431651
tags question: http://stackoverflow.com/q/26364846
tags question: http://stackoverflow.com/q/26400570
tags question: http://stackoverflow.com/q/26383573
tags question: http://stackoverflow.com/q/26456410
tags question: http://stackoverflow.com/q/26415626

http://stackoverflow.com/q/26508237
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/26508426
score: 2
type: AnsweredQuestion
has title: Chrome Extension Shortcuts
has body: I'm writing a simple extension that has a .js file with only 2 functions and a listener (which only writes to Console - but I can't see it and not sure it catches anything). I'd like to have shortcuts assigned, let's say Ctrl+Shift+1 and Ctrl+Shift+2 to both functions. I'm not exactly sure how to do it, and if it's possible. The data I've been able to gather online didn't cover what I'm looking for. I have no need for html popup. All I want is to press the shortcut and have the correspondent javascript function execute. This is how my manifest.json file looks like: { "manifest_version": 2, "name": "Simple Extension", "description": "This extension barely does anything.", "version": "1.0", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" //not sure I even need this }, "background": { "scripts": ["popup.js"] }, "commands": { "funcA": { "suggested_key": { "default": "Ctrl+Shift+1" }, "description": "Executes Func A" }, "funcB": { "suggested_key": { "default": "Ctrl+Shift+2" }, "description": "Executes Func B" } } } After installing the extension I saw on 'Keyboard Shortcuts' on the Extension tab that the shortcuts assignment worked well, but it's unclear to me what binds the shortcut to the javascript function itself. Do I have to use a listener and then do the call manually ? Edit: This is the listener in my .js file: chrome.commands.onCommand.addListener(function(command) { console.log('Command:', command); });
tagged with: google-chrome
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26508426
tagged with: google-chrome-extension
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26412401
has body: I want to change the default filter from Jquery Mobile lists, like that: Apple Banana Cherry Cranberry Grape Orange I found this page, from jquery mobile API documentation, that show how to do. Jquery Mobile Documentation Custom Filter Example This is the code. It would search by the line number, and not by the text: $( document ).on( "mobileinit", function() { $.mobile.filterable.prototype.options.filterCallback = function( index, searchValue ) { var idx; if ( searchValue ) { searchValue = searchValue.split( "," ); searchValue = $.map( searchValue, function( element ) { var ar = element.split( "-" ); return ar.length === 1 ? parseInt( element ) : [ [ parseInt( ar[ 0 ] ), parseInt( ar[ 1 ] ) ] ]; }); for ( idx = 0 ; idx < searchValue.length ; idx++ ) { if ( ( $.type( searchValue[ idx ] ) === "number" && index === searchValue[ idx ] ) || ( $.type( searchValue[ idx ] ) === "array" && index >= searchValue[ idx ][ 0 ] && index <= searchValue[ idx ][ 1 ] ) ) { return false; } } } return !!searchValue; }; }); But, unfortunately, I couldn't make it work. Here is what I did. The same code from the documentation above: My example I hope someone helps me to find the solution ^^ And another question. How will it work, if I use my javascripts at the end of the body? Thanks for the attention.
has comment: http://stackoverflow.com/comment/41500580
type: Question
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/41506606
upvote count: 1
tagged with: jquery
has title: Jquery Mobile List Custom Filter Search
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41475444
downvote count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/41495736
score: 1

http://stackoverflow.com/q/26447635
has answer: http://stackoverflow.com/a/26453994
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/21399482
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/46537663
has title: How to pass data from EJS template to AngularJS controller
tagged with: node.js
has answer: http://stackoverflow.com/a/46537663
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26453994
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/41539223
has body: I've got the user data from ExpressJS through NodeJS as following: app.js app.get('/user', function(req, res) { res.render('users', { title: 'Foo', user: req.user }); }); users.ejs &lt;%= user %&gt; I need the user data from user.ejs above to an angularjs controller, so I could display that on other named views. Could somebody help me with it?
tagged with: javascript
tagged with: express
tagged with: ejs
answer count: 2

http://stackoverflow.com/comment/42108712
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26617074
type: AnswerComment
has text: but i suggest you to use bootstrap and jquery for any development purpose, as polymer is in beta version yet

http://stackoverflow.com/a/26355053
accepted answer of: http://stackoverflow.com/q/26354510
type: Answer
answers question: http://stackoverflow.com/q/26354510
downvote count: 0
score: 3
has body: CasperJS just forwards the native PhantomJS event handler onResourceReceived: The response metadata object contains these properties: id : the number of the requested resource url : the URL of the requested resource time : Date object containing the date of the response headers : list of http headers bodySize : size of the received content decompressed (entire content or chunk content) contentType : the content type if specified redirectURL : if there is a redirection, the redirected URL stage : "start", "end" (FIXME: other value for intermediate chunk?) status : http status code. ex: 200 statusText : http status text. ex: OK The easiest way is to just look into casper.js to see what they do.
type: AcceptedAnswer
upvote count: 3

http://stackoverflow.com/q/26481326
possible better answer: http://stackoverflow.com/a/66225643
has answer: http://stackoverflow.com/a/66225643
tagged with: mongodb
answer count: 2
has answer: http://stackoverflow.com/a/26481522
downvote count: 0
tagged with: mongoose
tagged with: javascript
favorite count: 0
tagged with: node.js
tagged with: mongodb-query
accepted answer: http://stackoverflow.com/a/26481522
type: AnsweredQuestion
upvote count: 31
has body: I have the following model: var PersonSchema = new Schema({ name: String, groups: [ {type: Schema.Types.ObjectId, ref: 'Group'} ], }); I am looking for a query that retrieves all the Persons that are not part of a certain Group (i.e the persons' group array doesn't contain the id of the specified group). I was thinking about something like this, but I'm not sure it is correct: Person.find({groups: {$nin: [group._id]})
type: Question
score: 31
has title: Find documents with array that doesn't contains a specific value

http://stackoverflow.com/comment/41423077
type: AnswerComment
has text: @Apostolos You are right, it's kind of global. `objCounter` is best placed just before you define function `myCustomObject`. Have a look at the second solution too, it doesn't need events.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26381793

http://stackoverflow.com/a/26389710
has comment: http://stackoverflow.com/comment/127261334
answers question: http://stackoverflow.com/q/26385985
has body: The best place to look for documentation on how to do things is the API Documentation. It has documentation on each component and plugin and the options available for each. [Restated here and at the top of the answer because I only just added the link.] Documentation for the point labels is in the plugin API documentation for : PointLabels (plugins/jqplot.pointLabels.js). You can remove the zero value labels by adding the property hideZeros: true. This means changing: pointLabels: { show: true, }, to: pointLabels: { show: true, hideZeros: true }, There is a working JSFiddle. The full JavaScript: var s3 = [11, 28, 22, 47, 11, 11]; var s1 = [0, 6, 3, 0, 0, 0]; var s2 = [1, 0, 3, 0, 0, 0]; var dataArray = [s3, s1, s2]; var ticks = ['John', 'Tumm', 'Wen', 'Ken', 'Dolly']; var options = { title: 'Title ', stackSeries: true, seriesColors: ["#eb4b3d", "#ffc800", "#009149"], seriesDefaults: { renderer: $.jqplot.BarRenderer, pointLabels: { show: true, hideZeros: true }, rendererOptions: { barWidth: 25, varyBarColor: true, }, }, axes: { xaxis: { // renderer: $.jqplot.CategoryAxisRenderer, // renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks, }, yaxis: { //autoscale: true, //label: 'Application Count', min: 0, tickInterval: 5, max: 50 } }, axesDefaults: { tickRenderer: $.jqplot.CanvasAxisTickRenderer, tickOptions: { angle: -30, fontSize: '10pt' } } }; var plot = $.jqplot('chartDivId', dataArray, options); HTML: &lt;div id="chartDivId"/&gt;
score: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/127260484
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26385985
downvote count: 1
has comment: http://stackoverflow.com/comment/41447827

http://stackoverflow.com/a/26454660
type: Answer
answers question: http://stackoverflow.com/q/26454574
has comment: http://stackoverflow.com/comment/41550159
has body: Yes, JavaScript is object-oriented, so when you say new fn, it creates a new object. In your setup, your function has a name property, so you should be using "Hello " + sayHi.name to get the results you expect. You're going to want to read though this to get a good overview: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript
score: 0

http://stackoverflow.com/comment/41621492
type: QuestionComment
comment on: http://stackoverflow.com/q/26489636
has text: http://pastebin.com/b6wUXT9U Always go throught echo $res['id']; (line21), but never creates cookies (line 19,20)
score: 0
type: Comment

http://stackoverflow.com/comment/41625048
has text: Json returned in Not Valid .
type: AnswerComment
comment on: http://stackoverflow.com/a/26495650
score: 0
type: Comment

http://stackoverflow.com/comment/41466212
score: 0
type: Comment
type: QuestionComment
has text: Works fine here: http://codepen.io/paulroub/pen/pvtDE
comment on: http://stackoverflow.com/q/26408603

http://stackoverflow.com/a/26493416
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26484400
answers question: http://stackoverflow.com/q/26484400
type: Answer
score: 0
has body: I saw that you are using ExtJS 5.0.2.xxx, so if you don't have a problem using nightly builds, the latest ones (from Oct 14th 2014 on) fix this bug. Here is a report of this bug being found and fixed: http://www.sencha.com/forum/showthread.php?293325 Thanks,

http://stackoverflow.com/a/26497684
type: Answer
answers question: http://stackoverflow.com/q/26497284
has body: I'm not sure it's the way you wanna do it, but you should try to use global variables instead of text value from an element. I made a JSFiddle to show you what it could look like, you can change it the way you want to. DEMO /// global variables /// var valCount = 0; var value1 = ['first value', 'second value', 'third value']; var value2 = ['first 2nd value', 'second 2nd value', 'third 2nd value']; var value3 = ['first 3rd value', 'second 3rd value', 'third 3rd value']; //////////////////////// $('#plus').bind('click', function(){ calculateLink(); }); $('#minus').bind('click', function(){ calculateLink(true); }); function calculateLink(minus) { if(minus){ if(valCount == 0) valCount = (value1.length-1); else valCount--; } else{ if(valCount == (value1.length-1)) valCount = 0; else valCount++; } var url = "deskshop3.aspx?item1=" + value1[valCount] + "&amp;item2=" + value2[valCount] + "&amp;item3=" + value3[valCount]; document.getElementById('cashierLink').setAttribute("href", url); }
score: 0

http://stackoverflow.com/q/26394771
score: 0
has answer: http://stackoverflow.com/a/26395089
has comment: http://stackoverflow.com/comment/41442180
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26395129
has answer: http://stackoverflow.com/a/26395129
tagged with: http
type: Question
answer count: 2
has title: How to restrict a Web page to only open when a request for it comes from a specific referrer
has comment: http://stackoverflow.com/comment/41449404
has body: I'm writing a new JavaScript based Web app, which I need to secure in the following specific manner: I should only allow for my app's index.html to be served if the request for it comes from a specific site. By doing that, I will be forcing my users to go to that specific corporate site first, which will require for them to authenticate. Once the user is logged onto that site, they are provided with a link to my app. If my app's index.html is requested in any other way, beside following that corporate link, I would like to redirect the user to that corporate site. How can this be accomplished?
accepted answer: http://stackoverflow.com/a/26395089
tagged with: javascript

http://stackoverflow.com/comment/42142621
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26472445
has text: how do you edit `cordova.js` without its getting replaced on build?

http://stackoverflow.com/q/26371248
answer count: 1
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/22202569
has comment: http://stackoverflow.com/comment/41399640
has comment: http://stackoverflow.com/comment/41403879
has comment: http://stackoverflow.com/comment/41403614
has answer: http://stackoverflow.com/a/26389478
downvote count: 1
type: Question
has title: jquery.ui.maps with multiple markers and labels
has comment: http://stackoverflow.com/comment/41402146
tagged with: google-maps
has body: I'm using jquery.ui.maps and I'm populating the markers from json. Using the code below I see the labels where the markers should be but I only see one marker on the page. If I comment out 'marker': MarkerWithLabel then I see all of the markers but no labels. What do I need to do to see the label and the markers? $.each( result, function(i,marker) { $('#map_canvas').gmap('addMarker', { 'id': i, 'bounds': true, 'marker': MarkerWithLabel, 'labelContent': '&lt;a class="hint--top hint--always" data-hint="'+this.price+'"&gt;'+this.price+'&lt;/a&gt;', 'labelAnchor': new google.maps.Point(6, 10), 'labelClass': "labels", 'labelStyle': {opacity: 0.75}, 'labelInBackground': false, 'position': new google.maps.LatLng(marker.latitude, marker.longitude) }).click(function() { $('#map_canvas').gmap('openInfoWindow', { 'content': marker.street_address_full }, this); }); });
tagged with: javascript
tagged with: jquery
score: -1
tagged with: google-maps-api-3
upvote count: 0

http://stackoverflow.com/a/26497402
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26393160
accepted answer of: http://stackoverflow.com/q/26393160
type: Answer
score: 1
upvote count: 1
has body: I was missing [] in this line $data['cause'] = $this->input->post('cause'); After the addition of the missing braces like so: $data['cause'] = $this->input->post('cause[]'); I converted the value to string and then stored it. $cause_str = implode(",", $this->input->post('cause')); $data['cause'] = $cause_str; The formSubmitting hook told PHP back-end to expect an array and that is why it was necessary. UPDATE --> I wanted to improve the UX while using the multi select drop-down so I implemented a multi select drop-down with checkboxes next to items. I found a great example which helped me a great deal. Here's the updated updated method for creation of input according to item type for jquery jtable _createDropDownListMultiForField: function (field, fieldName, value, record) { //Create a container div // var $containerDiv = $(' '); var $containerDiv = $(' '); var $script = $(' ').appendTo($containerDiv); var $style = $(' ').appendTo($containerDiv); //Create multi-select element // var $select = // $(' ').appendTo($containerDiv); var $dl = $(' ').appendTo($containerDiv); var $dt = $(' ').appendTo($dl); var $a = $('').appendTo($dt); var $span = $('Cause Selector').appendTo($a); var $p = $(' ').appendTo($a); var $dd = $(' ').appendTo($dl); var $multiSelectDiv = $(' ').appendTo($dd); var $ul = $(' ').appendTo($multiSelectDiv); //Multi var options = this._getOptionsForField(fieldName,{ record: record, value: value, source: 'list', dependedValues: this._createDependedValuesUsingRecord(record, field.dependsOn) }); //Multi if (value) { console.log("Value: " + value); if (typeof value === 'string') { var values = value.split(','); } else { //(Object.prototype.toString.call(value) === '[object Array]') { values = value; } //add options $.each(options, function(index, element) { // $select.append(' ' + element.DisplayText + ' '); // $select.append(' ' + element.DisplayText + ' '); $ul.append(' ' + element.DisplayText + ' '); }); // $.each(values, function(index, element) { // $s…

http://stackoverflow.com/a/26503619
upvote count: 2
answers question: http://stackoverflow.com/q/26503012
has comment: http://stackoverflow.com/comment/41639261
has comment: http://stackoverflow.com/comment/41640250
type: Answer
has body: The .on() function is used to set up a listener function for an event, not add a custom event. Similarly, the .fireEvent() function is used to trigger an event on an object. AFAIK you can't define you're own events, and there is no "scrollToBottom" event in ExtJs. What you'll want to do is define your scrollToBottom code as a function, and then call this from your save button click handler
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41640024
has comment: http://stackoverflow.com/comment/41641100

http://stackoverflow.com/q/26489814
type: Question
has answer: http://stackoverflow.com/a/26490039
has body: Is it possible in JavaScript to have a loop that checks to see whether an image is available and then if it is, change the SRC of an img tag to match? The loop would have a counter so the first time it is run it would look for image1.png and the image2.png and so on. I want it to load image1.png once it is avaliable, and then check to see if image2.png is avaliable, and as soon as it is, load it into the page, and then do the same with image3.png and so on. I have tried using function imageExists(image_url){ var http = new XMLHttpRequest(); http.open('HEAD', image_url, false); http.send(); return http.status != 404; } from Check if image exists on server using JavaScript?, but I need the webpage to work locally on the computer, and this does not seem to work then. Is there any way to achieve this?
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/18837735
tagged with: http://stackoverflow.com/tag/html
tagged with: hostname
has title: JavaScript continually load images if avaliable
score: 0
type: UnansweredQuestion
tagged with: http

http://stackoverflow.com/comment/54118717
comment on: http://stackoverflow.com/a/26410742
type: AnswerComment
has text: +1 was relevant for me in the case that the svg has modified its w & h dimensions and those height & width attributes were no longer correct.
score: 0
type: Comment

http://stackoverflow.com/a/26436317
upvote count: 1
answers question: http://stackoverflow.com/q/26436042
downvote count: 0
score: 1
type: Answer
has body: Well, this is about how to read the document of bootstrap. $('#example').tooltip(options) just presents how to use the jquery method, and it is not right for the following html: Hover over me The method must be called in order to active the tooltips plugin. So, in order to make the html working with the plugin, you need to do two steps: add an id into the html, say, Hover over me call the jquery method, $('#tips').tooltip(options)
has comment: http://stackoverflow.com/comment/41526897

http://stackoverflow.com/comment/41554914
type: QuestionComment
has text: @StephanBranczyk Thanks. My images are in the res/drawables-hdpi folder
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26453703

http://stackoverflow.com/comment/41544587
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26451598
has text: @ProllyGeek -Actually, when I over the mouse on particular district area for my example like "Pune area". Only that Pune area part will be bring some up so that look like this is "Pune area"

http://stackoverflow.com/comment/112868607
score: 0
type: AnswerComment
type: Comment
has text: Arrays goes as string. you will need to stringy it I guess.
comment on: http://stackoverflow.com/a/34866891

http://stackoverflow.com/comment/41380527
comment on: http://stackoverflow.com/q/26360929
has text: @ShivamPandya You should tell your company!!! dont use these outdated code understand
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41616467
comment on: http://stackoverflow.com/a/26491202
score: 0
type: Comment
type: AnswerComment
has text: $('.kn-submit input[type="submit"]').trigger('click'); This one worked!

http://stackoverflow.com/a/26495650
answers question: http://stackoverflow.com/q/26495410
has comment: http://stackoverflow.com/comment/41624926
has body: You should set the contentType property on AJAX request to application/json. This will set proper header on request such that server will not attempt to populate $_POST in favor of you working with the raw input. function makeMove() { var move; $.ajax({ type: 'POST', url: url, contentType: "application/json" dataType: "json", async: false, data: boardToJSON(), success: function(msg) { move = msg; } }); } Assuming this works, you can access the boardSize property at: $myJson-&gt;boardSize; The other problem you have is that since you specify dataType: "json" you need to make sure you send back valid JSON, which you currently are not. This is not valid JSON: echo $myJson["boardSize"]; This would be (of course this is a trivial example): $returnObj = new stdClass(); $returnObj-&gt;boardSize = $myJson-&gt;boardSize; echo json_encode($returnObj);
downvote count: 0
has comment: http://stackoverflow.com/comment/41625131
has comment: http://stackoverflow.com/comment/41624590
score: 1
has comment: http://stackoverflow.com/comment/41624986
has comment: http://stackoverflow.com/comment/41625029
has comment: http://stackoverflow.com/comment/41625179
has comment: http://stackoverflow.com/comment/41625112
has comment: http://stackoverflow.com/comment/41625994
has comment: http://stackoverflow.com/comment/41625048
has comment: http://stackoverflow.com/comment/41625446
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41655591
type: QuestionComment
comment on: http://stackoverflow.com/q/26511888
has text: No sorry on collection change I try to run render() which should empty the container, and add all the models...but it seems to render the old collection again.
score: 0
type: Comment

http://stackoverflow.com/q/26463939
accepted answer: http://stackoverflow.com/a/26464293
has body: // Initialise Variables // type: 1 = primary 2 = secondary 3 = refined var food = { name:'food', type:1, total:0, increment:1, secondary:'skins', secondaryChance:0.1 }, wood = { name:'wood', type:1, total:0, increment:1, secondary:'herbs', secondaryChance:0.1 }, stone = { name:'stone', type:1, total:0, increment:1, secondary:'ore', secondaryChance:0.1 }, skins = { name:'skins', type:2, total:0, refined:'leather', increment:1 }, herbs = { name:'herbs', type:2, total:0, refined:'belief', increment:1 }, ore = { name:'ore', type:2, total:0, refined:'metal', increment:1 }, leather = { name:'leather', type:3, total:0, increment:0.5 }, belief = { name:'belief', type:3, total:0, increment:0.5 }, metal = { name:'metal', type:3, total:0, increment:0.5 } // Clicker type (who created the resource) player = 0 gatherer = 0 // Called when primary resource is clicked function primaryResourceClick(resource){ resource.total += resource.increment; console.log(resource + resource.total); x = Math.random(); console.log(x); if (resource.name == 'food'){ document.getElementById("food").innerHTML = food.total; if (x < food.secondaryChance) { skins += skins.increment; document.getElementById("skins").innerHTML = skins.total; console.log(skins + skins.total); } } if (resource.name == 'wood') { document.getElementById("wood").innerHTML = wood.total; if (x < wood.secondaryChance) { herbs += herbs.increment; document.getElementById("herbs").innerHTML = herbs.total; console.log(herbs + herbs.total); } } if (resource.name == 'stone') { document.getElementById("stone").innerHTML = stone.total; if (x < stone.secondaryChance) { ore += ore.increment; document.getElementById("ore").innerHTML = ore.total; console.log(ore + ore.total) } } }; Village Primary Resources Gather Food Food: 0 Cut Wood Wood: 0 Mine Stone Stone: 0 Secondary Resources Skins: 0 Leather: 0 Herbs: 0 Belief: 0 Ore: 0 Metal: 0 Whenever any of the secondary resources is updated, it shows as undefined. I've tried logging some data to t…
has title: JavaScript Variable displayed as undefined when it has been assigned a value
has comment: http://stackoverflow.com/comment/41566567
tagged with: undefined
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26464293
has comment: http://stackoverflow.com/comment/41566479
downvote count: 0
type: Question
score: 1
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41566544
tagged with: javascript
tagged with: variables
tagged with: console
favorite count: 0

http://stackoverflow.com/comment/41466871
comment on: http://stackoverflow.com/q/26408211
has text: That's a very interesting requirement. What is the use case ? And why do you want to do this ?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26457455
has answer: http://stackoverflow.com/a/26457662
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
has body: I'm trying to add an attribute to an angularJs element from a directive like this: element.attr('startOffset', val); But when I check the element, the attribute added is 'startoffset' where the 'o' is not a capital letter. Is there any way to add an attribute to an element and keep the case of the word intact? Thanks
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/51291095
tagged with: angularjs
has comment: http://stackoverflow.com/comment/81766260
has comment: http://stackoverflow.com/comment/41555215
has answer: http://stackoverflow.com/a/77023728
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41555303
has answer: http://stackoverflow.com/a/32195619
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41555206
accepted answer: http://stackoverflow.com/a/26457662
has comment: http://stackoverflow.com/comment/41555163
tagged with: javascript
score: 4
has title: Setting attribute value of an element in camelCase using a directive
possible better answer: http://stackoverflow.com/a/77023728

p5.js
tags question: http://stackoverflow.com/q/26393131
type: Tag
tag name: p5.js

http://stackoverflow.com/a/26386660
has comment: http://stackoverflow.com/comment/41427912
downvote count: 1
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/26385803
has comment: http://stackoverflow.com/comment/41427649
type: Answer
has comment: http://stackoverflow.com/comment/41427687
has body: Here's a code using jQuery native functions and without RegExp: var message = 'Another hurricane is coming here. And check out pictures here.'; var swap = function(msg){ var html = jQuery.parseHTML(msg); var result = ''; $.each(html, function(i, el){ var element = $(el).filter('a'); if(element.length > 0){ var number = element.data('number'); var text = '@[' + number + ']'; result += text; } else { result += $(el).text(); } }); return result; } swap(message); You shouldn't rely on RegExp because you might have several attributes for the HTML elements you're using. Here's a JSFiddle: http://jsfiddle.net/g3k3ovd4/
has comment: http://stackoverflow.com/comment/41427387
has comment: http://stackoverflow.com/comment/41427979

http://stackoverflow.com/comment/41605209
comment on: http://stackoverflow.com/a/26485172
has text: Hi Thruba, that's lots of code. The example I posted (see link above) has everything to replicate the problem, including an ajax call (if you wish to uncomment and reproduce the scenario).
type: Comment
score: 0
type: AnswerComment

drupal
type: Tag
tags question: http://stackoverflow.com/q/26512831
tag name: drupal
tags question: http://stackoverflow.com/q/26508462

http://stackoverflow.com/comment/41526322
has text: I suppose that you save the part until "ticketCtrl.$inject = ['$filter'];" in a separate .js file, right ?
score: 0
comment on: http://stackoverflow.com/a/26440222
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41377728
has text: Hey ostrgard. I was more wondering about the caching operation in general than for this specific purpose. But thank you for your answer.
type: Comment
comment on: http://stackoverflow.com/a/26359732
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41447083
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26397853
type: QuestionComment
has text: J-Dizzle can you elaborate? I replace my == with === and the scoring and referee functions still don't work.

http://stackoverflow.com/comment/41483855
has text: could you post the code you've got so far?
score: 0
comment on: http://stackoverflow.com/q/26418529
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41506753
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26429204
has text: I see, so there's no other way around it huh. That makes sense and understandable I think so that it will only have one source.
score: 0

http://stackoverflow.com/a/26355360
has body: Yes it is a "probleme" with bootstrap media queries. If you inspect the bootstrap css you will see that col-sm-xx is getting size after 768px, col-md-xx after 992px, viewport of A4 print is 670px? (Safe Width in Pixel for Printing Web Pages?). So you have to user col-xs-xx for print or add a media query to use col-sm-xx @media print { .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666666666666%; } .col-sm-10 { width: 83.33333333333334%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666666666666%; } .col-sm-7 { width: 58.333333333333336%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666666666667%; } .col-sm-4 { width: 33.33333333333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.666666666666664%; } .col-sm-1 { width: 8.333333333333332%; } } Might need to add more inside @media print
type: Answer
answers question: http://stackoverflow.com/q/26354611
has comment: http://stackoverflow.com/comment/41372401
accepted answer of: http://stackoverflow.com/q/26354611
upvote count: 12
has comment: http://stackoverflow.com/comment/41372603
score: 12
has comment: http://stackoverflow.com/comment/89342652
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41611052
has text: Well, with `(/.(?=[\d.]+)$/` it's not working at all since the `$` is outside the lookahead, but there are also other issues, since for exemple, in `333`, the first `3` would be matched by your `.`. You also do not consider the case where `''` must yield `'-'`.
comment on: http://stackoverflow.com/a/26488128
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41447869
score: 2
has text: this is like jsfiddel , its written i forum to use jsfiddel or else for better understanding
comment on: http://stackoverflow.com/q/26398392
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41653338
has text: Thanks for your prompt and succinct explanation. It worked perfectly!
comment on: http://stackoverflow.com/a/26494985
score: 0
type: AnswerComment
type: Comment

htmlpurifier
tag name: htmlpurifier
tags question: http://stackoverflow.com/q/26370634
type: Tag

http://stackoverflow.com/a/26356519
downvote count: 1
has body: Transforming the function so it returns itself By transforming the function so it returns itself, you can use the syntax func(p)(div) To make this work, you'll need to arrange for func to return itself. function selfify(fn) { return function self() { fn.apply(this, arguments); return self; }; } Then funcx = selfify(func); funcx(p)(div); Transforming the function so it is called on each argument If you would prefer the func(p, div) syntax, write the following kind of transformer, which creates a function which calls an underlying function on each of its arguments: function repeatify(fn) { return function() { Array.prototype.forEach.call(arguments, fn, this); }; } Then funcy = repeatify(func); funcy(p, div); This obviously won't work well if the underlying function takes two or more parameters. In ES6, using rest parameters, the above can be written somewhat more simply as function repeatify(fn) { return function(...args) { [...args].forEach(fn, this); }; } Real simple solution If all the above functional-style programming is too much to wrap your head around, all you really need to do is: [p, div].forEach(func);
has comment: http://stackoverflow.com/comment/41373499
type: Answer
answers question: http://stackoverflow.com/q/26356484
score: 2
has comment: http://stackoverflow.com/comment/41372877
upvote count: 3

http://stackoverflow.com/comment/41514204
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26434691
has text: Excuse me the range is between 0 and 100
score: 0

http://stackoverflow.com/a/26463618
upvote count: 1
has body: 'value' is not defined in scope. I'll expand a little Miraage answer.. this will refer to the scope. If you want to access the DOM element use $event. In the callback function you can get the DOM element value using boom($event.target.value)
downvote count: 0
answers question: http://stackoverflow.com/q/26463491
type: Answer
score: 1

http://stackoverflow.com/comment/41402751
comment on: http://stackoverflow.com/q/26372997
score: 0
has text: and what is your html code?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26388736
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/26388667
upvote count: 0
has body: Objects in Javascript are hashmaps. You shouldn't expect every interpreter - for example, browsers, if this is to run in a page - to present you the keys in the same order they were inserted. If you need to order those, I suggest you populate an array. If you want to keep using objects, though, you could add an order property to each value. You could re-structure your map like this: var obj = { one: { value: "short-term", order: 1 }, five: { value: "short-term", order: 2 }, /* .. SNIP .. */ }; Then you can come up with a sorting mechanism, and apply that whenever you need to retrieve your values.
type: Answer

http://stackoverflow.com/q/26390607
downvote count: 2
accepted answer: http://stackoverflow.com/a/26390625
possible better answer: http://stackoverflow.com/a/26390656
has answer: http://stackoverflow.com/a/26390656
type: AnsweredQuestion
type: Question
answer count: 2
has body: How do I detect a URL using javascript? For example, if i have mywebsite.com/video/r739cw3#1, I want to execute a JS function that will convert this URL to a link
has title: How to detect URL in JS?
upvote count: 0
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/26390625
favorite count: 0

http://stackoverflow.com/q/26500694
has answer: http://stackoverflow.com/a/61210817
favorite count: 0
has answer: http://stackoverflow.com/a/77654196
answer count: 5
tagged with: date-format
accepted answer: http://stackoverflow.com/a/26500766
has body: I have a string of a date in javascript in format #1. I need to convert it to format #2. The problem starts when one format is "dd/mm/yy" and the other is "mm/dd/yy". The formats change dynamically and I have the formats as strings, but I need a function like Date newDate = convert(currentDate, currentFormatString, newFormatString). How can I do it?
type: AnsweredQuestion
tagged with: date
type: Question
upvote count: 15
downvote count: 0
tagged with: javascript
score: 15
has answer: http://stackoverflow.com/a/26500766
has answer: http://stackoverflow.com/a/26500762
possible better answer: http://stackoverflow.com/a/41462774
has title: Convert Date from one format to another format in JavaScript
has answer: http://stackoverflow.com/a/41462774

http://stackoverflow.com/comment/41544130
has text: I'll roll back your question to the one without the solution in a day or so. Please put the solution in an answer, per SO rules.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26443450

http://stackoverflow.com/q/26441007
answer count: 2
has answer: http://stackoverflow.com/a/26441053
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has title: Show/Hide div based on select option
possible better answer: http://stackoverflow.com/a/26441101
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26441053
has body: Here's my code : HTML : Red Yellow Blue Black Div1... Div2.. JS : $(function() { $('#colorselector').change(function(){ $('.colors').hide(); $('#' + $(this).val()).show(); }); }); What I want : when I select an option that contains "-1" the first div will appears, and the second div will disappear. And If I select an option that contains "-2" the firs div will disappear, and the second one will appears.
tagged with: javascript
has answer: http://stackoverflow.com/a/26441101
score: 0

http://stackoverflow.com/comment/41501113
type: AnswerComment
comment on: http://stackoverflow.com/a/26428010
score: 0
type: Comment
has text: wow you are awesome! one more addition if you could do before I accept it! Can you please change it so that the input is added in caret position?

http://stackoverflow.com/a/26502705
answers question: http://stackoverflow.com/q/26434865
score: 0
has body: This should work but might not be the best way. describe('scrollTop', function() { it('should be greater than 250', function() { browser.executeScript('return document.body.scrollTop;').then(function(scrollTop) { expect(scrollTop &gt; 250).toBeTruthy() }); }); });
type: Answer

http://stackoverflow.com/comment/41484005
type: Comment
has text: Sorry to say but it's not working for me :-( in console screen it says undefined!
comment on: http://stackoverflow.com/a/26418615
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41522288
type: Comment
score: 0
type: AnswerComment
has text: Well, I am pretty much doing the same thing except wiring the click event to launch button (bootstrap takes care of this). Not sure if that is the problem here.
comment on: http://stackoverflow.com/a/26438898

http://stackoverflow.com/comment/41527178
type: Comment
has text: You can write it like this : `var a = [/a\.m\./g,/p\.m/g,/u\.k\./g];`
comment on: http://stackoverflow.com/a/26441918
type: AnswerComment
score: 0

http://stackoverflow.com/a/26391258
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/41435708
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/26391218
has body: Make sure you are selecting a static parent, so if li is dynamically created too, use its parent or its parent's parent $('div.btn-group').on('click', 'ul li a.status', function(e) { e.preventDefault(); alert("hi"); }); if that div is also dynamically created you could go up to the body or even document $(document).on('click', 'ul li a.status', function(e) { e.preventDefault(); alert("hi"); });

http://stackoverflow.com/a/26376697
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26374090
type: Answer
answers question: http://stackoverflow.com/q/26374090
has body: HTML was originally defined formally as an application of SGML, and the comment syntax was taken from SGML. SGML uses two hyphens -- as comment delimiters, but it permits comments in certain contexts only. Of these contexts, only a comment declaration is relevant in HTML. (Well, in theory they are also allowed in entity declarations like &lt;!ENTITY foo "foo" -- Comment -- &gt;, but entity declarations were never implemented in any browser before XHTML, and in XHTML, following XML syntax, entity declarations cannot contain comments.) Thus, comments are only allowed in comment declarations that contain nothing but comments, e.g. &lt;!-- Comment one -- -- Comment two --&gt; Browsers actually implemented this partly in a simplified (wrong) way, so the practical recommendation is to have comments only in comment declarations that contain a single comment: &lt;!-- Comment --&gt; Comment declarations are at the same structural level as tags and therefore cannot appear within tags. (Comments cannot contain tags either: anything that would otherwise constitute a tag, like &lt;p&gt;, is taken just as character data when inside a comment.) This has not been changed in later HTML versions. They have simplified the syntax in matters like this, not extended.
score: 5
upvote count: 5

http://stackoverflow.com/comment/41467753
comment on: http://stackoverflow.com/q/26407665
has text: @torazaburo That totally fixed it! Thank you so much man. I dunno if it never worked on any browser, but it certainly stopped working when we moved to IE11. I personally think the real flaw here is the design. The developer shouldn't have put all the text into a giant comma delimited string.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26361796
type: Answer
answers question: http://stackoverflow.com/q/26361382
has body: What you need to do is to bootstrap angular programatically instead of using a tag. &lt;html&gt; &lt;body&gt; // other parts of your site &lt;div&gt;&lt;/div&gt; // your angular stuff &lt;div id='app' ng-controller="MyController"&gt; Hello {{greetMe}}! &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; // your controller angular.module('myApp', []) .controller('MyController', ['$scope', function ($scope) { $scope.greetMe = 'World'; }]); // bootstrap angular programatically/manually angular.element('#id').ready(function() { angular.bootstrap(angular.element('#id'), ['myApp']); }); Without forgetting to use ng-non-bindable too on parts that u don't want to bind ofcoz
score: 0
has comment: http://stackoverflow.com/comment/41381840

http://stackoverflow.com/comment/41441799
score: 0
type: Comment
has text: What is that way? Is it what PSL suggested?
type: AnswerComment
comment on: http://stackoverflow.com/a/26394833

http://stackoverflow.com/comment/41596062
type: QuestionComment
has text: Hey, your function call seems correct. You can see network log if your hover image is geting downloaded or not as it may take some time. You may try with placehold images like "http://placehold.it/100x100"...
comment on: http://stackoverflow.com/q/26479729
score: 0
type: Comment

http://stackoverflow.com/comment/52233005
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26383407
type: AnswerComment
has text: @mainguy, how do you check value of current cell as well as of another cell from the same row before returning 'blue' in your example above? I need to check that both "grid.getCellValue(row,col) == 1" and "sv_name" from the same row equals "test" before I return "blue".

http://stackoverflow.com/comment/41387287
type: QuestionComment
type: Comment
has text: Really though, your example code is missing one `}` (closing you first if after all the other ifs).
comment on: http://stackoverflow.com/q/26364162
score: 0

http://stackoverflow.com/comment/41474196
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26413084
has text: Thanks - What's a read-only property? I didn't know javascript had them. I suppose the gapi must be using them to make sure their variables don't get clobbered?

firebug
tags question: http://stackoverflow.com/q/26404402
type: Tag
tags question: http://stackoverflow.com/q/26393741
tags question: http://stackoverflow.com/q/26488355
tags question: http://stackoverflow.com/q/26419249
tags question: http://stackoverflow.com/q/26357671
tags question: http://stackoverflow.com/q/26510098
tag name: firebug

http://stackoverflow.com/comment/41452006
type: QuestionComment
comment on: http://stackoverflow.com/q/26400935
has text: @MarcoPrins : give a fiddle....it would be easy from there on...right now its insufficient info! :)
score: 0
type: Comment

http://stackoverflow.com/a/26435958
answers question: http://stackoverflow.com/q/26435894
has comment: http://stackoverflow.com/comment/41516629
has comment: http://stackoverflow.com/comment/41516641
score: 0
has body: I am aware about browsers, in chrome can open developer too(press F12).On right top of developer tool , u can see a icon call show drawer , click on it , than can select simulate tab where there will be a checkbox , which can be selected to allow simulate on other devices I.e tablets, mobiles. Now desired devices can be selected from the dropdown and can be tested.
type: Answer
has comment: http://stackoverflow.com/comment/41516611

http://stackoverflow.com/q/26503926
tagged with: checkbox
type: AnsweredQuestion
has title: Trouble with checkboxes and selects interaction on click and on change
has comment: http://stackoverflow.com/comment/41640374
tagged with: onclick
tagged with: select
has comment: http://stackoverflow.com/comment/41641045
has comment: http://stackoverflow.com/comment/41639686
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41639274
tagged with: jquery
has comment: http://stackoverflow.com/comment/41640550
has comment: http://stackoverflow.com/comment/41640799
score: 0
has comment: http://stackoverflow.com/comment/41640428
answer count: 1
has answer: http://stackoverflow.com/a/26506349
accepted answer: http://stackoverflow.com/a/26506349
has comment: http://stackoverflow.com/comment/41641777
has comment: http://stackoverflow.com/comment/41639251
has body: I have a form where a user can specify hotel-accomodations for a biking event. The options are: 1) stay the night before (+50 euro) 2) have dinner the night before (+20 euro) He also has the possibility to book a room at the hotel for up to 6 "non-bikers". If the user has checked either one of the above options, the added costs must also apply to any non-bikers he has added - but only if they are adults (older than 12), which is determined by dropdowns. Example: Base hotel-cost = 100 euro. User checks the "night before" checkbox, total price is now 150. If he also checks the "dinner before" checkbox, total price is now 170. If he then adds two non-bikers, the total hotel-cost for those two becomes 340 (2 x 170). I have this working kind of, but run into trouble when 1) either of the checkboxes are repeatedly checked/unchecked 2) user changes the value of the dropdown(s) more than once I'm also aware that my jQuery code is painfully repetitive... Html (simplified): Stay the night before 50 Dinner night before 20 Total personal accomodation (before non-bikers are added): 1934 ... 2014 There's 6 of these selects, all of them initially hidden, except for the first one (the id names go up to "nf-5"). Selects "nf-1" to "nf-5", when shown, can be hidden again, at which point the total cost for non-bikers should reflect this... Total non bikers is shown here: Total accomodation for non-bikers: JavaScript: var price_hotel = 100; var price_pre_stay = 50; var price_pre_dinner = 20; var end_total = 100; var want_pre_stay = 0; var want_pre_dinner = 0; var y = 2014; // on document.ready $('#price_pre_stay').hide(); $('#price_pre_dinner').hide(); $('input[name=want_pre_stay]').on('click', function(){ $('#price_pre_stay').toggle(); if($(this).prop('checked')){ want_pre_stay = 1; price_hotel = price_hotel + price_pre_stay; end_total = end_total + price_pre_stay; $('#price_hotel').number(price_hotel, 2, ',', ' ' ); //uses jQuery plugin $('#end_total').number(end_total, 2, ',', ' ' );…

http://stackoverflow.com/comment/41516905
type: QuestionComment
comment on: http://stackoverflow.com/q/26436090
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63262/discussion-between-arun-p-johny-and-divergent).
score: 0
type: Comment

http://stackoverflow.com/q/26452210
accepted answer: http://stackoverflow.com/a/26452238
favorite count: 0
has body: When modifying a variable inside a domain are they modified in the parent context ?
has comment: http://stackoverflow.com/comment/41545571
has answer: http://stackoverflow.com/a/26452238
tagged with: node.js
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has title: Domain in Node.js - Does it keep and modify the parent context?
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41545586
answer count: 1

http://stackoverflow.com/comment/41534887
type: QuestionComment
has text: I'm trying to make a collection for each user to store their information
comment on: http://stackoverflow.com/q/26445430
score: 0
type: Comment

http://stackoverflow.com/a/26464743
upvote count: 1
downvote count: 1
has body: I don´t know zclip, but you need to select text from next element behind button, so the fourth line should be: copy: $(this).next('.server-ip').text()
answers question: http://stackoverflow.com/q/26464673
score: 0
has comment: http://stackoverflow.com/comment/41567555
type: Answer

http://stackoverflow.com/comment/41589227
has text: Thanks New Dev, The first one works in the DOM but doesn't submit/save the new value to firebase
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26475394
type: Comment

http://stackoverflow.com/a/26403278
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41455836
downvote count: 0
has comment: http://stackoverflow.com/comment/41456378
type: Answer
answers question: http://stackoverflow.com/q/26402520
has body: You can create you directive like this: app.directive('myDir', function () { return { restrict: 'C', scope: { foo: '&amp;' }, link: function(scope,elem){ elem.on('click',function(){ scope.foo(); }); }}; }); or use controller function instead of link if you need: controller: function($scope,$element){ $element.on('click',function(){ $scope.foo(); }); }}; Note that angular's jqLite has no element.click function. Here is fiddle: http://jsfiddle.net/cxo77xb4/2/

http://stackoverflow.com/a/26387757
answers question: http://stackoverflow.com/q/26387619
type: Answer
has body: You can use http://oss.sheetjs.com/js-xls/ to utilize fileReader API to read xls/xlsx content as json and feed into required jquery table element.
has comment: http://stackoverflow.com/comment/41434283
score: 2
downvote count: 0
upvote count: 2

hapi.js
tags question: http://stackoverflow.com/q/26509551
tag name: hapi.js
tags question: http://stackoverflow.com/q/26402933
tags question: http://stackoverflow.com/q/26361008
type: Tag

http://stackoverflow.com/q/26485617
favorite count: 0
possible better answer: http://stackoverflow.com/a/26485726
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41605709
type: AnsweredQuestion
has title: Jquery timestamp gets wrong year
has answer: http://stackoverflow.com/a/26485833
accepted answer: http://stackoverflow.com/a/26485833
type: Question
has answer: http://stackoverflow.com/a/26485726
has comment: http://stackoverflow.com/comment/41605925
answer count: 2
has body: Strange, but date from timestamp timestamp=20141021102933; date=new Date(timestamp); returns 2608 year 30 March however it is 2014 year 21 of october(today date). What's the problem?
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/41605959
score: 0

http://stackoverflow.com/q/26479747
has answer: http://stackoverflow.com/a/26480133
accepted answer: http://stackoverflow.com/a/26480133
has comment: http://stackoverflow.com/comment/41595783
type: AnsweredQuestion
has body: How do I filter dates in javascript to only get dates from the last 4 months? For example, if the last date I have is 2014-10-21, I only want data from July to October 2014 (so if I had 2013-10-14, it would be filtered out) Here's what I have so far: $.each(dataArray, function(i, data){ boundaryDates.push(data.values[0].x); boundaryDates.push(data.values.slice(-1).pop().x); }); var maxDate=new Date(Math.max.apply(null,boundaryDates)); var minDate=new Date(Math.min.apply(null,boundaryDates)); //Convert Date var day = maxDate.getDay() &lt; 9 ? '0'+maxDate.getDay():maxDate.getDay(); var month = maxDate.getMonth() &lt; 9 ? '0'+maxDate.getMonth():maxDate.getMonth(); var mday = minDate.getDay() &lt; 9 ? '0'+minDate.getDay():minDate.getDay(); var mmonth = minDate.getMonth() &lt; 9 ? '0'+minDate.getMonth():minDate.getMonth(); var maximumDate = maxDate.getFullYear()+'-'+month+'-'+day; var minimumDate = minDate.getFullYear()+'-'+mmonth+'-'+mday; $.each(chartData, function(j, gid){ if(gid.x &gt;= minimumDate &amp;&amp; gid.x &lt;= maximumDate ){ gvalues.push(gid); } });
has title: How do I filter dates in javascript to only get dates from the last 4 months?
has comment: http://stackoverflow.com/comment/41595919
type: Question
has comment: http://stackoverflow.com/comment/41595864
has comment: http://stackoverflow.com/comment/41595782
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery

flags
tags question: http://stackoverflow.com/q/26479985
tag name: flags
type: Tag

http://stackoverflow.com/comment/41555505
comment on: http://stackoverflow.com/q/26457555
has text: Please provide a [Minimal, **Complete**, Tested and Readable example](http://stackoverflow.com/help/mcve)
score: 0
type: Comment
type: QuestionComment

iis-7
tags question: http://stackoverflow.com/q/26493518
tag name: iis-7
type: Tag

http://stackoverflow.com/comment/41602013
has text: Do you mean something like [Select2](http://ivaynberg.github.io/select2/)?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26483331
score: 0

http://stackoverflow.com/comment/41458125
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26393136
type: AnswerComment
has text: Very elegant and works perfectly as well as having a great explanation. Thank you so much.

http://stackoverflow.com/comment/41416039
score: 0
comment on: http://stackoverflow.com/q/26373927
has text: I know that I can't modify the wire format. I want a solution to deal with this difference between browsers
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26458892
has title: typeahead not working after textbox dynamic input
has answer: http://stackoverflow.com/a/31991176
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/28445829
tagged with: dynamic
tagged with: bootstrap-typeahead
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: typeahead
has body: I use twitter bootstrap 3 typeahead, with bloodhound suggestion engine. I have applied this typeahead in a textbox(class:typeahead) inside html table's column, and after selecting the typeahead, a new row appear. I have a problem to apply the typeahead to this newly dynamically added textbox(also class:typeahead). Chrome dev error: "Uncaught TypeError: undefined is not a function" This is my JS: &lt;script src="&lt;?php echo site_url('assets/js/jquery-2.0.3.min.js');?&gt;"&gt;&lt;/script&gt; &lt;script src="&lt;?php echo site_url('assets/js/bootstrap.min.js');?&gt;"&gt;&lt;/script&gt; &lt;script src="&lt;?php echo site_url('assets/js/bloodhound.js');?&gt;"&gt;&lt;/script&gt; &lt;script src="&lt;?php echo site_url('assets/js/typeahead.jquery.js');?&gt;"&gt;&lt;/script&gt; &lt;script&gt; /*/////////////////// // bloodhound // */ var stocksData = source_inventory; var stocks = new Bloodhound({ datumTokenizer: function (d) { for (var prop in d) { return Bloodhound.tokenizers.whitespace(d.item_code);} }, queryTokenizer: Bloodhound.tokenizers.whitespace, //local: ["(A)labama","Alaska","Arizona","Arkansas","Arkansas2","Barkansas"] limit: 5, //#2 added local : stocksData }); stocks.initialize(); /*/////////////////// // typeahead // */ function apply_typeahead(elm){ alert('tes and yes'); $(elm).typeahead(null,{ displayKey: function(stocks) { for (var prop in stocks) { return stocks.item_code; } }, source:stocks.ttAdapter() , updater: function (stocks) { return stocks; } }).on('typeahead:selected', function (obj, datum) { var var_datum = []; var_datum[0] = datum.item_id; dialog_inventory_pull_data(var_datum); }); } //apply_typeahead('input[name^=ast_code].typeahead'); $(document).ready(function(){ /* //some code */ }); /*$('.typeahead').on('added',function(){ apply_typeahead('input[name^=ast_code].typeahead'); //$('.typeahead').typeahead(typeaheadSettings); });*/ //JS CUSTOM PAGE function table_detail_insert(data){ if(data){ for(var p = 0;p&lt;data.length;p++){ /*code*/ } //…

http://stackoverflow.com/a/26470462
has body: There are several ways to do it. IMO the easier is to create and populate a JS object containing the name of the country as the index and the country code as value. But tou could also use ajax...
answers question: http://stackoverflow.com/q/26470352
score: 0
type: Answer

http://stackoverflow.com/q/26474924
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 0
has comment: http://stackoverflow.com/comment/41587525
downvote count: 1
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26474946
score: -1
has answer: http://stackoverflow.com/a/26474946
has title: Getting Undefined in object literal when the result should be simple
has body: So this is super simple stuff but for some reason i cant figure out what i am doing wrong. My hash simply wont return the output of my function. any help would be greatly apperciated myArray = ["firstname lastname", "emailadress"]; var splitName = function(string){ var final_string = string.split(" "); console.log(final_string); }; var result = splitName(myArray[0]); console.log(result); // this returns undefined myData = { fullName : splitName(myArray[0]), }; console.log(myData); //still returns undefined

http://stackoverflow.com/q/26410640
has body: I have an existing array with an object and several properties created on a first step. It is created by the following function: $scope.recordlist = extractRecordJSONFromLocalStorage(); $scope.addRecord = function () { $scope.recordlist.push( { date: $scope.dateJson, time: $scope.time, car: $scope.carList.code, driver: $scope.driverList.name, from: $scope.locationList.place, destination: $scope.locationList2.place, pax: $scope.paxList } ); $scope.custom = $scope.custom === false ? true: false; $scope.carList = 0; $scope.driverList = 0; $scope.locationList = 0; $scope.locationList2 = 0; jsonToRecordLocalStorage($scope.recordlist); }; It results in the following array: [{ "date":"2014 10 16", "time":"20.22", "car":"396", "driver":"Seb", "from":"A", "destination":"B", "pax":"3" }] What I'm trying to do is to add another property into the existing object on the next step with ng-click. I've tried with the following function but it doesn't seem to work. $scope.insertRecord = function (recordlist) { var arrival = { 'arrival' : moment().format("HH.mm") } console.log(arrival) angular.extend($scope.recordlist, arrival) jsonToRecordLocalStorage($scope.recordlist); } The end result I'm looking for is the following: [{ "date":"2014 10 16", "time":"20.22", "car":"396", "driver":"Seb", "from":"A", "destination":"B", "pax":"3", "arrival":"23.10" }] Maybe another thing to take also into consideration is that in the app it exists the possibility of having many different objects being listed, some that have the arrival property already defined, but some that will have it later in time. Any pointers? EDIT The 2 solutions I got worked but didn't accomplish what I am looking for, so probably I was unclear on what I am trying to do. I am saving a collection of objects into an array, each object has a property arrival that will be defined on a second step. So first I create an array of objects like this: [ { "date":"2014 10 16", "time":"20.42", "car":"396", "driver":"Seb", "from":"A", "de…
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26410679
upvote count: 8
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41543677
has answer: http://stackoverflow.com/a/26453567
score: 8
tagged with: local-storage
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41545437
has comment: http://stackoverflow.com/comment/41547316
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26453567
type: Question
has answer: http://stackoverflow.com/a/26410679
answer count: 2
has title: Adding property to each object of an array independently with AngularJS angular.extend

http://stackoverflow.com/a/26735079
answers question: http://stackoverflow.com/q/26506653
score: 0
type: Answer
has body: Is it what you want? &lt;input type="submit" value="edit list" id="${list.listNo}" onClick="openEdit(${list.listNo})" class="blue_button" style="width: 94%;" /&gt; P.S. Consider to use &lt;c:out ...&gt; instead.

http://stackoverflow.com/comment/41371330
score: 0
has text: have you notice the competition menu
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26355919

http://stackoverflow.com/comment/41457831
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26403532
has text: Already thought so! Do you use any promises? $q maybe? or any $timeout?
type: AnswerComment

http://stackoverflow.com/comment/41600286
score: 0
has text: That means that `response[i].result.all` does not have a property called `Word`. Try `console.log("words: ", response[i].result.all);` to see what it _does_ contain.
type: AnswerComment
comment on: http://stackoverflow.com/a/26482249
type: Comment

http://stackoverflow.com/a/26415662
score: 0
has body: You can set a timer and fade it out after 5 secs. Something like setTimeout(function () { $("#success-alert").fadeOut(100, null); }, 5000);
has comment: http://stackoverflow.com/comment/41486059
type: Answer
answers question: http://stackoverflow.com/q/26414125

http://stackoverflow.com/a/26428864
has body: There is some problems with your task. First, you have to use gulp.src to get your main.js file. Second, transform is an option of gulp-browserify, not something you want to pipe your stream on, same for bundle. gulp.task('scripts', function () { return gulp.src('./assets/js/main.js') .pipe(browserify({ transform: [reactify] })) .pipe(gulp.dest('./static/js')); }); If you want something that is more like your first attempt, you don't need gulp-browserify, but browserify alone, there is a quite good article on how to use ReactJs with Browserify and gulp here.
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/41502722
answers question: http://stackoverflow.com/q/26428488
downvote count: 0
has comment: http://stackoverflow.com/comment/41502939
type: Answer
has comment: http://stackoverflow.com/comment/41503078
has comment: http://stackoverflow.com/comment/41502843

http://stackoverflow.com/q/26404948
has comment: http://stackoverflow.com/comment/41459357
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26405480
has comment: http://stackoverflow.com/comment/41461146
has comment: http://stackoverflow.com/comment/41462785
has comment: http://stackoverflow.com/comment/41459497
has comment: http://stackoverflow.com/comment/41460012
has comment: http://stackoverflow.com/comment/41459100
has comment: http://stackoverflow.com/comment/41459161
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41461145
upvote count: 1
has comment: http://stackoverflow.com/comment/41458913
has comment: http://stackoverflow.com/comment/41459020
has comment: http://stackoverflow.com/comment/41463907
type: Question
has comment: http://stackoverflow.com/comment/41458941
tagged with: javascript
has comment: http://stackoverflow.com/comment/41459904
has comment: http://stackoverflow.com/comment/41459426
has comment: http://stackoverflow.com/comment/41464598
has comment: http://stackoverflow.com/comment/41463256
has title: How to call JSON via POST request by clicking on HTML button?
has comment: http://stackoverflow.com/comment/41460083
has comment: http://stackoverflow.com/comment/41461585
has comment: http://stackoverflow.com/comment/41459680
has comment: http://stackoverflow.com/comment/41460203
has comment: http://stackoverflow.com/comment/41459845
has comment: http://stackoverflow.com/comment/41459748
tagged with: api
has comment: http://stackoverflow.com/comment/41462380
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41463766
score: 1
tagged with: jquery
has body: I've tried to call to POST request via Json by clicking on button from my HTML document but it's back with an error 404, Maybe the Json request it's the issue here or maybe the Jquery code, I really don't know. The API server is exist and ready. I just want to make some "shortcut link" to the request by Json file that send direct to the API server. The code I've tried to use is below: $jq2(document).ready(function(){ $jq2("button").click(function(){ $jq2.ajax({ url: "https://api.meet2know.com/v1/leads", username: "username", password: "password", data: "request.json", success: function(data){ console.log("success: ", data); }, error: function(err){ console.log("error: ", err); }, dataType: "jsonp" }); }); }); POST requests - Production Send POST request This is the response from the POST request (error 404): Remote Address:23.253.174.91:443 Request URL:https://api.meet2know.com/v1/leads?callback=jQuery11110012059795670211315_1413464815326&request.json&_=1413464815327 Request Method:GET Status Code:404 Not Found Request Headersview source Accept:*/* Accept-Encoding:gzip,deflate Accept-Language:en-US,en;q=0.8,he;q=0.6 Authorization:Basic dmNpdGE6c3RhZ2luZw== Connection:keep-alive Cookie:mp_934d895d2a43b6804e4df6f0cb54008d_mixpanel=%7B%22distinct_id%22%3A%20%2214903ad2cbf84-02b7a455d-4748032e-1fa400-14903ad2cc01f2%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%7D; remember_admin_token=BAhbB1sGaRVJIiIkMmEkMTAkd3lTdlAwODlJb295WTUxMHp6Um5XLgY6BkVU--9a67de09d5a72b8805f589528aca55099335e9de; __zlcmid=RHe7qTN3yuF9zc; __utma=102324637.495385716.1413102578.1413308718.1413311902.12; __utmc=102324637; __utmz=102324637.1413102578.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _vcita_session_integration=[binary]%[binary]%3D%3D--138e9dee16f3409e7b8870b0e0053888777776a4; mp_d482fd7678983cbb47786f77b1e63bbd_mixpanel=%7B%22distinct_id%22%3A%20%223999%22%2C%22Landing%20Page%22%3A%20%22Dashboard%22%2C%22%24initial_referre…
has comment: http://stackoverflow.com/comment/41458708
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/26399510
has comment: http://stackoverflow.com/comment/41450621
has comment: http://stackoverflow.com/comment/41452274
tagged with: javascript
has title: Remove animations for d3 force layout
has comment: http://stackoverflow.com/comment/41452355
upvote count: 1
answer count: 1
has body: I want to have only a default arrangement, and then I only want when dragging a bubble, without affecting the others bubbles: Probably the magic is in tick event handler: force.on("tick", function() { link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); }); How can be this function changed not to animate the other nodes/links, just change the position of the node that is dragged? JSFIDDLE
favorite count: 0
accepted answer: http://stackoverflow.com/a/26401652
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41450423
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26401652
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41451161
has comment: http://stackoverflow.com/comment/41450785
type: Question
has comment: http://stackoverflow.com/comment/41451638
has comment: http://stackoverflow.com/comment/41451713

http://stackoverflow.com/comment/41397802
comment on: http://stackoverflow.com/a/26363489
type: Comment
type: AnswerComment
has text: What code have you written that generates this error?
score: 0

http://stackoverflow.com/comment/41406887
type: Comment
type: AnswerComment
score: 0
has text: I have considered that as an option but everything I read suggests that touching the DOM directly in the controller is considered to be really bad practice as it tightly couples my controller to the HTML.
comment on: http://stackoverflow.com/a/26375325

http://stackoverflow.com/a/26500542
type: Answer
has body: No, but a close alternative is to treat a as a JS object: var a = { value : "Hello" }; function change(variable, value) { //I'll let you work this part out } alert(a.value); change(a, "World!"); alert(a.value);
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41633219
accepted answer of: http://stackoverflow.com/q/26500511
answers question: http://stackoverflow.com/q/26500511

http://stackoverflow.com/comment/41617048
has text: The mouse move event is setting the mouse.x and mouse.y which is then used by update(). So to override the method like you want you just need a new loop updating the mouse object I think, and a robust way of swapping between the mouse move event method and the new loop
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26490938

http://stackoverflow.com/q/26498634
has comment: http://stackoverflow.com/comment/41683863
has comment: http://stackoverflow.com/comment/41630187
has comment: http://stackoverflow.com/comment/41652077
score: 0
tagged with: invoice
has comment: http://stackoverflow.com/comment/41630188
has comment: http://stackoverflow.com/comment/41630775
has body: So I was tasked to create an invoice. I was able to to that, and get it to calculate the total, tax and subtotal. What I need to do now is get the values I input into the text area. I'll put the code I have so far below. It calculates, but I'd like my inputted values to go in the large text area I created underneath "Current Invoice". Something like (the content below will go in the text area) ---Item Code--- ---Item Name----- ----Item Cost---- ----Quantity---- (user input) (user input) user input user input --- Subtotal---- ---tax------- ----Total------ (calculation) (calculation) (calculation) I'll show you my code Invoice Manager Item Code: Item Name: Item Cost: Quantity: Current Invoice Subtotal: Sales Tax: Total: Any ideas? I'm struggling to get my inputting values in the text area. I've tried calling 'getElementById(input = 'text').value;' But that didn't work. Any help would be appreciated. EDIT: Here's what I have for the textarea Seems to work ok document.getElementById('textarea').value = "--" + code + "--" + " " + " " + "--" + "--" + itemName + "--" + " " + " " + "--" + cost +"--" + " " + " " + "--" + quantity + "--" + " " + " " + "--" + subtotal + "--" + " " + " " + " " + "--" + tax + "--" + " " + " " + "--" + total + "--"; It might not be proper code tho.
tagged with: textarea
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41666311
has title: Javascript - Getting computed values into the text area of Invoice
has comment: http://stackoverflow.com/comment/41630430
has comment: http://stackoverflow.com/comment/41630414
has comment: http://stackoverflow.com/comment/41650616
has comment: http://stackoverflow.com/comment/41630111
has comment: http://stackoverflow.com/comment/41630324
has comment: http://stackoverflow.com/comment/41630164
accepted answer: http://stackoverflow.com/a/26498957
has comment: http://stackoverflow.com/comment/41630205
has comment: http://stackoverflow.com/comment/41665592
has comment: http://stackoverflow.com/comment/41630438
has comment: http://stackoverflow.com/comment/41630107
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41630236
has comment: http://stackoverflow.com/comment/41630523
has comment: http://stackoverflow.com/comment/41630063
type: Question
has comment: http://stackoverflow.com/comment/41630487
tagged with: javascript
has comment: http://stackoverflow.com/comment/41629995
tagged with: jquery
has answer: http://stackoverflow.com/a/26498957

http://stackoverflow.com/a/26436222
answers question: http://stackoverflow.com/q/26436090
accepted answer of: http://stackoverflow.com/q/26436090
type: Answer
score: 1
has body: The problem is your usage of a global variable in a loop, so the variable will have only the last value of the loop. You can use a data-* attribute like <?php foreach ($posts as $post) { ?> <?php $postID = $this->model_posts->getPostData('id', $post->post); ?> <img src="<?php echo base_url() . 'img/profilepictures/thumbs/' . $profilepicture?>"> <?php echo $prefname; ?> <?php echo $this->model_posts->getPostTime($post->post); ?> <?php echo $post->post ?> <?php if($this->model_posts->doesUserLike($me, $postID)) { ?> <?php echo anchor('userprofile/unlike_post/' . $me . '/' . $postID, 'unlike'); ?> <?php } else { ?> <div class='like' data-post="<?php echo $postID; ?>"> <?php echo anchor('#', 'like', array('id' => 'like')); ?> <?php } ?> then $(".like>a").click(function () { var post = $(this).parent().attr('data-post'); $.post(base_url + "index.php/userprofile/like_post/", { post: post }, function (data) { alert('liked'); }, "json"); return false; });
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26411605
type: AcceptedAnswer
upvote count: 2
has body: Both will work, but both are incorrect. MyService from myMod depends on Common, not the other way around. Lets say you do choose to add Common to the module common.module. Then myMod should depend on common.module angular.module('common.module', []) .factory('Common', function () { return { myUrl: "/Some/Url" } }); angular.module('myMod', [ 'common.module' ]) .factory('MyService', ['$http', 'Common', function ($http, Common) { var neededUrl = Common.myUrl; }]); angular.module('myApp', [ 'myMod' ]); Using correct dependency management allows you to run isolated tests. The following is a jasmine example that should work: describe('Test myMod', function() { beforeEach(module('myMod')); // from angular-mocks it('should work', function() { expect(true).toBeTruthy(); }) }); If you picked either one of the options you suggested, the test case would fail, because MyService does depend on Common from common.module.
accepted answer of: http://stackoverflow.com/q/26410893
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26410893
downvote count: 0

http://stackoverflow.com/comment/41419102
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26381860
has text: "...If you'd use a real getter-setter property which stores it in a local variable..." Could you pls provide a correct example?

http://stackoverflow.com/a/64228884
score: 0
answers question: http://stackoverflow.com/q/26486661
type: Answer
has body: You can use stateful and stateId configurations to enable last selection. Here is an example of my code. Here what I am doing is to create a custom combobox that will show two options: Platform and program. Then for stateId, you can use any string that you want: _createCategoryFilter: function() { // The data store containing the list of states var platformTypeList = Ext.create('Ext.data.Store', { fields: ['abbr', 'name'], data : [ {"abbr":"PLAN", "name":"Platform"}, {"abbr":"CURR", "name":"Program"}, //... ] }); // Create the combo box, attached to the states data store var platformTypeFilter = Ext.create('Ext.form.ComboBox', { fieldLabel: 'Select category', store: platformTypeList, queryMode: 'local', displayField: 'name', valueField: 'abbr', stateful: true, stateId: 'categoryFilter', listeners: { afterrender: function(param) { console.log('afterrender - category param is', param.rawValue); CategoryFilterValue = param.rawValue; LoadInformation(); }, select: function(param) { console.log('select - category param is', param.rawValue); CategoryFilterValue = param.rawValue; }, scope: this, } }); this.add(platformTypeFilter); },

hyperlink
tags question: http://stackoverflow.com/q/26412348
tags question: http://stackoverflow.com/q/26408576
tags question: http://stackoverflow.com/q/26474292
tags question: http://stackoverflow.com/q/26369786
tags question: http://stackoverflow.com/q/26417154
tags question: http://stackoverflow.com/q/26474191
tag name: hyperlink
tags question: http://stackoverflow.com/q/26509625
type: Tag
tags question: http://stackoverflow.com/q/26451303
tags question: http://stackoverflow.com/q/26445157

http://stackoverflow.com/a/26367730
accepted answer of: http://stackoverflow.com/q/26367669
answers question: http://stackoverflow.com/q/26367669
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41395583
has body: I'd suggest: var rbs = $("#myDiv input[name='myGroup']:checked"), index = rbs.index(), // amongst its siblings, or: inputIndex = rbs.index('input[name="myGroup"]'); // amongst other input elements of the same group References: CSS: Attribute presence and value selectors. :checked pseudo-class. jQuery: index().
type: Answer
has comment: http://stackoverflow.com/comment/41395498

http://stackoverflow.com/a/26427041
score: 0
has comment: http://stackoverflow.com/comment/41499240
has comment: http://stackoverflow.com/comment/41499990
type: Answer
has comment: http://stackoverflow.com/comment/41499181
answers question: http://stackoverflow.com/q/26426802
has body: You can make this more dynamic by checking the inputs in the current div and if they all have a value, then show the next div (if there is one). If they clear a value, then hide all the later divs. $(document).ready(function() { // you can restrict this to inputs in a specific div or just any input $('#group1 input').on('keyup', function () { var parentDiv = $(this).closest('div') var hasValues = parentDiv.find('input').filter(function() { return this.value == ''; }).length == 0; if(hasValues) { //parentDiv.next().css('visibility', 'visible'); // show just the next section parentDiv.nextAll().css('visibility', 'visible'); // show all later sections } else { parentDiv.nextAll().css('visibility', 'hidden'); } }); }); DEMO
has comment: http://stackoverflow.com/comment/41499554

http://stackoverflow.com/comment/41559936
has text: I am using window.open(url) method.
type: Comment
comment on: http://stackoverflow.com/q/26460168
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41613861
score: 2
has text: If you're getting "word" like pastes, maybe the solution is to offer them not a plain-text area, but one powered by TinyMCE/similar to actually render the markup into bbcode of sorts for parsing. on the front end. this would scrub the extra break tags right into a visual scope. Counting things is probably not a good idea.
type: Comment
comment on: http://stackoverflow.com/q/26489625
type: QuestionComment

http://stackoverflow.com/q/26444727
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26444778
upvote count: 7
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/28458466
has body: I'm really having trouble with this, and in this instance, I neither want to skip the verify_authenticity_token filter, nor change to protect_from_forgery with: :null_session. In my request method, I am setting a header with the csrf token as follows: var token = document.querySelector("meta[name='csrf-token']").content; xhr.setRequestHeader("X-CSRF-Token", token); And by inserting a breakpoint in my controller like so: def verify_authenticity_token binding.pry super end I have verified that the header is set: [1] pry(#&lt;MyController&gt;)&gt; request.headers =&gt; #&lt;ActionDispatch::Http::Headers:0x007fb227cbf490 @env= {"CONTENT_LENGTH"=&gt;"202", . . . # omitted headers . . . "HTTP_X_CSRF_TOKEN"=&gt;"the-correct-token-from-meta-tag", . . . } I have also tried passing the token as a param with the key authenticity_token (as is done with Rails forms), and set the X-CSRF-Param tag to match (from meta[name="csrf-param"]). Yet I am still getting: Can't verify CSRF token authenticity Completed 422 Unprocessable Entity in 14638ms ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken Anyone seen this before? Any thoughts on what might cause this? Thanks in advance! EDIT: Following discussion in the comments of marflar's answer, it looks like the token has expired when the request is made (tested by comparing to form_authenticity_token). This is confusing me further, as the token set in &lt;%= csrf_meta_tags %&gt; is expired when the next request comes in. Any thoughts? EDIT2: Following marflar's advice below, I added the following after_filter to my app controller: def set_csrf_headers response.headers['X-CSRF-Param'] = request_forgery_protection_token.to_s response.headers['X-CSRF-Token'] = form_authenticity_token end And I updated xhr.onload in my request method as follows: namespace.request = = function (type, url, opts, callback) { // code omitted xhr.onload = function () { setCSRFHeaders(xhr); var res = {data: JSON.parse(xhr.respon…
score: 7
tagged with: csrf
tagged with: javascript
answer count: 2
tagged with: ruby-on-rails-4
has title: Can't verify CSRF token authenticity Rails 4 Ajax even when header is set
downvote count: 0

http://stackoverflow.com/comment/41638415
type: Comment
comment on: http://stackoverflow.com/a/26503263
score: 0
type: AnswerComment
has text: Dude, no. Don't ever use `eval`. Especially not like that! Use `arr[key]` instead.

http://stackoverflow.com/comment/41488988
comment on: http://stackoverflow.com/q/26421489
type: Comment
type: QuestionComment
has text: you have to store your `result` variable in global scope. if you show us the code all about 'result` we can help further
score: 1

http://stackoverflow.com/a/26384112
score: 0
answers question: http://stackoverflow.com/q/26383705
has body: HTML Code You have to use $("select option[value="+yourval+"]").prop('selected', true) to select the option dynamically after binding the select element to div. jQuery Code var yourval = '2'; var select = " \ 1 \ 2 \ 3 \ "; $("div").html(select); $("select option[value="+yourval+"]").prop('selected', true); http://jsfiddle.net/q5bo507k/
type: Answer

http://stackoverflow.com/comment/41553288
type: AnswerComment
comment on: http://stackoverflow.com/a/26455689
type: Comment
score: 1
has text: Thanks, but I believe the code for your directive example is missing?

http://stackoverflow.com/comment/41419818
type: QuestionComment
comment on: http://stackoverflow.com/q/26379625
type: Comment
score: 0
has text: This may be helpful: [require-lazy](https://github.com/nikospara/require-lazy/)

http://stackoverflow.com/a/26365290
answers question: http://stackoverflow.com/q/26364345
type: Answer
score: 0
has body: That is some odd thing to request. TL;DR: PLUNKR example on Explicit Filter What i wrote below, is for a bit more beginners who are struggling with angularjs. But Basically you are trying to create an explicit filter? Like if we have $scope.records = [{name:'John', phone:'555-1276'}, {name:'Mary', phone:'800-BIG-MARY'}, {name:'Mike', phone:'555-4321'}, {name:'Adam', phone:'555-5678'}, {name:'Julie', phone:'555-8765'}, {name:'Juliette', phone:'555-5678'}]; You would want that J will present nothing and John would present name:John, Phone: 555-1276 ? If that is the case you need to use anuglarjs custom filters. I've created a plunker for that reason: Working Explicit Filter which is using the same records as above. The filter method is rather not that smart but I'll give you a short explanation about it : newApp.filter('explicitSearch',function(){ //AngularJS -> declaring a new filter in our newApp module. return function(items, string){ //The parameters here: well the first parameter in your filter return function would always be the data you are referring to. //The second parameter would be the argument that you are passing to the filter, //Example : Looks like so var filtered = []; //This array, is going to be our filtered results. //This is simple JS code, basically iterate over the data the filter have passed, what if you find something that is explicitly equal, add it to our filtered array. for (var i = 0; i < items.length; i++) { var item = items[i]; if (item.name === string) { filtered.push(item); } if(item.phone === string){ filtered.push(item); } } return filtered; } }); Use upon HTML: Search: Name Phone {{record.name}} {{record.phone}}>

http://stackoverflow.com/q/26465297
has title: .next(".myClass") Not Working Jquery
downvote count: 0
favorite count: 0
has body: I don't know how to access the value that I want I've tried a lot of things but I don't know how to find my value. Here is my HTML: Actions Nom Coordonnées Diplômes Profil associé 2014-2015 Copier les adresses emails Actions Nom Coordonnées Diplômes Profil associé 2014-2015 Copier les adresses emails BLABLABLA BLABLABLA Here is my JS: $("body").on('click', ".copyMails", function() { console.log($(this).parent().parent().parent().next('.lstMails').val()); }); I've tried with and with parent with more and less etc. But I don't know how to do this. I want to access the next .lstMails when I click on the button .copyMails
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41568486
score: 1
has answer: http://stackoverflow.com/a/26465322
upvote count: 1
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26465321
tagged with: jquery
has answer: http://stackoverflow.com/a/26465321
answer count: 2
accepted answer: http://stackoverflow.com/a/26465322
tagged with: jquery-selectors

http://stackoverflow.com/a/26451886
type: AcceptedAnswer
downvote count: 0
upvote count: 8
has body: Issue Your problem here is that you probably aren't using the correct permissions. To get cookies from a certain url/page you'll need to use the chrome.cookies API. This API needs the permissions for "cookies" and all the URLs you want to retrieve cookies from. Solution In your manifest.json, request the permissions you need. If you want to retrieve cookies from all the sites, you can use the "&lt;all_urls&gt;" permission. Or, if you want cookies only from that site you can use, for example, "http://luptaonline.com/*. I also noticed that you are using the chrome.tabs API, so the permissions in manifest.json should look like this: ... "permissions": [ "cookies", "tabs", "&lt;all_urls&gt;" ], ... Now, in your background.js, you can easily call the chrome.cookies.get() method to retrieve the PHPSESSID cookie, like this: var myUrl = "http://luptaonline.com/player/"; // assuming that this is the url chrome.cookies.get({url: myUrl, name: 'PHPSESSID'}, function(cookie) { // do something with the cookie console.log(cookie); alert(cookie.name + ' found, value: ' + cookie.value); }); Running the above code you'll get what you want. Here are some screenshot of the results: Console log: Cookie alert: Working example You can download a working example of the extension HERE. Documentation You may find this documentation links helpful: chrome.cookies API chrome.cookies.get method
type: Answer
score: 8
answers question: http://stackoverflow.com/q/26451377
accepted answer of: http://stackoverflow.com/q/26451377

http://stackoverflow.com/q/26456472
upvote count: 1
has comment: http://stackoverflow.com/comment/41553865
possible better answer: http://stackoverflow.com/a/26463699
type: Question
type: AnsweredQuestion
score: 1
answer count: 2
downvote count: 0
has title: what is the purpose of inserting a dot or a period in the id of an html element
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41553864
has answer: http://stackoverflow.com/a/26463699
favorite count: 0
has comment: http://stackoverflow.com/comment/41553486
has answer: http://stackoverflow.com/a/26456494
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26456494
tagged with: css
has body: i cant know what is the purpose of inserting a dot or a period in the id of an html element, is there any extra benefit we get in any coding language ? Headset, e.g. Bluetooth headset, for mobile device has configuration logic which configures headset based on sensor data indicating whether headset is being worn by user i want to select the div of id="PAT.TID", how i can do that document.querySelector('#PAT\.TID') here i got a null object in chrome browser console how i select like wildchar contain in id elements using pure javascript ? (like querySelector)

http://stackoverflow.com/q/26450444
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26450650
has comment: http://stackoverflow.com/comment/41542968
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41543140
has comment: http://stackoverflow.com/comment/41542330
has body: I have created a navigation menu using Bootstrap 3 navbar. But It has a small issue: When mouse moves over a menu item it perfectly change its color to dark green. But when I leave the menu, it does not directly changes its color to light-green. It quickly changes to gray(default) color and then turn to light green. Below is a screen of my navigation bar: .navbar-default{ background-color: #4ec67f; } .navbar-nav &gt; li &gt; a { color: #FFFFFF; font-size: 14px; font-weight: 600; text-transform: uppercase; } li.active{ background: #34b586 !important; } li &gt; a:focus{ background: #34b586 !important; } li:hover &gt; a{ background: #34b586 !important; color: #FFFFFF !important; } li &gt; a:hover{ color: #FFFFFF !important; background: #34b586 !important; } How to avoid this problem? Thanks in advance.
score: 0
has comment: http://stackoverflow.com/comment/41542286
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has title: background color change on mouse leave bootstrap navbar
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/26366430
tagged with: javascript
has answer: http://stackoverflow.com/a/26366480
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26366480
has body: I have an edit control inside of an ng-repeat that is correctly changing boolean values onclick, however, the elements that are hooked to these values via ng-show are not showing/hiding. What is going wrong? Controller: $scope.editedAnswers = {}; $scope.toggleEditAnswer = function(answer) { $scope.editedAnswers[answer._id] = !$scope.editedAnswers[answer._id]; console.log($scope.editedAnswers[answer._id]); }; $scope.updateAnswer = function(answer) { answer.$update(function() { $location.path('answers/' + answer._id); }); $scope.toggleEditAnswer(answer); }; HTML: edit save {{answer.content}}
tagged with: angularjs
has title: Editing function inside ng repeat
score: 0
has answer: http://stackoverflow.com/a/26368066
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26368066

http://stackoverflow.com/comment/41526087
type: QuestionComment
comment on: http://stackoverflow.com/q/26441462
type: Comment
score: 1
has text: What language or tool are you using? Your regex is correct, but your replacement string may have to be expressed as `<$1>` for instance depending on the language.

http://stackoverflow.com/a/26474946
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: You have to make the function splitName return final_string;
accepted answer of: http://stackoverflow.com/q/26474924
answers question: http://stackoverflow.com/q/26474924
type: Answer
score: 4

http://stackoverflow.com/comment/41614645
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26490015
has text: No, not displayed, maybe my approach is invalid ?

http://stackoverflow.com/comment/41475697
comment on: http://stackoverflow.com/q/26387209
type: Comment
type: QuestionComment
has text: Great suggestion, I did have `elasticY(true)`. And thanks for the link!
score: 0

http://stackoverflow.com/comment/41592119
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26477429
has text: @JasonSpence - No problem man :) Admittedly the form stuff is really easy to get mixed up on due to all the repetition.
type: Comment

http://stackoverflow.com/q/26472762
favorite count: 0
has title: How long does it take to write to document.cookie
has body: Was wondering how long it takes to write to document.cookie. Ran into an edge case when setting a cookie and re-directing to another page and the document.cookie was not getting set. Seemed to have different performance on a desktop (Chrome, firefox) vs iphone/tablet (safari) Seemed to worked correctly in all cases when I added a set timeout of about 500ms // writing cookie out function set_cookie(name, value ) { var date = new Date(); date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); var cookie = name + "=" + value + "; expires=" + date.toGMTString() + ";"; document.cookie = cookie; } // reading cookie function read_Cookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i &lt; ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) { var cVal = c.substring(nameEQ.length, c.length); return cVal; } } return null; } // button click setting cookie and navigation $("#goToWebButton").click(function() { if ($('#chkDontShow').attr('checked') == 'checked') { set_cookie('IgnoreInAppLink','web'); } setTimeout(function(){window.location.href = '';}, 500); }); $("#goToAppButton").click(function() { if ($('#chkDontShow').attr('checked') == 'checked') { set_cookie('IgnoreInAppLink','app'); } setTimeout(function(){window.location.href = '';},500); });
has answer: http://stackoverflow.com/a/26476674
upvote count: 2
type: UnansweredQuestion
type: Question
score: 2
tagged with: cookies
tagged with: mobile
linked to: http://stackoverflow.com/q/2734025
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26402846
upvote count: 5
has answer: http://stackoverflow.com/a/26407943
type: AnsweredQuestion
downvote count: 0
has body: I know a couple of projects out there like mean.io or meanjs, or even yeoman generators where all the necessary boilerplate stuff when you are going to develop under MEAN stack it's done for you. The truth is that MEAN stack has been closely coupled with Angular.js and there is no project that do the same with Backbone.js and I'm very surprised with that, I believe it is a very common stack the combination of Mongodb, Express, Backbone and friends like Require.js or Marionette.js. I've been poking around with that, trying to mix backbone and express yeoman generators, building a skeleton from other people projects but I still keep thinking there has to be a better approach to do that. I would appreciate it to you guys sharing your experience to figure out what I am missing here. So the question is: Which are the common practices and tips do you use for starting a full stack "MEBN" (Mongodb, Express and Backbone) project from scratch? Thanks to all of you!!
type: Question
tagged with: mongodb
answer count: 2
score: 5
tagged with: mean-stack
tagged with: javascript
has title: Backbone.js MEAN Stack equivalent
tagged with: express
possible better answer: http://stackoverflow.com/a/26741756
has answer: http://stackoverflow.com/a/26741756
accepted answer: http://stackoverflow.com/a/26407943
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/comment/42812179
type: AnswerComment
comment on: http://stackoverflow.com/a/26983260
type: Comment
has text: Sorry for the confusion... `vinyl-source-stream` is used with `browserify` in gulp... if you're using `gulp-browserify` it works differently. It's better to just use browserify, and use `vinyl-source-stream` to convert the stream into a gulp stream.
score: 1

http://stackoverflow.com/a/26452171
answers question: http://stackoverflow.com/q/26452133
score: 0
has body: It's not allowed to get history urls for security reasons.
type: Answer

http://stackoverflow.com/a/26496837
answers question: http://stackoverflow.com/q/26494284
has comment: http://stackoverflow.com/comment/41637330
has comment: http://stackoverflow.com/comment/41636278
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41636982
has body: You can fetch html of a web page by making a get request to the url of the html and you can get html in a NSString object by using following code . You dont even need UIWebview to access html content of a webpage . NSURLResponse * response = nil; NSError * error = nil; NSURLRequest* urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.emdrassociation.org.uk/site.php/profile/emdr/alison_russell.html"] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30.0]; NSData* data = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&amp;response error:&amp;error]; NSString *htmlString = [NSString stringWithUTF8String:[data bytes]];
has comment: http://stackoverflow.com/comment/41637823
type: Answer
has comment: http://stackoverflow.com/comment/41636523
has comment: http://stackoverflow.com/comment/41635686
accepted answer of: http://stackoverflow.com/q/26494284

http://stackoverflow.com/comment/41400990
has text: i removed the event and i doesn't work too hahah :/, how can i share you my code?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26372005

http://stackoverflow.com/a/41372258
upvote count: 16
type: Answer
answers question: http://stackoverflow.com/q/26496451
score: 16
has body: I know this is old, but for those who are struggling with this for Ionic 2, add script files to src/assets/scripts, then refer to them via a script tag in src/index.html (not the one in www). When it builds, everything in src/assets will be copied to www/assets, including your scripts. index.html will also be copied to www.
downvote count: 0

http://stackoverflow.com/q/26478448
has body: I use Ajax and Progress bars into Twitter bootstrap for uploading file function. But I don't know how to get percentage uploading file with Ajax. Please help, thanks.
tagged with: php
type: AnsweredQuestion
has title: How to get percentage uploading file with Ajax?
linked to: http://stackoverflow.com/q/15965651
has comment: http://stackoverflow.com/comment/41594524
type: Question
has answer: http://stackoverflow.com/a/26479157
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26479157
tagged with: ajax
score: 0
answer count: 1
tagged with: zend-framework2
tagged with: twitter-bootstrap

http://stackoverflow.com/a/26402801
has body: Because that will lead to a nightmare hell as soon as you have more than 2 o 3 routes/functions, or you need anything more that 2 lines to setup the data and views for each route. Also, it's much much easier to test your route handlers if you can simply call one function. If you need one function per your requirements, then what's wrong is your route definition! I assume you are modeling a single page with search functionality and pagination of those search results. Let's suppose that page is accesed with a url like "yourapp/#page": Enter optional parameters my friend: :) http://backbonejs.org/#Router-routes var Workspace = Backbone.Router.extend({ routes: { "page(/search/:query)(/:page)": "main" }, main: function(query, page) { if(query) { //you're searching if(page) { //display specific page } else { //show first results page } } else { //show you initial views/models } } }); That route will handle: page, page/search/apples and page/search/apples/4
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26396894
has comment: http://stackoverflow.com/comment/41603095

http://stackoverflow.com/comment/58942131
comment on: http://stackoverflow.com/a/26470025
score: 0
type: Comment
type: AnswerComment
has text: I haven't tested this, but you should be able to put the controller in the abstract state, because it's the same across all of the children, right?

http://stackoverflow.com/comment/41615248
type: Comment
has text: The problem is with ur alteration, the game wont work, if I click the button nothing happens
type: AnswerComment
comment on: http://stackoverflow.com/a/26490619
score: 0

http://stackoverflow.com/q/26354548
tagged with: casperjs
has title: How to interact with a custom select box with CasperJS?
has answer: http://stackoverflow.com/a/26354906
tagged with: phantomjs
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26354906
tagged with: javascript
has body: When I visit a nike.com store page (test URL listed below) with my Casper script, I'm unable to change the value of the 'skuAndSize' select element. I am verifying this by checking the screenshot that is made after the supposed change. The code I am using to do it is: // Add to cart casper.then(function() { this.fillSelectors('form.add-to-cart-form', { 'select[name="skuAndSize"]' : '3857923:9' }, false); this.capture("test.png"); this.click('button#buyingtools-add-to-cart-button'); }); Is there a better way to be handling this? TEST URL: http://store.nike.com/us/en_us/pd/mercurial-superfly-fg-soccer-cleat/pid-1531739/pgid-1481200
score: 0
answer count: 1

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/26421109
tag name: sequelize.js
tags question: http://stackoverflow.com/q/26474612

http://stackoverflow.com/a/26480946
has body: Setters are implemented as javascript setters This means that the setter will be invoked when you assign to the property process.status = 'done' // this invokes the setter
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26474612
answers question: http://stackoverflow.com/q/26474612
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26459059
has answer: http://stackoverflow.com/a/26459359
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41557942
type: UnansweredQuestion
upvote count: 1
has title: How can I secure a Javascript call to a Java Servlet via XMLHttpRequest such that it cannot be used if the url is manually entered into a browser?
tagged with: xmlhttprequest
has body: I currently have a webpage that uses a javascript that does the following: function callSomething(parm) { req = false; if (window.XMLHttpRequest) { try { req = new XMLHttpRequest(); } catch (e) { req = false; } } else if (window.ActiveXObject) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { req = false; } } } if (req) { var url_str = "/Servlet?parm=" + parm; req.open("GET", url_str, false); req.onreadystatechange = processReqChange; req.send(null); // process the response } return something; } My concern is that if someone enters the full URL manually (e.g. "http://somesampleserver.com/Servlet?parm=something") in an browser window, the response is also displayed. How do I prevent that from happening? I only want the code to be able to get the response.
has comment: http://stackoverflow.com/comment/41557971
tagged with: java
has answer: http://stackoverflow.com/a/26461467
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41557975
has comment: http://stackoverflow.com/comment/41557911
has comment: http://stackoverflow.com/comment/41557993
tagged with: javascript
has comment: http://stackoverflow.com/comment/41557893
tagged with: servlets
tagged with: security

http://stackoverflow.com/q/26481488
has comment: http://stackoverflow.com/comment/41598822
has answer: http://stackoverflow.com/a/26481560
type: Question
tagged with: arrays
has title: Random generator with no duplicated numbers
has body: I have an array that needs to hold 6 randomly generated numbers. What I have done to achieve no duplicates is used the following code. I thought this would work by adding 1 to the duplicate but then again it will again show up towards the end! userInput = document.getElementById('txtGen').value; var numbers = new Array(6); var msg = ''; for(var i=0;i&lt;numbers.length;i++) { numbers[i] = Math.random() * userInput; numbers[i] = Math.floor(numbers[i]); if(numbers[i] == numbers[i-1]){ numbers[i] = numbers[i++]; } msg += '&lt;input id="num' + i + '"' + 'type="text" value="' + numbers[i] + '" /&gt;'; } document.getElementById('numbers').innerHTML = msg; I also tried this, but that also didn't work! for(var i=0;i&lt;numbers.length;i++) { numbers[i] = Math.random() * userInput; numbers[i] = Math.floor(numbers[i]); for(var b=0;b&lt;numbers.length;b++) { if(numbers[b] == numbers[b--]){ numbers[b] = numbers[b++]; } } msg += '&lt;input id="num' + i + '"' + 'type="text" value="' + numbers[i] + '" /&gt;'; }
tagged with: javascript
has answer: http://stackoverflow.com/a/26481756
accepted answer: http://stackoverflow.com/a/26481617
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26481560
answer count: 4
has answer: http://stackoverflow.com/a/26481611
has answer: http://stackoverflow.com/a/26481617
type: AnsweredQuestion

http://stackoverflow.com/comment/41394593
type: Comment
score: 0
has text: I've tried using angular-datatables (http://l-lin.github.io/angular-datatables) but I can't get it to return anything other than a console error. I figured this was a simple enough implementation of datatables that it wouldn't be an issue.
comment on: http://stackoverflow.com/q/26368490
type: QuestionComment

http://stackoverflow.com/comment/41374460
type: QuestionComment
comment on: http://stackoverflow.com/q/26357707
score: 0
has text: Questions that ask the same question are duplicates, it does not mean the same person asked the same question. It's to point out that the question has been asked and answered before.
type: Comment

http://stackoverflow.com/a/26370273
has body: You're going to need to set the background-image to a different URL if you don't want to reload the entire page. However, you can attach a fragment (ex. http://example.com/index.php#fragment), or alternatively a query string (ex. http://example.com/index.php?querystring) to that URL .php file each time. If you are going to reset it every 5 seconds, a good method would be to append a new Date().getTime(); to the end of the image source URL, like this: var currentDate = new Date(); $container.css("background-image", "url(bg.php#" + currentDate.getTime() + ")"); or even more succinctly/efficiently $container.css("background-image", "url(bg.php#" + new Date().getTime() + ")"); You should end up with a background-image property of something like url(bg.php#1413320228120). This is good because the fragment won't affect where the browser looks for the image (still bg.php), but it'll consider it a different URL each time and load it again. Your solution should look something like: (function($) { $(document).ready(function() { var $container = $("header"); $container.css("background-image", "url(bg.php)"); var refreshId = setInterval(function() { $container.css("background-image", "url(bg.php)"); }, 9000); }); })(jQuery);
answers question: http://stackoverflow.com/q/26369940
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41400193
has comment: http://stackoverflow.com/comment/41400166

http://stackoverflow.com/a/26387207
has comment: http://stackoverflow.com/comment/41430118
has comment: http://stackoverflow.com/comment/41433659
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41429533
type: Answer
has comment: http://stackoverflow.com/comment/41442100
downvote count: 0
has comment: http://stackoverflow.com/comment/41430082
score: 3
has comment: http://stackoverflow.com/comment/41443103
accepted answer of: http://stackoverflow.com/q/26387007
upvote count: 3
answers question: http://stackoverflow.com/q/26387007
has body: But who passes the value to response in the callback function? If you're asking who supplies the response parameter to your function, the answer (in plainest terms) is Node.js. If you care to understand it at a deeper code level, you can examine the source. He's the definition for http.createServer(): exports.createServer = function(requestListener) { return new Server(requestListener); }; As can be seen, the requestListener argument is the callback you're referring to. This is used to instantiated a new Server instance. The Server constructor is defined in the same file, and as can be seen, that requestListener gets registered as an event listener for the 'request' event: if (requestListener) { this.addListener('request', requestListener); } From there the code requires a deeper dive to understand everything that happens when a new request comes in, but at a minimum, we can see that the server eventually emits the request event with the req and res parameters: self.emit('request', req, res); And since your createServer() callback has been registered as an event listener for request events, it receives those parameters. IS this passed by createServer by default in node.js? As explained above, yes - this is default behavior. Can I change the order of request and response? Hopefully this is obvious from all the above, but for the sake of completeness, "no". Edit: to address some of your general confusion on callbacks, maybe this will help... First of all, whether we're talking about "callbacks", "event listeners", or any other common convention in evented programming, it's important to understand that at the end of the day, they're all just functions. The only thing that makes it a "callback" is a certain set of conventions about how and when it gets, well, called. Side note: In this particular case, it would actually be more accurate to refer to the createServer() argument as an "event listener", since it gets invoked in response to a particular event (requests). Eit…

http://stackoverflow.com/comment/41577971
score: 0
has text: Something like this you would like? http://jsfiddle.net/0nojobc3/3/
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26469798

http://stackoverflow.com/q/26415371
answer count: 1
has body: I added the Facebook "Like" and "Share" button on my site. When I click "Share" I get the usual popup prompting for a message. However, in the pre-filled content area below, it only says www.example.com www.myurl.com I've added the following and it hasn't helped: I've tried it with and without the JS SDK. I've also tried the iFrame option. What am I doing wrong? Why is "example.com" in the description field?
has comment: http://stackoverflow.com/comment/41478695
tagged with: facebook-graph-api
type: UnansweredQuestion
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
has title: Facebook share button only showing www.example.com
has answer: http://stackoverflow.com/a/26415757
type: Question
has comment: http://stackoverflow.com/comment/41478555
tagged with: javascript
score: 0

http://stackoverflow.com/a/26438269
has comment: http://stackoverflow.com/comment/41520701
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26438202
answers question: http://stackoverflow.com/q/26438202
downvote count: 0
has body: You can use this regex: [-+]?(?:(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?|Infinity) RegEx Demo
has comment: http://stackoverflow.com/comment/41520723
score: 2
upvote count: 2

http://stackoverflow.com/comment/41381038
has text: Your second answer is awesome.Thanks
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26360833

http://stackoverflow.com/comment/41604941
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26485172
has text: Thanks, but that doesn't seem to work. I tried it after the alert in my example project and still the postback was not fired. Besides, even if it worked, it would trigger the postback when I didn't want to... and that is when I'm simply filling and tabbing through controls and the validation is occurring.

http://stackoverflow.com/q/26497550
has answer: http://stackoverflow.com/a/26497618
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/25269703
tagged with: return
accepted answer: http://stackoverflow.com/a/26497618
type: AnsweredQuestion
tagged with: transactions
type: Question
has title: Handling database transaction returns
has body: Here I have a function that is supposed to return the number of seconds as the variable sec but the return statement is running before the database transaction so I keep getting undefined. What can I do to make sure the transaction finishes before the return calls. Similar to onreadystatechange for XMLHttpRequest. function getLevelSeconds (index) { var sec; db.transaction(function (tx) {tx.executeSql('SELECT * FROM SPLevelData', [], function (tx, result) {sec=result.rows.item(index).seconds;}, errorCB)}, errorCB); return sec; }
tagged with: database
tagged with: javascript

http://stackoverflow.com/comment/41445914
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26392957
has text: Well... I'm using Bootstrap already for the CSS, but I was only planning to use jQuery as a last resort. And this looks like the last resort.
type: Comment

http://stackoverflow.com/comment/41570050
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26465916
has text: You can't just extract titles from the result (http://lab.abhinayrathore.com/imdb_suggest/)?

http://stackoverflow.com/comment/41448943
comment on: http://stackoverflow.com/q/26398916
score: 0
type: Comment
type: QuestionComment
has text: @Dart I console the selector it show the body, so need no to do node checking, something is wrong with my traverse I guess.

http://stackoverflow.com/q/26467653
has answer: http://stackoverflow.com/a/26467654
type: Question
tagged with: javascript
has title: JQuery Mobile 1.4 - widgets appears OK on Page, but without skin on Popup
answer count: 1
downvote count: 0
tagged with: jquery-mobile
linked to: http://stackoverflow.com/q/22559039
tagged with: jquery
favorite count: 0
duplicate of: http://stackoverflow.com/q/22559039
type: UnansweredQuestion
has body: (It will be a self-answered question, I've spent lot of time with it, maybe someone else has not to do so.) When I put my slider widgets to a page (data-role="page"), they work, but when I put the same HTML cose in a popup (data-role="popup") div, JQM does not add the classes and listeners, they remain untouched, standard HTML5 widget. Width: I am using following code to initialize popups: $("div[data-role='popup']").popup(); Then I use this for opening: $("#mypopup").popup("open"); The popup opens, with correct skin and position etc., but widgets remains untouched by JQM.
tagged with: http://stackoverflow.com/tag/html
score: 1
upvote count: 1

http://stackoverflow.com/a/26393994
has comment: http://stackoverflow.com/comment/41513638
has comment: http://stackoverflow.com/comment/41512031
has body: You don't really say specifically what you want other than a timer, but based off your markup is something like this what you're looking for? Here is your updated fiddle var $timer = $('.Timer'), $timerTitle = $('.TimerTitle'), $start = $('.start'), $increment = $('.increment'), maxDuration = 10, defaultDuration = 10, count = 0, $gameCount = $('#gameCount'); $timerTitle.text("Get ready! You have " + maxDuration + " seconds!"); $start.on('click', function() { getDuration(); return false; }); function getDuration() { $start.prop('disabled', true); setTimeout(function() { var duration = $timer.data('duration'); if(duration === undefined || duration < 0) duration = maxDuration; $timer.text(duration); $timer.data('duration', --duration); if(duration > -1) { if(duration < 5) { if(duration % 2 == 0) { $timer.css({'background-color':'blue', 'color':'white'}); } else { $timer.css({'background-color':'transparent', 'color':'black'}); } } getDuration(); } else { count++; $gameCount.text("Current game count: " + count); if(count % 5 == 0) defaultDuration += 5; maxDuration = defaultDuration; $timer.css({'background-color':'transparent', 'color':'black'}); $timer.text(''); $timerTitle.text("Get ready! You have " + maxDuration + " seconds!"); $start.prop('disabled', false); } }, 1000); } start Current game count: 0
answers question: http://stackoverflow.com/q/26391577
has comment: http://stackoverflow.com/comment/41504654
has comment: http://stackoverflow.com/comment/41514352
has comment: http://stackoverflow.com/comment/41526803
has comment: http://stackoverflow.com/comment/41514217
has comment: http://stackoverflow.com/comment/41537520
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41468309
has comment: http://stackoverflow.com/comment/41453602

http://stackoverflow.com/comment/41461900
type: QuestionComment
has text: This line won´t also work: $('user').submit(), set the "user" selector accordingly if a class $(".user"), if it's an id $("#user"). I'm guessing that #user is the form name?
score: 1
comment on: http://stackoverflow.com/q/26406422
type: Comment

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/26382411

http://stackoverflow.com/comment/41669907
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26513343
has text: the `/../` is not a valid path, is it, or are you just trying to shorten it for readability?

http://stackoverflow.com/q/26447063
possible better answer: http://stackoverflow.com/a/26447206
has comment: http://stackoverflow.com/comment/41536588
tagged with: javascript
has answer: http://stackoverflow.com/a/26447206
has answer: http://stackoverflow.com/a/26447201
has comment: http://stackoverflow.com/comment/41536706
answer count: 2
accepted answer: http://stackoverflow.com/a/26447201
favorite count: 0
has comment: http://stackoverflow.com/comment/41536472
tagged with: angularjs
has title: Reading nested array in JSON AngularJs using ng-repeat
tagged with: android
has comment: http://stackoverflow.com/comment/41536492
has comment: http://stackoverflow.com/comment/41536499
type: AnsweredQuestion
has body: I am developing an Android application using angularjs and ionic framework, using JSON to display some data in the application front end. I want to generate HTML like this: name1 name2 name3 Here is my JSON: var items=[ {name:["name1","name2","name3"]} ]; I can read the JSON node by myJsonObject.name, but how can I iterate through the nested array?
has comment: http://stackoverflow.com/comment/41536561
upvote count: 2
score: 1
has comment: http://stackoverflow.com/comment/41536539
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
has comment: http://stackoverflow.com/comment/41536595
type: Question

http://stackoverflow.com/comment/41515729
has text: @dnault Alright, will take a look when I have the time later.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26435426
type: QuestionComment

http://stackoverflow.com/q/26495914
favorite count: 0
type: Question
has title: Jssor Slideshow Not Fading in Chrome
has body: Thanks in advance for any help on this. I am using a basic Jssor fading slideshow. It works fine on Firefox, IE, and Safari, but the images won't fade in Chrome, they just transition directly from one image to the next. I can't figure out where I've gone wrong, and I'm not familiar enough with javascript to be able to troubleshoot in more depth. Here is a link to the work in progress: http://www.angelabrowndesign.com/salmon_river_brewery/index.php. Here is the code that's within the body tag for the script: UPDATE: I have been able to tweak the javascript so that I am getting a fade effect in Chrome. However, now (again, only in Chrome), there is this period between images, where no image appears at all, just the page background, and then the new image sort of "jolts" into the frame. It's not nearly as smooth as the other browsers. Here's the updated relevant code:
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/26519207
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41628173
downvote count: 1
tagged with: jssor
has comment: http://stackoverflow.com/comment/41625224
upvote count: 0
has answer: http://stackoverflow.com/a/26501385
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41628001

http://stackoverflow.com/q/26379903
has body: I want to have some thing like 10 button and each time i should press it should subtract 1. and by reaching zero it should disappear. html code function add() { var numArray=["mynum1". "mynum2","mynum3". "mynum4","mynum5". "mynum6","mynum7". "mynum8","mynum9". "mynum10"] for (var i = 0; i < numArray.length; i++); var num = document.getElementById(numArray[i]).value; if(num == '') num = 0; if(num==1){ $(this).remove(); } document.getElementById(numArray[i]).value = parseInt(num ,10) - 1; } But its not working, what I am doing wrong. Also if you could tell me best javascript practice website
has answer: http://stackoverflow.com/a/26380499
has comment: http://stackoverflow.com/comment/41414815
has comment: http://stackoverflow.com/comment/41414832
has comment: http://stackoverflow.com/comment/41414924
downvote count: 4
has title: click to subtract 1 in javascript
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26380499
tagged with: input
favorite count: 0
type: AnsweredQuestion
score: -3
upvote count: 1
type: Question

http://stackoverflow.com/q/26434934
has body: I am trying to get the URL for all the photos of a facebook page. How do I get the 'source' URL for this query and JSON structure: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&amp;path=19292868552%3Ffields%3Dalbums.fields(photos.fields(source))&amp;version=v2.1 I am using this success callback from a JSONP request: function(response) { for (i = 0; i &lt; **???response.albums.data.length???**; i++) { alert(**???response.albums.data[i].photos.data[i].source???**) } } Can you help me find the right structure for the parts with the astericks? Because it has two [i]'s i think i'm getting confused..
score: 0
tagged with: facebook-graph-api
has title: Correct Javascript to get JSON info from Facebook Graph Query
type: UnansweredQuestion
tagged with: facebook
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26435335
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41386022
type: Comment
comment on: http://stackoverflow.com/a/26358989
score: 0
type: AnswerComment
has text: A close inspection of the function `backgroundIn()`'s internals will reveal it's doing a lot of chained css transformations which may be causing the animation to run slowly, would be compelled to break down each behaviour into separate method calls https://greensock.com/get-started-js#NDHTC93KA1L3QGFIxYIs

http://stackoverflow.com/q/26367737
score: 0
answer count: 3
has title: Javascript object descriptors
has comment: http://stackoverflow.com/comment/41392829
has answer: http://stackoverflow.com/a/26368101
has comment: http://stackoverflow.com/comment/41392729
has body: Is it possible to use getters/setters on Javascript objects like the following basic functionality mockup? function Descriptor(x) { this._value = x; this.setter = function(x) { // Set internal value after some action or modification this._value = x + 1; } this.getter = function() { // Return the internal value return this._value; } } var obj = {}; obj.a = new Descriptor(); obj.a = 5; // Would run the setter defined in the Descriptor object obj.a == 6; // Should evaluate to true in this trivial example // Same as above, just an example of being able to easily reuse the getter/setter obj.b = new Descriptor(); obj.b = 10; obj.b == 11; Ultimately, it should operate similarly to a Python descriptor set in a class definition. The only things I can find that accomplish something like this requires that the getter/setter be hooked up during the above obj creation, and cannot be easily reused on multiple attributes or objects.
has answer: http://stackoverflow.com/a/26368060
tagged with: javascript
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41392685
has answer: http://stackoverflow.com/a/26367907

http://stackoverflow.com/comment/41596969
type: QuestionComment
has text: @suchit probably it was something like this: you look how `switch-case` works, then use `if-else` instead, but either forgot to remove `break` or simply didn't understand what it is for.
score: 0
comment on: http://stackoverflow.com/q/26480092
type: Comment

http://stackoverflow.com/q/26414561
tagged with: heatmap
type: AnsweredQuestion
tagged with: calendar
type: Question
has answer: http://stackoverflow.com/a/26416242
accepted answer: http://stackoverflow.com/a/26416242
has title: Cal-Heatmap Stange (incorrect) color behavior
has body: I have a simple series of heat maps. Each with their own csv data source. You can see a hosted example here http://colinwhite.net/AtxUtilization/ Try examine the cells of July 14-17... Event data is being incorrectly color coded as zero. Can anyone help me explain and correct this strange behavior? You can inspect the source file here https://github.com/nyquist212/AtxUtilization/blob/master/index.html Any help would be much appreciated.
tagged with: javascript
score: 0
answer count: 1
tagged with: d3.js
tagged with: data-visualization

http://stackoverflow.com/comment/41615468
has text: @Nick - The nature of a recursive function means that you *always* want to return the result of the next recursion, should the next recursion call itself, you want that result returned up the call chain. Try it with the change I described in this answer and see if it gives your expected output.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26489592
type: AnswerComment

http://stackoverflow.com/comment/41481804
type: QuestionComment
comment on: http://stackoverflow.com/q/26417354
has text: I think @userToLazyForName is right. [Your Code Works](http://jsfiddle.net/kgnxrgq6/1/) but your HTML is bad. Inline styles, not closing ``, the use of a `` tag, use of "click Here" (OK, that's not HTML, [but still bad](http://www.mikesmithdev.com/blog/stop-saying-click-here/)). If you are having issues, then something else is the problem, and we need more code. As pasted, your code works.
score: 0
type: Comment

http://stackoverflow.com/comment/41541332
comment on: http://stackoverflow.com/q/26449881
type: Comment
type: QuestionComment
score: 1
has text: Why are you trying to create one ` ` with multiple `id`s?

http://stackoverflow.com/comment/41569829
type: Comment
comment on: http://stackoverflow.com/a/26464169
type: AnswerComment
has text: You don't need to use Node.js. To enable ES6 features in Chrome just visit the internal url `chrome://flags/` and select `Enable Experimental JavaScript`.
score: 0

http://stackoverflow.com/comment/41481676
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26417254
has text: Did you include jQuery before this?

http://stackoverflow.com/comment/41491526
has text: okay, after banging my head into the wall i found the solution. By default, the fata error is supposed to abort and just stop the execution and not segfault. However, on some compilators such as mine at the moment, the framework abort leads to an on purpose segfault. In order to avoid that, a new fatal function must be redefined that throws an exception which must be then catched in the C code to handle the error. At the moment, i've unknown error messages/code but i'll try to check if the stack contains the error object as it should contain the trace/file/line where the error occured.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26415047

http://stackoverflow.com/a/26451563
score: 2
has body: This can be easily done using skrollr.js https://github.com/Prinzhorn/skrollr typical usage as simple as : WOOOT where data-number represents current scroll position. you may also wanna try: http://johnpolacek.github.io/superscrollorama/
has comment: http://stackoverflow.com/comment/41544619
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26451511
upvote count: 2
answers question: http://stackoverflow.com/q/26451511
type: Answer

http://stackoverflow.com/q/26357520
score: 0
has title: ADF Faces custom component and javascript function
has body: I'm using the ADF Faces librairies and made a custom component that display a graph using d3js. In that component I import lot of javascript code that I wrote in separate js files. There is js code for handling buttons' click event. My component is displaying fine and behave the way I want except on button's click, where each time I click a button, my js function is well executed but after that all the page is reloaded. How to prevent the page to reload on button's click ? Buttons are created using javascript and d3js librairie zoomPanel.selectAll("button").data([zoom1, zoom2, zoom3]).enter().append("button"); buttons = zoomPanel.selectAll("button"); buttons .attr("id", function(zp) { return zp.id; }) .attr("class", "btn btn-default") .text(function(zp) { return zp.text; }) .on("click", function(zp) { zoomEvent(zp); }); Thank you. I found that I forgot to add the type attribute. In my case by adding type button fixed the issue.
type: UnansweredQuestion
tagged with: oracle-adf
has answer: http://stackoverflow.com/a/26367185
tagged with: oracle11g
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41474161
type: AnswerComment
type: Comment
score: 1
has text: Yes you need to install node.js. If my understanding is correct and you wish for your javascript code to act as a server, this is the way to go. A standard browser contained web app cannot actively bind and listen to a port.
comment on: http://stackoverflow.com/a/26412991

http://stackoverflow.com/comment/41533991
score: 0
has text: I updated my code with your updated suggestions and its working :D the only thing i really need to do now is keep the values in the text box instead of refreshing them to blank values again
type: Comment
comment on: http://stackoverflow.com/a/26436493
type: AnswerComment

http://stackoverflow.com/comment/41529493
has text: well what are the errors?
comment on: http://stackoverflow.com/q/26441560
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26505643
accepted answer: http://stackoverflow.com/a/26505967
possible better answer: http://stackoverflow.com/a/26505990
tagged with: javascript
has comment: http://stackoverflow.com/comment/41642491
has answer: http://stackoverflow.com/a/26505990
type: AnsweredQuestion
upvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/41642090
has answer: http://stackoverflow.com/a/26505967
downvote count: 1
has title: Loading gif in ajax call is not working properly, it will get hanging while loading in google Chrome
has body: Loading action should not work properly &amp; While loading the page, the page gets hanged for few seconds due to loading action. code as follows.. $("#loadingIcon").show(); $.ajax({ type: "GET", url: "displayCartItems.action", data: param, success: function(result){ $('#cartPage').html(result) ; $("#loadingIcon").hide(); getCartItemPriceDetail(); loadCart = false; }, }); $("#loadingIcon").show() is consist of gif image but it is hanging in web page while loading please find the image and please provide solution for this

http://stackoverflow.com/q/26430486
has title: How facebook auth by js?
tagged with: facebook
upvote count: 1
has comment: http://stackoverflow.com/comment/41505778
has answer: http://stackoverflow.com/a/31842015
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41507628
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/31842015
favorite count: 0
has body: I need a apps where user can login & after login some info will shown. But I have faces many problems several times. Please help me to correct this. SOmetime shows FB not recognized, sometimes shows GET file://connect.facebook.net/en_US/all.js net::ERR_FILE_NOT_FOUND . Facebook Login
has comment: http://stackoverflow.com/comment/41506573
tagged with: facebook-javascript-sdk
tagged with: facebook-graph-api

http://stackoverflow.com/a/43381899
type: Answer
answers question: http://stackoverflow.com/q/26442465
score: 0
has body: Found a fix with CSS (not jquery/javascript sorry) ( for googleCalendar iframe ) but I used the same concept for foxyForms iframe. via https://thomas.vanhoutte.be/miniblog/make-google-calendar-iframe-responsive/ html css .responsiveCal { position: relative; padding-bottom: 75%; height: 0; overflow: hidden; } .responsiveCal iframe { position: absolute; top:0; left: 0; width: 100%; height: 100%; } It allowed me to place a row within the container as well to use bootstraps responsive classes. Hope this is right, I'm still a beginner please feel free to correct any mistakes I made..

http://stackoverflow.com/q/26425083
tagged with: ajax
has answer: http://stackoverflow.com/a/26425392
has answer: http://stackoverflow.com/a/26425405
has title: Rails console shows view is rendered, but doesn't render in browser
tagged with: ruby-on-rails
tagged with: model-view-controller
accepted answer: http://stackoverflow.com/a/26425405
type: AnsweredQuestion
type: Question
score: 0
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26425392
has body: This seems very weird. I have a link that I want to make an ajax call to the controller to delete a users' responses, then redirect to another page. Here's the code for the link: <%= link_to 'try again', reset_score_path, remote: true, controller: "pages", action: "reset_score", class: "btn btn-primary tryAgain", data: { confirm: 'This will reset your score to zero and reset all of your answers so you can start fresh. Do you want to continue?', commit: "Restart", cancel: "No Thanks", focus: 'none'}, title: "Try Again?" %> And here's the controller action: def reset_score current_user.responses.destroy_all current_user.certificate.destroy redirect_to action: "course_page1", format: "html" and return end But the problem is that nothing happens in the browser; it doesn't redirect. But the console shows that it is processing and rendering the view. See console output: Started GET "/pages/reset_score" for 127.0.0.1 at 2014-10-17 07:19:45 -0500 Processing by PagesController#reset_score as JS User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 62 ORDER BY "users"."id" ASC LIMIT 1 Response Load (0.3ms) SELECT "responses".* FROM "responses" WHERE "responses"."user_id" = ? "user_id", 62 [AWS S3 404 0.306706 0 retries] head_object(:bucket_name=>"...",:key=>"x.pdf") AWS::S3::Errors::NoSuchKey No Such Key Redirected to http://localhost:3000/pages/course_page1.html Completed 302 Found in 315ms (ActiveRecord: 0.6ms) Started GET "/pages/course_page1.html" for 127.0.0.1 at 2014-10-17 07:19:45 -0500 Processing by PagesController#course_page1 as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 62 ORDER BY "users"."id" ASC LIMIT 1 Rendered pages/course_page1.html.erb within layouts/application (0.3ms) Rendered layouts/_header.html.erb (0.4ms) Completed 200 OK in 80ms (Views: 78.5ms | ActiveRecord: 0.2ms) So it appears to show that the view is rendered. However the browser does not actually show this view - it just stays on the previous page…

http://stackoverflow.com/a/26427343
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26426991
has comment: http://stackoverflow.com/comment/41501947
has comment: http://stackoverflow.com/comment/41500924
has comment: http://stackoverflow.com/comment/41502906
has comment: http://stackoverflow.com/comment/41502504
has comment: http://stackoverflow.com/comment/41501610
has comment: http://stackoverflow.com/comment/41501044
upvote count: 1
has comment: http://stackoverflow.com/comment/41501926
type: Answer
has body: If possible, perform the calculations within PHP to avoid putting pressure on the clients browser. I like Sebbzzz answer but, personal preference sees my time calculations happen in timestamps so: <?php $strExpiryTimestamp = strtotime($date["expires"]); /* For mockup purposes */ $intMonth = 1; /* date('n') Gets this month */ $intYear = 2014; /* date('Y') Gets this year */ $intStartOfMonth = mktime(0, 0, 0, $intMonth, 1, $intYear); if($strExpiryTimestamp < $intStartOfMonth) { $strOp = 'show'; } else { $strOp = 'hide'; } ?> Your HTML Using the above approach, you can clearly see that the calculations are performed "on top" at the server and then the script part can be included wherever you please so long as $strOp is available as a variable. If you want to find out some more information on date, check out the PHP manual page here

http://stackoverflow.com/comment/41400807
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26371776
score: 0
has text: @JamesHay "is not much less unreadable" so that would be `n-+--+` right? ;)

http://stackoverflow.com/a/26402830
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41455154
has body: If you want to call a function in the scope it has to be provided like this: test Demo: http://plnkr.co/edit/8vQ1wmdriGrDFGZwhqW2?p=preview If for some reason you can't modify HTML code (say, it's rendered dynamically by Kendo) and can't add attribute, then you can only access the function to call via $parent scope reference: $scope.$parent.onCancelChanges(); Demo: http://plnkr.co/edit/tpEEZs9VQunKXABud9yN?p=preview And finally, if it's not principal to have isolated scope for your directive then you can simply call the function as it's the same scope: .directive('kGridCancelChanges', function() { return { restrict: 'C', controller: function($scope, $element, $attrs, $location) { $element.click(function() { $scope.onCancelChanges(); }); } } }); Demo: http://plnkr.co/edit/0OmlCJ6SgYU2GQRyBgYj?p=preview
has comment: http://stackoverflow.com/comment/41455429
type: Answer
has comment: http://stackoverflow.com/comment/41456433
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41455323
has comment: http://stackoverflow.com/comment/41454980
accepted answer of: http://stackoverflow.com/q/26402520
has comment: http://stackoverflow.com/comment/41455200
has comment: http://stackoverflow.com/comment/41455017
answers question: http://stackoverflow.com/q/26402520
has comment: http://stackoverflow.com/comment/41455263

http://stackoverflow.com/q/26495163
has comment: http://stackoverflow.com/comment/41623561
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41623656
has comment: http://stackoverflow.com/comment/41623711
tagged with: css
has title: Onclick buttons which are in a div
has answer: http://stackoverflow.com/a/26495240
answer count: 3
upvote count: 1
has body: I am trying to create different hyperlinks for 3 buttons when they are clicked in HTML. I have looked around and there is a lot of examples which use JavaScript to do this - would this be better? why? I only want the buttons to load a different webpage. Thanks Current HTML code for 3 buttons: Entry forms Scoresheets Results
has answer: http://stackoverflow.com/a/26495292
has comment: http://stackoverflow.com/comment/41623626
has answer: http://stackoverflow.com/a/26495387
accepted answer: http://stackoverflow.com/a/26495240
possible better answer: http://stackoverflow.com/a/26495292
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41623593
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/comment/41626420
has text: But that way the arrows would toggle the `.slider-for` instead of `.single-item > img`, wouldn't they?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26496661

http://stackoverflow.com/q/26394884
type: AnsweredQuestion
has body: I have a button at the bottom of my form, I am trying to disable it if the email that the user tries to use is already in use. The email the user supplies is $email Here is my front-end code.. Here is my php file source <?php include('database_connection.php'); //Include The Database Connection File if(isset($_POST['email']))//If a username has been submitted { $email = mysql_real_escape_string($_POST['email']);//Some clean up :) $check_for_email = mysql_query("SELECT user_login FROM wp_users WHERE user_email='$email'"); //Query to check if username is available or not if(mysql_num_rows($check_for_email)) { echo '1';//If there is a record match in the Database - Not Available } else { echo '0';//No Record Found - Username is available } } ?> Is there an issue with my javascript syntax? $email is hard coded as something I know should fail..
has title: Using Javascript / Ajax to run a php script
has comment: http://stackoverflow.com/comment/41442235
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41442197
possible better answer: http://stackoverflow.com/a/26395210
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26395130
score: 0
has answer: http://stackoverflow.com/a/26395130
has answer: http://stackoverflow.com/a/26395210
tagged with: php

http://stackoverflow.com/a/58449668
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26504061
type: Answer
has body: In 2019 except anti-tracking browser extensions, some browsers' default behaviour is to block third party tracking cookies (e.g. firefox and maybe more) so I used @Xan's approach for my case for my Angular (2+) project. I am using Fetch API to check for allowance. (You can check for browser compatibility of Fetch API in the link provided). Below you call checkIfFacebookIsBlocked() function as soon as possible in your app's initialization or after GDPR acceptance etc. checkIfFacebookIsBlocked() { const _this = this; fetch('https://connect.facebook.net/en_US/sdk.js') .then(function() { console.log('Facebook sdk is allowed:'); _this.initFacebookSdk(); }) .catch(function() { console.log('Facebook sdk is NOT allowed:'); // handle the case that facebook is not allowed }); } initFacebookSdk() { const _this = this; (window as any).fbAsyncInit = function() { FB.init({ appId : FACEBOOK_APP_ID, // fb App ID cookie : true, xfbml : true, version : FACEBOOK_SDK_VERSION // fb app's api version }); FB.AppEvents.logPageView(); // your code after Facebook sdk is loaded... (getLoginStatus(), login(), api('/me', ...) etc.) }; (function(d, s, id) { let js; const fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/en_US/sdk.js'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); }

http://stackoverflow.com/comment/41499711
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26425987
has text: Open your console and inspect the network request.
score: 0

http://stackoverflow.com/comment/41510132
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26432414
has text: Try using .hasClass() instead of .is()
type: Comment

http://stackoverflow.com/q/26385363
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has answer: http://stackoverflow.com/a/26385775
has title: create readmore button with angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41424818
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/26385775
has body: I have a JSON object that has many rows and I'd like to add to the scope more and more of these object (lets say every click to add 2 more rows from the main json). I have the respone object, the includes, the main JSON (with all the rows) and the scope $scope.users from where I get all users with ng-repeat="user in users". Read More $scope.readMore = function() { /* HOW CAN I ADD HERE INTO `$scope.users` to have 2 more rows ? */ }; And how do I start $scope.users with only 2 rows (that come from the object response? thanks

http://stackoverflow.com/comment/41574690
comment on: http://stackoverflow.com/a/26466587
type: AnswerComment
score: 0
type: Comment
has text: unless you had the exact size for every character of the fonts, the div and the line-height then this would be impossible to do before dom insertion...

http://stackoverflow.com/q/26361008
tagged with: javascript
tagged with: docker
tagged with: boot2docker
downvote count: 0
has comment: http://stackoverflow.com/comment/41386059
has comment: http://stackoverflow.com/comment/41386157
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41381464
has body: I have built a docker container from centOS using a node.js hapi server. The server works fine running on its own, I get the right output in the console when running it inside the container. However, I don't know how to get at it. Output from docker container $ docker run -p 49000:3000 work/learning Server running at: http://f878541bb9f8:3000 Pack Server running at: http://f878541bb9f8:5000 Docker file # DOCKER-VERSION 0.3.4 FROM centos:centos6 # Enable EPEL for Node.js RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # Install Node.js and npm RUN yum install -y npm ADD . /src RUN cd src; npm install EXPOSE 3000 CMD node /src/server.js
has title: Accessing a node.js Hapi server running inside a docker container
has comment: http://stackoverflow.com/comment/41391813
tagged with: node.js
answer count: 0
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41400256
has comment: http://stackoverflow.com/comment/41388478
tagged with: hapi.js

http://stackoverflow.com/q/26499160
tagged with: node.js
has body: I'm using the validation service from https://gist.github.com/basco-johnkevin/8436644 and currently having some issues upon submission of my data. It seems like maybe the validation service doesn't like NaN values or I'm possibly missing something. Any ideas? My form: &lt;div class="container"&gt; &lt;form action="/standardplacement/create" method="POST" role="form"&gt; &lt;div class="row-fluid"&gt; &lt;h2 class="form-signin-heading"&gt;Create a &lt;em&gt;Standard Media&lt;/em&gt; placement&lt;/h2&gt; &lt;% if (req.session.flash &amp;&amp; req.session.flash.error) { %&gt; &lt;% var errors = req.flash('error') %&gt; &lt;div class="alert alert-danger"&gt; &lt;button type="button" class="close" aria-hidden="true" data-dismiss="alert"&gt;&amp;times;&lt;/button&gt; &lt;ul&gt; &lt;% Object.keys(errors).forEach(function(error) { %&gt; &lt;% Object.keys(errors[error]).forEach(function(error_message) { %&gt; &lt;% Object.keys(errors[error][error_message][0]).forEach(function(error_message_res) { %&gt; &lt;li&gt;&lt;%- errors[error][error_message][0][error_message_res] %&gt;&lt;/li&gt; &lt;% }); %&gt; &lt;% }); %&gt; &lt;% }); %&gt; &lt;/ul&gt; &lt;/div&gt; &lt;% var t_results = req.flash('temp_results'); %&gt; &lt;% if(t_results[0]){ %&gt; &lt;% t_results = t_results[0]; sails.log.info("Results Restored"); %&gt; &lt;% } %&gt; &lt;% } %&gt; &lt;/div&gt; &lt;div class="row-fluid"&gt; &lt;div class="form-group"&gt; &lt;label for="pName"&gt;Placement Name&lt;/label&gt; &lt;input type="text" name="name" id="pName" class="form-control" required="required" title="Name" placeholder="12/27 Homepage 300x250 Banner" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row-fluid"&gt; &lt;blockquote&gt; &lt;p class="lead"&gt;General Specifications&lt;/p&gt; &lt;/blockquote&gt; &lt;/div&gt; &lt;div class="row-fluid"&gt; &lt;div class="form-group row"&gt; &lt;div class="col-xs-4"&gt; &lt;label for="pWidth"&gt;Width&lt;/label&gt; &lt;div class="input-group"&gt; &lt;input type="integer" name="widt…
answer count: 2
upvote count: 1
tagged with: waterline
has answer: http://stackoverflow.com/a/26502422
tagged with: sails.js
has answer: http://stackoverflow.com/a/41135391
tagged with: javascript
type: UnansweredQuestion
has title: Invalid attributes sent to model. Validation issues
has comment: http://stackoverflow.com/comment/41633708
tagged with: validation
downvote count: 0
score: 1
favorite count: 0
type: Question

http://stackoverflow.com/comment/130693846
type: Comment
has text: Problem is that span catchs event and doesn't push it to the parent. You need pass event after span handle it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/73973656

http://stackoverflow.com/comment/41437421
type: Comment
type: QuestionComment
has text: why dont you just use FB.login instead of dealing with the access token on your own?
score: 0
comment on: http://stackoverflow.com/q/26392005

http://stackoverflow.com/a/49600471
answers question: http://stackoverflow.com/q/26493391
type: Answer
downvote count: 0
score: 1
has body: Clearly this is for my tables, but this is how I've created a static (I update it using cron once per week) sitemap.xml using sitemap. 'use strict'; var sm = require('sitemap') var fs = require('fs'); var photoModel = require('../../models/photo'); var db = require('../../models/db'); var config = require('../../config'); var hostname = config.siteUrl var queryParams = { active: 1, sortOrder: 'desc', sortBy: 'relevance', } var photoQuery = db.rawSQL([ 'SELECT img_id, tags', 'FROM images', 'WHERE active = 1' ]); function createSiteMap(myURLs) { var sitemap = sm.createSitemap({ hostname: hostname, cacheTime: 600000, //600 sec (10 min) cache purge period urls: myURLs }); fs.writeFileSync("public/sitemap.xml", sitemap.toString()); process.exit(); } function uniq(a) { var seen = {}; return a.filter(function(item) { return seen.hasOwnProperty(item) ? false : (seen[item] = true); }); } function getPhotos() { return new Promise(function(resolve, reject) { var siteMapArray = new Array() var tags = new Array() siteMapArray.push ({ url: '/' , changefreq: 'weekly', priority: 0.8, lastmodrealtime: true, lastmodfile: 'views/home.hbs' },) db.sequelize.query(photoQuery, { replacements: queryParams }).spread(function(makeSiteMap) { makeSiteMap.forEach(function(obj) { var siteLink = { url: 'photo/' + obj.img_id, changefreq: 'weekly', priority: 0.6, lastmodrealtime: true } siteMapArray.push(siteLink); obj.tags = obj.tags.split(',').map(function(e) { return e.trim().split(' ').join('+'); }); for (var tag in obj.tags) { tags.push(obj.tags[tag]) } }); resolve (siteMapArray); var uniqueTags = uniq(tags); for (var tag in uniqueTags) { var siteLink = { url: '/search/' + uniqueTags[tag], changefreq: 'weekly', priority: 0.8, lastmodrealtime: true } siteMapArray.push (siteLink); } createSiteMap(siteMapArray); }); }); }; getPhotos();
upvote count: 1

http://stackoverflow.com/q/26381696
has body: I have a question ... I have an implementation of a simple "Hello World" application on Java JAX-WS: I did not get access to the methods, specifically "getHelloWorldAsString". I tried jquery and plugin "jquery.soap". How can I call a method from JavaScript? Can you give me an example? Or what do I change in Java code? ITest.java File: package ru.ntcsiz.searcher.search.test; import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; //Service Endpoint Interface @SOAPBinding(style = Style.RPC) public interface ITest { @WebMethod String getHelloWorldAsString(String name); } TestClass.java: package ru.ntcsiz.searcher.search.test; import javax.jws.WebService; //Service Implementation @WebService(endpointInterface = "ru.ntcsiz.searcher.search.test.ITest") public class TestClass implements ITest { @Override public String getHelloWorldAsString(String name) { return "Hello World! It's works! " + name; } } TestClassPublisher.java: package ru.ntcsiz.searcher.search.test; import javax.xml.ws.Endpoint; public class TestClassPublisher { public static void main(String[] args) { Endpoint.publish("http://localhost:9999/ws/test", new TestClass()); } }
tagged with: java
tagged with: javascript
has answer: http://stackoverflow.com/a/26390999
accepted answer: http://stackoverflow.com/a/26390999
score: 0
has title: "Hello World" application on Java JAX-WS
answer count: 1
tagged with: jquery
type: AnsweredQuestion
tagged with: jax-ws
tagged with: web-services
type: Question

http://stackoverflow.com/q/26355850
answer count: 2
tagged with: ruby-on-rails-4
possible better answer: http://stackoverflow.com/a/26361292
has answer: http://stackoverflow.com/a/26361292
tagged with: ruby
has comment: http://stackoverflow.com/comment/41370678
has title: Use JS var in ruby line inside js file
type: AnsweredQuestion
has body: I'm trying to use js var inside ruby line (which all are inside a js.erb file): my_file.js.erb: var x = 3; var credit = "&lt;%= CreditsController.some_method(x) %&gt;"; I know how to replace text in js var, but don't know how to do it before running the ruby part &lt;%= %> Thanks!
has answer: http://stackoverflow.com/a/26356329
has comment: http://stackoverflow.com/comment/41370779
score: 0
accepted answer: http://stackoverflow.com/a/26356329
type: Question
tagged with: erb
tagged with: javascript

http://stackoverflow.com/a/26385323
has body: You are missing a ) after alert(password; function registerdb(email, password, username, gender, about_me, age) { alert(gender); alert(about_me); alert(password); }
answers question: http://stackoverflow.com/q/26382313
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41427355
accepted answer of: http://stackoverflow.com/q/26382313

http://stackoverflow.com/q/26435159
has answer: http://stackoverflow.com/a/26436471
tagged with: paypal
type: Question
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26435173
has title: Humble bundles donations system, how does it work?
has body: I am wondering how the humble bundles donation system works. https://www.humblebundle.com/ How do they know, at the end of the week, how much money was donated to whom? I'm thinking on how to recreate this in js+php, but I am struggling to figure out how to track transactions. Thank you in advance -Jard
accepted answer: http://stackoverflow.com/a/26436471
tagged with: php
tagged with: logging
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26435173

http://stackoverflow.com/comment/41506381
has text: @KevinB this would only populate upon login. not if the user were to navigate away from the home page, and then navigate back.
score: 0
comment on: http://stackoverflow.com/q/26430413
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26384177
has comment: http://stackoverflow.com/comment/41423136
answer count: 0
downvote count: 0
score: 1
has title: JQuery Feature Detection for support?
type: Question
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/41422901
tagged with: javascript
tagged with: html2canvas
tagged with: jquery
upvote count: 1
favorite count: 0
has body: I have am using html2canvas to enable screenshots of divs within my web application. It's working well enough in Chrome (including Android), Safari (including iOS) and FireFox. In IE 11, however the image won't save. Code looks like this: function displayModalWithImage(canvas, filename) { var modalcontainer = $('#snapshot'); var modalcontainer_body = modalcontainer.children().find('.snap_shot_container'); var modalcontainer_save = modalcontainer.children().find('.save_snapshot'); var image = new Image(); var data = canvas.toDataURL("image/png"); image.src = data; modalcontainer_save.attr('download', filename +".png"); modalcontainer_save.attr('href', data.replace(/^data[:]image\/png[;]/i, "data:application/octet-stream;")); $(modalcontainer_body).html(''); $(image).appendTo(modalcontainer_body); $(modalcontainer_save).on('click', function() { modalcontainer.modal('hide'); }); modalcontainer.modal(); } Browser behavior varies: Chrome: displays modal and then saves the file when "Save" is clicked. (acceptable) Firefox: displays modal and then displays a separate dialog when "Save" is clicked (acceptable) Safari: display modal and then loads image in a separate tab when "Save" is clicked (acceptable... maybe) IE 11: displays modal, but does nothing but hide the dialog when "Save" is clicked (unacceptable) The data.replace was suggested by another SO answer, but it did not appear to have any effect on the behavior of any of the browsers. Previously the href attribute was simply set to data. So, anyway, at this point replacing the modal dialog with a simple window.location = data is a viable alternative. But, since Chrome works well and Safari and FF work well enough, i'd like to simply do a feature detection that would window.location for IE but show the modal for the other browsers. But, I don't know what "feature" is missing in IE to check for. tl;dr is there simply a change or bug in my javascript that would enable IE to work (save the image encoded as data to a file…
type: UnansweredQuestion

http://stackoverflow.com/comment/41502639
comment on: http://stackoverflow.com/q/26428575
score: 0
type: QuestionComment
has text: Woah - what a messy question. Please reduce it to the minimum code required to reproduce the problem. http://stackoverflow.com/help/mcve
type: Comment

http://stackoverflow.com/comment/41398027
type: Comment
type: AnswerComment
has text: This is how I actually implemented this, but I gave the answer to dfsq since I got his (correct) answer first, but I like how this reads without the explict `sum` variable. Nicely done!
comment on: http://stackoverflow.com/a/26369578
score: 0

browserify
tags question: http://stackoverflow.com/q/26434214
tags question: http://stackoverflow.com/q/26466083
tags question: http://stackoverflow.com/q/26411902
tags question: http://stackoverflow.com/q/26428488
tags question: http://stackoverflow.com/q/26439519
tags question: http://stackoverflow.com/q/26379369
tags question: http://stackoverflow.com/q/26500550
tags question: http://stackoverflow.com/q/26499015
tag name: browserify
tags question: http://stackoverflow.com/q/26390506
tags question: http://stackoverflow.com/q/26502679
tags question: http://stackoverflow.com/q/26452359
type: Tag
tags question: http://stackoverflow.com/q/26363193
tags question: http://stackoverflow.com/q/26445828

http://stackoverflow.com/comment/41640228
type: QuestionComment
has text: Every key in a plain Javascript object *is* a string. The "object" at the top of your question is not valid Javascript. So, where those data come from?
score: 3
comment on: http://stackoverflow.com/q/26504538
type: Comment

http://stackoverflow.com/a/26377672
downvote count: 0
has comment: http://stackoverflow.com/comment/41410823
has body: You can make use of JavaScript's substr method. function addSpan($elems) { $elems.each(function() { var $elem = $(this), text = $elem.text(); if (text.length <= 25) return; var start = text.substr(0, 25), // "I have some content that " end = text.substr(25, text.length); // "is good to read" $elem.html(start + '' + end + ''); }); } addSpan($('.contentBox').find('p')); span { color: #f00; } I have some content that is good to read I have some content that is good to read and this is a much longer string!
has comment: http://stackoverflow.com/comment/41410890
type: Answer
answers question: http://stackoverflow.com/q/26377583
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41410986

http://stackoverflow.com/comment/41442716
has text: Good catch. I've been bitten by `splice` so many times that I didn't even consider this part.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26395407
type: Comment

http://stackoverflow.com/comment/41557992
has text: i stored the value of initialization of timer with 'localstorage'. It is showing well too on console. After refreshing the page the Localstorage value remains same, nut problem I am facing is timer is set at 00:00 . how to bind timer value with localstorage
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26453509
type: AnswerComment

http://stackoverflow.com/q/26414666
has comment: http://stackoverflow.com/comment/42661121
tagged with: c#
type: Question
upvote count: 2
tagged with: webkit
has title: Webkit won't produce a click
tagged with: javascript
tagged with: click
has body: I been up all night trying to invoke a click, I have read many posts on this site, webkits site, and google. When using just the plain webbrowser1 the previous code worked. That's right here: HtmlElementCollection elems = Web.Document.GetElementsByTagName("a"); foreach (HtmlElement elem in elems) { String value = elem.GetAttribute("value"); if (elem.InnerText == "Done!") { elem.InvokeMember("click"); } } But with webkit it does not, the code had to be switched to: WebKit.DOM.NodeList elems = Web.Document.GetElementsByTagName("a‌​"); foreach (WebKit.DOM.Element ele in elems) { String value = ele.GetAttribute("value"); if (ele.TextContent == "Done!") { //Need to find a way to invoke a click with webkit } } I wanna invoke a click for this, but everything I try comes up with an error stating: 'WebKit.DOM.NodeList' does not contain a definition for 'InvokeMember' and no extension method 'InvokeMember' accepting a first argument of type 'WebKit.DOM.NodeList' Could someone please help me with this issue, I don't wanna go back to using the default web browser, Java doesn't function correctly and every time the button is clicked it refreshes the page, sometimes causing the page not to load. With webkit everything on the page works flawless.
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 2
answer count: 0
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26488468
has comment: http://stackoverflow.com/comment/41611094
has comment: http://stackoverflow.com/comment/41610957
upvote count: 1
has comment: http://stackoverflow.com/comment/41611494
type: Question
has comment: http://stackoverflow.com/comment/41611471
linked to: http://stackoverflow.com/q/15273042
has comment: http://stackoverflow.com/comment/41612424
has comment: http://stackoverflow.com/comment/41611431
has body: I need to show few Iframes in my Angular App. for that , my HTML is like &lt;iframe ng-src="{{iframeObj.iUrl}}" frameborder="0"&gt;&lt;/iframe&gt; But when the iUrl is not allowed in Iframes that is when X-Frame-Options:SAMEORIGIN or DENY Then my IFrame does not come , and its natural that it will not come. But I want to show an alternative text when Iframe does not load correctly. Like Image tag has and alt attribute. I need some way to show alt Text when Iframe can not load. AngularJS and plain JavaScript solution is mostly desired. Thanks in advance.
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41611071
tagged with: angularjs
has title: Iframe Alt Text When Iframe load error for X-Frame-Options:SAMEORIGIN | DENY
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/6327128
has comment: http://stackoverflow.com/comment/41611217
tagged with: x-frame-options
has answer: http://stackoverflow.com/a/26489146
score: 1
tagged with: iframe

http://stackoverflow.com/comment/41484235
comment on: http://stackoverflow.com/q/26418547
type: QuestionComment
has text: @laggingreflex, that's funny, because I did try to create files like `"invalid*file?name"` and no error was thrown. Even `"invalid\\file"`.
type: Comment
score: 0

http://stackoverflow.com/a/26405174
accepted answer of: http://stackoverflow.com/q/26387969
type: Answer
answers question: http://stackoverflow.com/q/26387969
has body: Have you checked your logs? You may be falling afoul of resource limits (https://parse.com/docs/cloud_code_guide#functions-resource). If immediacy is not important, it may be worth looking into set up a background job that runs every few minutes and tackles undelivered messages. It may also be possible to combine the two approaches: having the afterSave function attempt to do an immediate delivery to Inboxes, while the background job picks up any NewMessages left over on a regular basis. Not the prettiest solution but at least you have a bit more reliability. (You'll have to think about race conditions though where the two may attempt deliveries on the same NewMessage.) Regarding your question about a better structure, if the two classes are identical (or close enough), is it possible to just have a Messages class? Initially the "to" field will be null but is assigned a random recipient on a beforeSave function. This may be faster and neater. EDIT: Adding a 3rd observation which was originally a comment: I saw that you are using a Query.first() in afterSave in order to find the NewMessage to take care of. Potentially, a new NewMessage could have snuck in between the time afterSave was called, and the Query was run. Why not get the ID of the saved NewMessage and use that in the Query, instead of first()? query.get(request.object.id,...); This ensures that the code in afterSave handles the NewMessage that it was invoked for, not the one that was most recently saved.
has comment: http://stackoverflow.com/comment/41478344
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41478198
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41466396
has comment: http://stackoverflow.com/comment/41478323
upvote count: 1

http://stackoverflow.com/a/26375464
has comment: http://stackoverflow.com/comment/41407008
score: 5
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26375319
type: Answer
answers question: http://stackoverflow.com/q/26375319
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/42714513
has body: Put second dropdown as hidden as default Please choose from above And inside on change of first dropdown, show it $(function() { $("#text-one").change(function() { $("#text-two").show(); $("#text-two").load("textdata/" + $(this).val() + ".txt"); }); }); Demo : http://jsfiddle.net/8hthxvf2/2/ Javscript fiddle- http://jsfiddle.net/RahulB007/Lnenuohd/
has comment: http://stackoverflow.com/comment/41406952
has comment: http://stackoverflow.com/comment/42744693
has comment: http://stackoverflow.com/comment/41407738
has comment: http://stackoverflow.com/comment/41407821
has comment: http://stackoverflow.com/comment/41407553
has comment: http://stackoverflow.com/comment/41410789

http://stackoverflow.com/q/26461951
type: Question
has body: I want to initialize a chart with Highcharts: how can I obtain the data('values') of the element that Highcharts use as the container of the chart? This is an example of the container &lt;div id="container" data-values="[...]"&gt; And this an example of the code, that doesn't work. $('#container').highcharts({ ... series: [{ type: 'pie', name: 'Votes', data: $(this).data('values') }] }); Thanks all
tagged with: highcharts
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26463650
type: UnansweredQuestion
has title: Get container element inside Highcharts

http://stackoverflow.com/comment/41613428
has text: Where do you pass `$_POST['logedIn']` to your PHP?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26489636

http://stackoverflow.com/q/26494951
accepted answer: http://stackoverflow.com/a/26495078
score: 0
answer count: 2
tagged with: php-5.3
has answer: http://stackoverflow.com/a/26495043
has title: Binding an event to an element in a view returned by ajax on success
possible better answer: http://stackoverflow.com/a/26495043
tagged with: javascript
has answer: http://stackoverflow.com/a/26495078
has body: I have a button that maes an AJAX request and fills a div with the view that is returned. Then I would like it to bind 1 click event to a button that is a DOM elements inside the view that is returned. This is my handler for the first AJAX call that gets a view back. // gets the next question or video $("#next").click(function(e){ e.preventDefault(); $.ajaxSetup({ headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') } }); var host = "http://" + window.location.hostname; $.ajax({ type: "POST", url : host + "/next", success : function(data){ console.log(data); $('#test-content').html(data); $("#submit-question").bind('submit', attempt(e)); } },"json"); }); This is the attempt() function that I want to attach to the event. This makes it so I can make another AJAX call from a form. Or at least I thought it would. function attempt(e){ e.preventDefault(); $.ajaxSetup({ headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') } }); // input data var question_id = $('input:hidden[name=question_id]').val(); var attempt = $("input[name=attempt]").val(); var dataString = 'question_id='+question_id+'&amp;attempt='+attempt; var host = "http://" + window.location.hostname; $.ajax({ type: "POST", url : host + "/attempt", data : dataString, success : function(data){ console.log(data); $('#show-answer').html(data); $('#next-button').show(); } },"json"); } So my problem is that, can't figure out why, but the attempt() function runs instantly after the first ajax call is made. And it never binds the event to the button. The ajax calls are made one after another with no delay. Also not sure if I could just put e in the attempt() call like I do.
type: AnsweredQuestion
tagged with: laravel-4
tagged with: jquery
tagged with: ajax
type: Question

http://stackoverflow.com/comment/41657341
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26513621
has text: @pmrotule thanks for your comment, I'll keep it on mind

http://stackoverflow.com/q/26417841
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26418133
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26418133
upvote count: 1
answer count: 1
has body: See below link :http://liveweave.com/d8F0Qw I have two droppable portion with different id i want to drop images in different section. Problem i that it works fine for first droppable but not for second one. How can i detect droppable area and place image there ? Html Code: <!--div id="canvas-drop-area"></div--> javascript code: (function () { var canvas = new fabric.Canvas('canvas'); var canvas_el = document.getElementById('canvas'); var canvas1 = new fabric.Canvas('canvas1'); $(document).ready(function () { /* Define drag and drop zones */ var $drop = $('#canvas-drop-area'), $drop1 = $('#canvas-drop-area1'), $gallery = $('td > #image-list li'), $draggedImage=null; /* Define the draggable properties */ $gallery.draggable({ helper: 'clone', start: function (e) { $draggedImage=event.target; $drop.css({ 'display': 'block' }) }, stop: function () { $(this).find('img').css({ /* 'opacity': 0.4 */ }); $drop.css({ 'display': 'none' }); $draggedImage=null; }, revert: true }); /* Define the events for droppable properties */ $drop.droppable({ over: function (event, ui) { $(this).addClass('active'); }, drop: function (event, ui) { var image =$draggedImage&& $draggedImage.src; console.log($draggedImage.alt); img_to_canvas(image,$draggedImage.alt,1); }, out: function (event, ui) { $(this).removeClass('active'); }, deactivate: function (event, ui) { $(this).removeClass('active'); } }); $drop1.droppable({ over: function (event, ui) { $(this).addClass('active'); }, drop: function (event, ui) { var image =$draggedImage&& $draggedImage.src; console.log($draggedImage.alt); img_to_canvas(image,$draggedImage.alt,2); }, out: function (event, ui) { $(this).removeClass('active'); }, deactivate: function (event, ui) { $(this).removeClass('active'); } }); }); var img_to_canvas = function(image,sendfront,checkcanvas) { var img = new Image(); img.src = image; fabric.Image.fromURL(img.src, function (source) { img = source.set({ left: 0, top: 0, angle: 0, id:sendfront }); if(checkcanvas=='1'){ …
tagged with: javascript
has title: Two droppable area first one works only

http://stackoverflow.com/q/26387061
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/41428314
upvote count: 1
tagged with: local-storage
answer count: 1
tagged with: http://stackoverflow.com/tag/json
has body: I'm trying to save a series of variables in a two-step way using AngularJS and LocalStorage. In the first step, the data of several variables will be saved in the variable recordlist but not pushed into LocalStorage. In the second step, the user is supposed to trigger another function and to record the data of one last variable and then push all into LocalStorage. So far the first step works OK, the data is saved in the variable (not in LocalStorage) and displayed in the view, and in the second step the recordlist is pushed into the JSON in LocalStorage, but a second one will be created to store the last variable, instead of updating the first one. So long story short, my problem is that until now I've only been able to record the data in the JSON separately, like so: [ { "date":"2014 10 15", "time":"18.52", "car":"791", "driver":"Eric", "from":"Log", "destination":"Airport", "pax":"2" }, { "arrival":"18.52" } ] What I really need is for the second step to update the first recordlist, not to create a new one, like this: [ { "date":"2014 10 15", "time":"18.52", "car":"791", "driver":"Eric", "from":"Log", "destination":"Airport", "pax":"2", "arrival":"18.52" } ] This is my code: $scope.recordlist = extractRecordJSONFromLocalStorage(); $scope.addRecord = function () { $scope.recordlist.push( { date: $scope.dateJson, time: $scope.time, car: $scope.carList.code, driver: $scope.driverList.name, from: $scope.locationList.place, destination: $scope.locationList2.place, pax: $scope.paxList } ); $scope.custom = $scope.custom === false ? true: false; $scope.carList = 0; $scope.driverList = 0; $scope.locationList = 0; $scope.locationList2 = 0; }; $scope.insertRecord = function () { $scope.arrivaltime = moment().format("HH.mm"); $scope.recordlist.push( { arrival: $scope.arrivaltime } ); jsonToRecordLocalStorage($scope.recordlist); } What am I missing?
has comment: http://stackoverflow.com/comment/41428349
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26387326
has title: Recording data with AngularJS in two steps
score: 1
favorite count: 0

http://stackoverflow.com/a/26447331
has comment: http://stackoverflow.com/comment/41537736
has body: Something like this? function checkcomplex(whichcontrol) { // You can make a trim if you like whichcontrol.value = whichcontrol.value.trim(); // Check length if(whichcontrol.value.length == 0) return true; // Check if value do not match pattern // Must start with "02" + one digit + "-" + 7 digits and end of string if(!whichcontrol.value.match(/^02\d-\d\d\d\d\d\d\d$/)) return errorinfield(whichcontrol,"Must be of the form 02X-XXXXXXX!"); // It is valid return true; }
type: Answer
has comment: http://stackoverflow.com/comment/41537770
answers question: http://stackoverflow.com/q/26447286
score: 0

http://stackoverflow.com/comment/41481246
has text: I don't think it would make a noticeable difference either way unless the events array was very big. Besides, premature optimization and all that...
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26417065
type: Comment

http://stackoverflow.com/comment/41644027
type: Comment
type: QuestionComment
has text: @somethinghere yeah that's my bad, anyway i updated the question.
score: 0
comment on: http://stackoverflow.com/q/26504602

http://stackoverflow.com/comment/41472073
score: 0
comment on: http://stackoverflow.com/a/26411092
type: Comment
type: AnswerComment
has text: Hmm, I am not sure if this will work for WebSockets, but with regular sockets, I use Poco's SocketReactor class and define a handler. When the connection closes, it triggers a termination of the class where I can just put all my cleanup in the deconstructor. Since SocketReactor spawns a new thread automatically, everything else can run as it needs to without being blocked by socket receives. Worst case scenario you could spawn a thread yourself and just block that thread with receiveFrame()

http://stackoverflow.com/a/26432428
score: 1
accepted answer of: http://stackoverflow.com/q/26431845
has body: You can add a change event handler to the radio button, add a breakpoint inside there, when it gets hit look at the stack trace. Also, try doing a Ctrl-Shift-F in the Sources tab inside chrome dev tools and search for relevant hooks, such as the 'radio' and 'form-control' classes.
answers question: http://stackoverflow.com/q/26431845
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41422990
type: QuestionComment
comment on: http://stackoverflow.com/q/26383864
has text: There is no error in the log console : INFO 2014-10-15 15:52:44,444 module.py:640] default: "GET / HTTP/1.1" 200 6659 INFO 2014-10-15 15:52:44,538 module.py:640] default: "GET /stylesheets/main.css HTTP/1.1" 304 - INFO 2014-10-15 15:52:44,546 module.py:640] default: "GET /js/jquery.chained.js HTTP/1.1" 404 154 And it doesn't work nor locally neither remotely :(
score: 0
type: Comment

http://stackoverflow.com/comment/41530468
type: Comment
comment on: http://stackoverflow.com/q/26443825
has text: @SteveRobbins what do you suggest? Will firebug print me those data?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41514612
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26434475
type: Comment
has text: Added an image in to visually describe my problem.

http://stackoverflow.com/comment/41525892
score: 0
type: AnswerComment
has text: @hakre i wish had that comment before hours of searching , anywa i know the fundamentals of my OS very well , it is just i havent noticed the output , thought the php would generate a new file.
type: Comment
comment on: http://stackoverflow.com/a/26437346

http://stackoverflow.com/a/26402678
has comment: http://stackoverflow.com/comment/41476814
score: 0
has body: You can do that job in following manner, var options = { ... $AutoPlay: false, ... }; var jssor_slider1 = new $JssorSlider$("slider1_container", options); function OptionSelectedHandler(optionValue) { var slideIndex = 2; if(optionValue == "SDINERO"){ slideIndex = 0; } jssor_slider1.$PlayTo(slideIndex); //optionally you can use following line to switch the slider to specified slide directly. //jssor_slider1.$GoTo(index); } //your code here to //do something to capture the 'select' event and then call OptionSelectedHandler
answers question: http://stackoverflow.com/q/26398752
type: Answer
has comment: http://stackoverflow.com/comment/41462345

http://stackoverflow.com/q/26458125
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/78577045
answer count: 5
has answer: http://stackoverflow.com/a/26458196
has title: Javascript - How to display only the value of a cookie?
type: AnsweredQuestion
has body: I have searched several places trying to find out how to do display only the value of a cookie rather than the whole key but they all seemed needlessly complex for what I'm doing. I've got a single cookie with only one key, userName = something, and I can't figure out how to display only the "something" rather than userName = something. function userCookie(form) { if(form.User_Name.value == "") { alert("Cannot accept a blank user name, please enter a valid name"); return false; } else { document.cookie="userName=" + form.User_Name.value; alert(document.cookie); return false; } } function newWindow() { var userWindow = window.open("","MyUserName","height=300,width=300"); userWindow.document.open(); userWindow.document.write(" Welcome Back "); userWindow.document.write(document.cookie); userWindow.document.close(); }
tagged with: cookies
has answer: http://stackoverflow.com/a/43987357
type: Question
has answer: http://stackoverflow.com/a/26458239
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26458196
score: 0
has answer: http://stackoverflow.com/a/26458227
accepted answer: http://stackoverflow.com/a/26458227

http://stackoverflow.com/comment/41379302
type: QuestionComment
has text: http://stackoverflow.com/questions/10873942/document-write-clears-page Related
comment on: http://stackoverflow.com/q/26360663
score: 0
type: Comment

visual-editor
tags question: http://stackoverflow.com/q/26440277
tag name: visual-editor
type: Tag

http://stackoverflow.com/comment/41859634
type: QuestionComment
comment on: http://stackoverflow.com/q/26459182
score: 0
has text: @User089247 That's why I posted the login credentials, just in case you can find something that I have overlooked. Any luck with that?
type: Comment

http://stackoverflow.com/a/26479382
has body: getElementsByClassName is live selector, so when you change something that not matching this selector, it will remove element from scope. So at first iteration it has 3 elements, but when you change class, it remove one element and you leave with 2 elements, so on next iteration it will take i element which is i=1 so it will take second element from top. That's why you get always 1 missing. You may use newtest[0].className="bob"; to loop through, but when you will reach last element, it will be single element, not array any more, so you need to use newtest.className="bob"; for last one
score: 1
answers question: http://stackoverflow.com/q/26479289
upvote count: 1
has comment: http://stackoverflow.com/comment/41595249
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41595215

http://stackoverflow.com/q/26425115
favorite count: 0
has comment: http://stackoverflow.com/comment/41495277
upvote count: 1
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/41495320
type: AnsweredQuestion
has title: Convert Mysql date with JavaScript to euro format
has body: I am trying to convert a MySQL date to euro date with JavaScript. but no success. My code is: var t = "2014-03-29 13:12:01".split(/[- :]/); // Apply each element to the Date function var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]); alert(d); I get a result of something like this: Sat Mar 29 2014 23:24:28 Is there a way to set it to something like 31.12.2014 with JavaScript? I can't use a server side language such as PHP.
accepted answer: http://stackoverflow.com/a/26425221
tagged with: mysql
has comment: http://stackoverflow.com/comment/41495207
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26425526
tagged with: javascript
has answer: http://stackoverflow.com/a/26425526
score: 0
has answer: http://stackoverflow.com/a/26425221

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/26408145
tags question: http://stackoverflow.com/q/26443450

http://stackoverflow.com/a/26491328
has body: If browser support (IE 10 and higher and recent browser), you could use the URL object. You simply have to do that : var test = new URL('http://192.168.6.1/Images/regrgrger54654654.png') console.log(test.origin) If you want to use a regular expression, that would do it for this case : var url = 'http://192.168.6.1/Images/regrgrger54654654.png' console.log(url.match(/https?:\/{2}[^\/]*/)[0]); http://jsfiddle.net/8cd67Lzs/
score: 0
answers question: http://stackoverflow.com/q/26491140
type: Answer

http://stackoverflow.com/comment/41406810
type: AnswerComment
has text: Both are same as after also returns same cell reference. If I execute (above code that I mentioned) as stand alone then it is working fine. But as web page it is not working.
type: Comment
comment on: http://stackoverflow.com/a/26375125
score: 0

http://stackoverflow.com/q/26410283
type: AnsweredQuestion
score: 2
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/41500085
has comment: http://stackoverflow.com/comment/41468995
type: Question
has comment: http://stackoverflow.com/comment/41479850
has answer: http://stackoverflow.com/a/26411119
has comment: http://stackoverflow.com/comment/41468958
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41495580
tagged with: javascript
has comment: http://stackoverflow.com/comment/41469021
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26411119
has title: jQuery resizable: don't allow contained div to be out
has body: jQuery resizable example shows here how a div can be resized within the limits of a container. I need to achieve the opposite effect: the resizable div is the container, and when it's resized it cannot leave the contained div out of bounds, either fully or partially. In this jsfiddle you can resize the container and leave the contained div outside. My objective is to stop the resize when container's border touches the contained div. This is the HTML: &lt;div id="out-div"&gt; &lt;div id="in-div"&gt;&lt;/div&gt; &lt;/div&gt; And this is the javascript: $("#out-div").resizable(); Any ideas?
tagged with: css
has comment: http://stackoverflow.com/comment/41500145
favorite count: 0
possible better answer: http://stackoverflow.com/a/26410948
upvote count: 2
has answer: http://stackoverflow.com/a/26410948

http://stackoverflow.com/q/26472471
favorite count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/60907035
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41585665
linked to: http://stackoverflow.com/q/13465221
type: Question
has comment: http://stackoverflow.com/comment/41582404
score: -2
has body: I want to change the opening direction of my bootstrap reveal modal. I Followed the code as discussed in this LINK but my modal is not opening, I'm using angularjs. Can anyone help me with the code? my button Right bootstrap Bootstrap v3.2.0 my CSS and JS as as mentioned in link. How can I use it with angular,its not working in my case.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41582775
answer count: 2
has title: How can I change the direction of the bootstrap modal opening?
upvote count: 0
has answer: http://stackoverflow.com/a/26474146

http://stackoverflow.com/comment/41577431
score: 0
type: Comment
type: AnswerComment
has text: could you please let me know how to set selected value of this dropdown?
comment on: http://stackoverflow.com/a/26450439

http://stackoverflow.com/comment/41515631
comment on: http://stackoverflow.com/q/26435044
score: 0
type: Comment
type: QuestionComment
has text: Whenever you mix Angular with jQuery, expect to run into problems. But specifically, in your case, it doesn't look like the `result.data` has any Angular expressions - so it should have worked. Can you check the rendered page (just before you click the button) and see if you have a single ` `

http://stackoverflow.com/a/26488686
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26488636
has comment: http://stackoverflow.com/comment/41635708
answers question: http://stackoverflow.com/q/26488636
has body: Your syntax is incorrect. Try this instead: ng-repeat="draw in draws| filter:{perform: true, automatic: false}" If you need to filter by property values you should use object notation.
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41635455

http://stackoverflow.com/q/26401092
score: 0
tagged with: kendo-grid
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui
has answer: http://stackoverflow.com/a/26401495
has title: Kendo Grid, how to translate column menu?
tagged with: translation
accepted answer: http://stackoverflow.com/a/26401495
type: AnsweredQuestion
has body: I would like to translate column menu in Kendo Data grid (see image below). Im able to translate messages and operators like this: filterable: { mode: "row", messages: { info: $translate.instant('SELECT'), and: $translate.instant('AND'), or: $translate.instant('OR') }, operators: { // redefine the string operators string: { contains: $translate.instant('CONTAINS'), doesnotcontain: $translate.instant('NOT_CONTAINS'), startswith: $translate.instant('STARTS_WITH'), endswith: $translate.instant('ENDS_WITH'), eq: $translate.instant('IS_EQUAL_TO'), neq: $translate.instant('NOT_EQUAL_TO') } } }, How can I translate menu items? Many thanks for any advice.
type: Question

http://stackoverflow.com/q/26408631
tagged with: arrays
answer count: 1
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/17500312
type: Question
has body: I am using mongodb and am building an application with two collections: users and items. I'd like for users to be able to save items that they like and go to their saved items page where the items would be displayed in the reverse order that they were saved (last saved appears first). At the moment, I am adding every saved item's id along with the savedDate to the user's profile savedItems array like so: user profile { savedItems: [{id: "", savedDate: ""}, {id: "", savedDate: ""}, etc...] } Whenever I need to retrieve those items, I query the items collection for objects with ids $in this array. Like this: var items = Items.find({_id: {$in: _.pluck(user.savedItems, 'id')}}); The problem here is that I can't order those items according to the addedDate. So is it possible to map the addedDate onto every object of the retrieved items? (Something like: if retrievedItems.id == savedItems.id, then push the addedDate there.) Which would result in an items array like this: [ {id:"", itemName:"", price: "", [...], savedDate: ""}, {id:"", itemName:"", price: "", [...], savedDate: ""}, [...] ] Thank you.
has answer: http://stackoverflow.com/a/26409093
tagged with: javascript
has title: Joining an array on another array's value
score: 0
tagged with: mongodb

http://stackoverflow.com/comment/41429885
score: 0
type: Comment
type: QuestionComment
has text: I think that your EDIT 2 is not really true, I think that you should set your Accept header as I described in the response, does this fiddle solve your problem http://jsfiddle.net/8k8souqj/13/
comment on: http://stackoverflow.com/q/26383311

http://stackoverflow.com/a/26382444
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26381247
has body: I've used this internal private property when I had no identifiers. I think, it's pretty usable, but not recommended.
downvote count: 0

http://stackoverflow.com/q/26384341
has body: here is my fiddle Pretty much working perfectly apart from sometimes mouseenter, mouseleave, click function (.item) doesn't always work - and needs to be clicked for it to start working again? why is this - here is my code - $(document).ready(function () { $('.timelineTile').click(function (evt) { evt.stopPropagation(); $('.timelineTile').not(this).removeClass('clicked').find('.pull_down_content').height(0); $(this).toggleClass('clicked'); if(!$('.timelineTile').hasClass("clicked")){ $(this).children('.pull_down_content').height(0); } }); }); $(document).click(function () { $('.timelineTile').removeClass('clicked'); $('.pull_down_content').height(0); $('.inner').stop().css({'display': 'none'}, 300); }); $(document).ready(function () { $('.timelineTile').children('.item').on('mouseenter mouseleave click', function(e) { e.stopPropagation(); if ($(this).parent('.timelineTile').hasClass("clicked")) { if (!$(this).data('clicked')) { var Height = e.type==='mouseenter' ? '90px' : e.type==='click' ? '250px' : '0px'; $(this).siblings('.pull_down_content').stop().animate({'height': Height}, 300); $(this).siblings('.pull_down_content').children('.inner').css({'display': 'block'}, 300); if (e.type==='click') $(this).data('clicked', true); }else{ if (e.type==='click') { $(this).data('clicked', false); $(this).siblings('.pull_down_content').stop().animate({'height': '0px'}, 300); $(this).siblings('.pull_down_content').children('.inner').css({'display': 'none'}, 300); } } } }); }); I'm not sure if its something to do with this? if(!$('.timelineTile').hasClass("clicked")){ $(this).children('.pull_down_content').height(0); }
favorite count: 0
has title: why does the hover and click not always work?
tagged with: mouseenter
possible better answer: http://stackoverflow.com/a/26384648
accepted answer: http://stackoverflow.com/a/26387315
type: AnsweredQuestion
tagged with: onclick
score: 1
has answer: http://stackoverflow.com/a/26387315
tagged with: mouseleave
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26384648
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41420566
type: QuestionComment
type: Comment
has text: Also, `onclick='deleteDocument(this,\'" + file.name + "\')'`. Well, some people say I have OCD.
comment on: http://stackoverflow.com/q/26382706
score: 0

http://stackoverflow.com/q/26362622
answer count: 1
has answer: http://stackoverflow.com/a/26403426
type: UnansweredQuestion
has body: I have a product class with a price property: [Range(0.01, double.MaxValue, ErrorMessage = "Please enter a positive price")] public decimal Price { get; set; } In the root webconfig I have this element: &lt;globalization culture="nl-NL" uiCulture="nl-NL" /&gt; I use a simple @Html.EditorForModel() method to generate html for me. Short, if the price of a product is 7 euro and 95 cents the rendered html will display 7,95 and not 7.95. (Note the difference between the dot(.) and the comma(,)) I have an edit controller responsible for saving any product updates to the (ms) db. Using only server side validation and no client side validation, if I change the price from 7,95 to 7,96 everything is saved perfectly. If I change the price from 7,95 to 7.96(note to dot!) the new price is €796,00. However, this is fixable by not letting a dot(.) being entered in the text field of the price property. But now the trouble starts. When I enable client-side validation along side with server-side validation and try to change the value of 7,95 to 7,96 I get an client-side error message stating: "The field Price must be a number." It only accepts numbers with a dot(.) (ie:7.96) and no numbers with a comma(,) (ie:7,96) There are probably multiple solutions to this question, but the solution I am looking for is the one where I can somehow configure the "client-side validator" to accept numbers with a comma (and if possible at the same time can configure to reject numbers with a dot. That way I won't have to use reg-expressions on every property which is a double type)
has title: Clien-side validation and server-side validation not working together (on double's)
has comment: http://stackoverflow.com/comment/41455158
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41455226
tagged with: validation

http://stackoverflow.com/comment/41449188
has text: what about writing progress to database instead of seesion and retrieve results through javascript?
score: 0
comment on: http://stackoverflow.com/q/26399236
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26433722
score: 1
upvote count: 1
has body: You need to capture the enter key press, preferably using jQuery delegates on the form. Just target your delegate at the form and looking at input elements, or body looking at form, I suppose. Essentially it's saying "look at this top element, trigger X action on the inner element". Your parent would be form, inner input, action is keydown or keyup See this : jQuery delegate method not working for keydown and keypress Then in the function test for what keypress was hit. If enter, submit. If not, return false. PS: when I'm not on mobile, I can do a code snippet for you.
answers question: http://stackoverflow.com/q/26433677
downvote count: 0
type: Answer

http://stackoverflow.com/q/26374609
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26403448
has title: Linking between pages and loading JavaScript using jQuery Mobile
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/22859314
has comment: http://stackoverflow.com/comment/41455813
score: 0
has comment: http://stackoverflow.com/comment/41411636
tagged with: mobile
answer count: 1
tagged with: jquery-mobile
tagged with: jquery
has body: I'm working on my first jQuery Mobile site, which is a (prototype for) a Location Based Game in Brisbane, Australia: www.jsjensen.dk/soleil/ My question is based on viewing from a mobile device, but a desktop device have very similar problems. I have tested with Chrome and Safari on iPhone, iPad, and Mac. Same problem everywhere. I think it's related to how jQuery Mobile loads and displays pages, but I'm not using multiple pages in one HTML document, but have multiple HTML document. If you go to the website above and then click "QUESTS" in the menu, followed by "Stairway to Knowledge" you will end on /soleil/quest01.html (desktop) and /soleil/#/soleil/quest01.html. That "#/soleil" really confuses me! In this first try the JavaScript for handling answers in the text input is not loaded. That means nothing happens when you press "Unlock". Now, if you reload on desktop or edit the address on iOS to /soleil/quest01.html (which is the actual and real file) it will reload the page with the right JavaScript loaded and initialized. Now I'm able to go back (pressing "QUESTS" in the menu) and then go to another page (e.g. "Citadel of Fun") with the same problem: the JavaScript not loading. If I go back to the other one ("Stairway to Knowledge") the JavaScript is, however, still loaded and working just fine. So what happens here? I'm pretty sure my linking/coding is correct, but it's just a basic understanding of jQuery Mobile that I'm missing. Can I change something to make this work? It could really be awesome!

http://stackoverflow.com/comment/41508570
type: Comment
type: QuestionComment
has text: The output is kind of like a "Cell map". The table 1 shows a shape of some sort that each part of the shape is assigned a group. See the fiddle example in the question above. Each would be assigned a "group number" so that every would have a number assigned. Does that make sense?
comment on: http://stackoverflow.com/q/26427541
score: 0

http://stackoverflow.com/comment/41392278
has text: What do you mean by "associating" there?
type: AnswerComment
comment on: http://stackoverflow.com/a/26367226
score: 0
type: Comment

http://stackoverflow.com/comment/41528875
score: 0
type: Comment
has text: @esswilly Unfortunately not, because `getElementsByTagName("a")` returns an list of nodes, and `addEventListener` doesn't work on lists (unfortunately, it would be cool if it `NodeList` had an `addEventListener` method). I'll update my answer with what you could use.
comment on: http://stackoverflow.com/a/26442786
type: AnswerComment

http://stackoverflow.com/comment/41573370
comment on: http://stackoverflow.com/q/26467603
type: Comment
type: QuestionComment
has text: You're passing a button to the function, not a form, hence `form.txtLoginId` is `undefined` within `checkField()`. That breaks the code, and `false` is never returned. You haven't opened the console to see error messages?
score: 0

http://stackoverflow.com/q/26444758
has answer: http://stackoverflow.com/a/26445003
has comment: http://stackoverflow.com/comment/41532267
downvote count: 0
accepted answer: http://stackoverflow.com/a/26445093
favorite count: 0
has comment: http://stackoverflow.com/comment/41532516
has title: Print table data on click not working
type: AnsweredQuestion
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41532576
has comment: http://stackoverflow.com/comment/41532415
type: Question
has answer: http://stackoverflow.com/a/26445093
tagged with: javascript
has body: I'm trying to get a table values and I saw a script here in StackOverflow, the problem is that it's not working here. I don't why, I think maybe I should replace this "event" parameter with something. What's wrong? The clico() function does works, but the myFun() doesn't. row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 EDIT: That "invisible special character" thing solved the scripting problem, but now I get a "undefined" print instead of the table values... that is only with firefox. Internet explorer and chrome works perfectly! is it a problem with firefox or am I missing something in the settings here?
possible better answer: http://stackoverflow.com/a/26445003
answer count: 2

http://stackoverflow.com/comment/41651542
has text: Ah changing data to form.serialize() worked perfect. Why is that? Did return false also have some impact? Please post an answer @mccannf and I'll mark it as accepted.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26509612

http://stackoverflow.com/a/26472727
upvote count: 1
has comment: http://stackoverflow.com/comment/41583105
has body: Use the onSubmit event. The do a string replacement: tinyMCE.init({ ... setup : function(ed) { ed.onSubmit.add(function(ed, e) { //Do your replacement here! }); } });
answers question: http://stackoverflow.com/q/26471301
downvote count: 0
has comment: http://stackoverflow.com/comment/41596051
has comment: http://stackoverflow.com/comment/41700374
type: Answer
score: 1

http://stackoverflow.com/a/26491683
score: 0
has comment: http://stackoverflow.com/comment/41621217
has comment: http://stackoverflow.com/comment/41622752
has body: You can make the image rotate around its own centerpoint by setting its offsets to 1/2 its size: var img = new Kinetic.Image({ x: padding, y: padding, image: imageObj, width: imageObj.width, height: imageObj.height, offset:{x:imageObj.width/2,y:imageObj.height/2} });
type: Answer
answers question: http://stackoverflow.com/q/26489454

http://stackoverflow.com/comment/41607699
has text: @SherinMathew it is my understanding that this can be unlimited. otakumike, in all honestly, if you are on a online store viewing a product, most of the time users don't select one option out of a long drop down selection but instead there would be a different select box for each type. For a t-shirt, first select size. Next select which color you want granted it is still in stock for that size. Next select custom graphics/etc.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26485672
score: 0

http://stackoverflow.com/q/26382032
tagged with: php
has comment: http://stackoverflow.com/comment/41418830
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41418686
tagged with: flot
tagged with: javascript
tagged with: jquery
score: 0
has title: Flot Bar chart with PHP Variables
has body: How to display the values on flot bar chart using my PHP variables. for example: Instead of saying var data = [ [0, 11], //London, UK [1, 15], //New York, USA [2, 25], //New Delhi, India [3, 24], //Taipei, Taiwan [4, 13], //Beijing, China [5, 18] //Sydney, AU ]; I'd like to use my php variables something like: var data = [ [0, &lt;?php echo '['.($London).']'?&gt;], //London [1, &lt;?php echo '['.($NewYork).']'?&gt;], //New York [2, &lt;?php echo '['.($NewDelhi,).']'?&gt;], //New Delhi, [3, &lt;?php echo '['.($Taipei).']'?&gt;], //Taipei [4, &lt;?php echo '['.($Beijing).']'?&gt;] //Beijing ]; Wondering how to echo my variables inside the var data. Any idea I would appreciate it. Thank you.
has answer: http://stackoverflow.com/a/26382680
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26382163

http://stackoverflow.com/q/26439658
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26439906
has comment: http://stackoverflow.com/comment/41523224
has answer: http://stackoverflow.com/a/26440120
score: 0
accepted answer: http://stackoverflow.com/a/26439906
has title: Javascript - RegExp - Replace character not surrounded by letters
possible better answer: http://stackoverflow.com/a/26439714
answer count: 5
has answer: http://stackoverflow.com/a/26439729
has answer: http://stackoverflow.com/a/26439714
tagged with: regex
has answer: http://stackoverflow.com/a/26439805
has comment: http://stackoverflow.com/comment/41523089
has comment: http://stackoverflow.com/comment/41523274
type: AnsweredQuestion
has body: I have a regex like this: str.replace(/([^a-zA-Z])e([^a-zA-Z])/g, "$12.718281828459045$2") The regex isn't doing what I want, and I don't know why. So what I want to to do, is to replace all "e"'s in a string that's not connected to any A-z letter with "2.718281828459045", what's wrong in my regex? "2e" -&gt; "2e", should be: "22.718281828459045" "2e2" -&gt; "22.7182818284590452", working "2*e*e*2" -&gt; "2*2.718281828459045*e*2", should be "2*2.718281828459045*2.718281828459045*2"
has comment: http://stackoverflow.com/comment/41523202

http://stackoverflow.com/q/26356193
answer count: 3
has title: using jquery to create videojs
favorite count: 0
has body: I am trying to use Jquery to create multiple videojs elements and I can't get the videos to play. I have 12 live streams that I am running on a page using videojs and I have them all working when I hard code in each individual stream on the page like so cam1@g20 I am now trying to add each video in by creating the divs and the video with js and jquery. HTML JS $( document ).ready(function() { var streams = [ "cam1", "cam2", "cam1", "cam2", "cam1", "cam2", "cam1", "cam2", "cam1", "cam2", "cam1", "cam2" ]; var videoStreams = function(){ for (var i = 0; i < streams.length; i++) { var stream = streams[i]; $('.cam_streams').append( ' ' + stream + ' '); }; }; videoStreams(); when I run the page it is creating all 12 "box" divs and each one has the correct video in it the same way as when I am hard coding it into the html file but it is not playing anything and I have no errors in the console. Any help on a better way to also do the jquery would also be much appreciated, I am still very new to it. Thanks
tagged with: video.js
has answer: http://stackoverflow.com/a/26396262
has answer: http://stackoverflow.com/a/26356913
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26387033
score: 1
possible better answer: http://stackoverflow.com/a/26387033
accepted answer: http://stackoverflow.com/a/26396262
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: html5-video

http://stackoverflow.com/a/26448860
has body: Did you have an example maybe on CodePen to check what the issue is. It seems the last }); end braces was not needed, was this because it was within a jQuery $(document).ready(); method. Otherwise this would be the correct code: Some good examples on the dynatree example page which I'm sure you've seen. $("#tree").dynatree({ checkbox: true, selectMode: 2, initAjax: { url: "/getTree/", dataType: "json", data: {} }, onSelect: function(node) { }, onActivate: function (node) { }, persist: true, noLink: false, fx: { height: "toggle", duration: 200 }, onPostInit: function (isReloading, isError) { if (getStringOfSelectedTreeNodes() != '') { } } });
score: 0
answers question: http://stackoverflow.com/q/26448785
type: Answer

session-timeout
type: Tag
tags question: http://stackoverflow.com/q/26465033
tag name: session-timeout

http://stackoverflow.com/a/26506521
has comment: http://stackoverflow.com/comment/41643830
answers question: http://stackoverflow.com/q/26506456
has comment: http://stackoverflow.com/comment/41644095
downvote count: 0
has body: You're trying to fish values out of the DOM incorrectly. Use document.getElementById to locate the element in the DOM, and take its value for the value you require. function myFunction() { var textAreaValue = document.getElementById("myTextarea").value; if (textAreaValue == "less") { console.log("&lt;"); } }
has comment: http://stackoverflow.com/comment/41644046
has comment: http://stackoverflow.com/comment/41643990
has comment: http://stackoverflow.com/comment/41644301
type: Answer
has comment: http://stackoverflow.com/comment/41643898
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41644042

http://stackoverflow.com/comment/50608265
type: AnswerComment
comment on: http://stackoverflow.com/a/26708374
type: Comment
has text: Would be thankful if you could show the `VarianceChartModel` and `datasets` classes' declaration
score: 0

http://stackoverflow.com/a/26392261
score: 1
has body: In your $('#list').click(function ()) function you are running an infinite for bucle, it's because you use the same i counter for the two for bucles so you javascript will run forerver and crash the browser
has comment: http://stackoverflow.com/comment/41437518
answers question: http://stackoverflow.com/q/26392052
accepted answer of: http://stackoverflow.com/q/26392052
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41577701
has text: You definitely went above and beyond for this response and I appreciate it because their are some core aspects of Ember that I have not yet grasped. So would `property('someChangingPropertyElseWhere')` be where I create the logic to have 'someFunction' trigger every time the page is triggered?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26434122
type: Comment

http://stackoverflow.com/comment/41638633
type: AnswerComment
comment on: http://stackoverflow.com/a/26503517
has text: @mplungjan very true :)
score: 0
type: Comment

http://stackoverflow.com/comment/41597425
score: 2
has text: screen readers see the same page visual users see.
comment on: http://stackoverflow.com/q/26479367
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26400050
has answer: http://stackoverflow.com/a/26400117
downvote count: 1
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/26400117
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How to create JSON or Array of Objects From Three JS Arrays
score: -1
has body: How to load into/generate a JSON object or an Array of Objects like below var players = [ {"name":"John", "startPoint":"3", "maxPoint":"80"}, {"name":"Anna", "startPoint":"6", "maxPoint":"28"}, {"name":"Peter", "startPoint":"6", "maxPoint":"80"}, {"name":"Zack", "startPoint":"2", "maxPoint":"65"}, {"name":"Andy", "startPoint":"4", "maxPoint":"80"}, {"name":"Mick", "startPoint":"0", "maxPoint":"65"}, {"name":"Robin", "startPoint":"2", "maxPoint":"80"}, {"name":"Ed", "startPoint":"5", "maxPoint":"28"}, {"name":"Chris", "startPoint":"1", "maxPoint":"65"}, {"name":"Lee", "startPoint":"3", "maxPoint":"80"}, {"name":"Baron", "startPoint":"6", "maxPoint":"65"}, {"name":"Sam", "startPoint":"1", "maxPoint":"80"} ]; from three JavaScript Array Object as: var members = ["John","Anna","Peter","Zack","Andy","Mick","Robin","Ed","Chris","Lee","Baron" ,"Sam" ] var startPoint = [3, 6, 6, 2, 4, 0, 2, 5, 1, 3, 6, 1]; var maxPoint =[80, 28, 80, 65, 80, 65, 80, 80, 65, 80, 65, 80];

http://stackoverflow.com/q/26362695
has body: Is there a way to visually show when a scoped input value is changed programmatically? I have several input fields that are bound to various ng-model values, and these values change outside the user's control. (The change is tied to a button in the example below for simplicity.) When the values change, I want the input to change color or show some kind of visual cue to make it obvious that the value isn't the same as a second ago. If there was only one field, this could probably be done with a watch and adding some CSS to the relevant input. However, in production there are hundreds of values, we don't have a mapping of which values are shown in which inputs, and even if we did, many inputs are generated by repeaters, so hand coding countless watches is out. I was hoping for something like the jQuery highlight effect (http://api.jqueryui.com/highlight-effect/) but at this point, I'd be interested in any visual change at all to see if I can make it work for what I need. Sample fiddle here: http://jsfiddle.net/cdnaa8ew/1/ angular.module('changeSample', []) .controller('SampleController', ['$scope', function($scope) { $scope.a = 1; $scope.b = 2; $scope.c = 3; $scope.d = 4; $scope.e = 5; $scope.change = function() { var rand = Math.floor(Math.random() * 5); if (rand == 0) { $scope.a = $scope.a + 1; } if (rand == 1) { $scope.b = $scope.b + 1; } if (rand == 2) { $scope.c = $scope.c + 1; } if (rand == 3) { $scope.d = $scope.d + 1; } if (rand == 4) { $scope.e = $scope.e + 1; } }; } ]); {{a}}{{b}}{{c}}{{d}}{{e}} Change
type: Question
tagged with: javascript
tagged with: angularjs-scope
possible better answer: http://stackoverflow.com/a/26362742
answer count: 2
has answer: http://stackoverflow.com/a/26362742
has title: Visually show Angular scope changes when made programmatically
has answer: http://stackoverflow.com/a/26362883
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26362883
tagged with: angularjs
linked to: http://stackoverflow.com/q/20053557
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/comment/41419477
has text: What is rendered out? Post that please.
score: 0
comment on: http://stackoverflow.com/q/26382537
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41638678
type: QuestionComment
has text: Ok. I am going to edit it now.
comment on: http://stackoverflow.com/q/26502786
score: 0
type: Comment

http://stackoverflow.com/a/26448727
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26444024
score: 4
has body: Not 100% sure it fits your use case, but if the first directive always loads the user asynchronously it can use ng-if in it's template: template: '&lt;second-directive ng-if="user" user="user"&gt;&lt;/second-directive&gt;' This way the second directive will not be compiled until the user is actually available (nor will the third or fourth directive). This also makes it possible to use other directives in the chain without having to add $watch. And if you need to use the second directive somewhere else where the user is already available you can just use it without the ng-if.
type: AcceptedAnswer
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/26444024

http://stackoverflow.com/a/26452525
type: Answer
has comment: http://stackoverflow.com/comment/41570148
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26451128
type: AcceptedAnswer
downvote count: 0
has body: You can always use your own editor with your XDK project files, it is not a requirement that you use the built-in editor, although there are a few features that require the built-in Brackets editor to work. If you are using the built-in Brackets editor, you will find some extensions under the file menu. There is a "Code Folding" extension that I think is what you are looking for. Also, I highly recommend you install the various lint/hint extensions, they are very helpful for finding subtle issues with your code.
answers question: http://stackoverflow.com/q/26451128

http://stackoverflow.com/comment/41640149
type: Comment
type: QuestionComment
score: 0
has text: @ryannghiem it's not a duplicate question because that question is specifically looking for a jquery solution
comment on: http://stackoverflow.com/q/26504378

http://stackoverflow.com/comment/41375600
type: QuestionComment
has text: In your event handlers (this.f_h et al) `this` will be the evented element not the function object.
comment on: http://stackoverflow.com/q/26358515
type: Comment
score: 0

http://stackoverflow.com/a/26354485
type: Answer
has body: The issue is Element.style.display will only work when the element has an inline style. You need to get the computed style: for(i=1;i<=10;i++){ var elem = document.getElementById(i); if((elem.currentStyle ? elem.currentStyle.display : getComputedStyle(elem, null).display) == 'block') elem.innerHTML="Hamdun Soft Is Clear Now"; } aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa Note: elem.currentStyle is first checked because IE can use this .
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26354345
score: 1
answers question: http://stackoverflow.com/q/26354345
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/comment/41612071
has text: Hmmm i see. i think *In addition, the Web Service is rate-limited, so that requests that come in too quickly result in blocking.* gives me quite a good answer as why it only gives the last address the requests all come within 1 seconds which is probably too fast
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26488368
score: 0

http://stackoverflow.com/comment/41565221
type: QuestionComment
comment on: http://stackoverflow.com/q/26461525
has text: Yes, something like that (but invert video/script order unless you use document.onload).
score: 0
type: Comment

http://stackoverflow.com/comment/41547220
type: Comment
type: QuestionComment
has text: @hindmost info source ?
score: 0
comment on: http://stackoverflow.com/q/26453151

http://stackoverflow.com/comment/41595496
score: 0
type: AnswerComment
type: Comment
has text: Hi jfriend00, I seems to be the only way indeed. Thank you for the explanation.
comment on: http://stackoverflow.com/a/26479313

http://stackoverflow.com/q/26384436
tagged with: javascript
tagged with: firefox-addon
tagged with: firefox-addon-sdk
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
has title: Addon-sdk websocket keeps disconnectiong
has body: I want to open permanent websocket connection to a server in firefox extension. So I've created page-mod in main.js _stickyInterface = pageWorker.Page({ contentURL : self.data.url('wsInterface.html') }); interface looks this way: &lt;html&gt; &lt;head&gt; &lt;script&gt; //const HOST = 'ws://localhost:9099'; const HOST = 'ws://10.0.0.32:9099'; // subprotocol-key: used when server handles communication of more applications. // With subprotocol is server able to delegate messages for this purpose //const STICKY_SUBPROTOCOL_KEY = "Myris_JsApi"; const STICKY_SUBPROTOCOL_KEY = 'sticky-protocol'; // internal identifier of this app const APP_KEY = "Myris_Chrome"; var _connection = null; var _requestQueue = []; _connection = new WebSocket(HOST, STICKY_SUBPROTOCOL_KEY); _connection.onopen = function () { console.log("Sticky Interface: Connection opened."); var JSONObject = new Object; JSONObject.appKey = APP_KEY; _connection.send(JSON.stringify(JSONObject)); console.log('sent'); }; _connection.onerror = function (evt) { console.log("Error "); console.log(evt); _connection.close(); } //ok _connection.onclose = function (evt) { console.log("Close "); _connection.close(); } _connection.onmessage = function(evt) { console.log('MESSAGE'); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt;&lt;/body&gt; &lt;/html&gt; Connection is opened, messages are received. But client keeps disconnecting. There is no error message in browser console. Except for these lines (and I think the last two appeard after connection disconnected) ReferenceError: reference to undefined property permissions['private-browsing'] self.js:50 1413381004615 Services.HealthReport.HealthReporter WARN Saved state file does not exist. 1413381004615 Services.HealthReport.HealthReporter WARN No prefs data found. and even after then, with some timeout "Error " StickyInterface.html:30 error { target: WebSocket, isTrusted: true, NONE: 0, CAPTURING_PHASE: 1, AT_TARGET: 2, BUBBLING_PHASE: 3, ALT_MASK: 1, CONTROL_MASK: 2, SHIFT_MA…
type: Question
has comment: http://stackoverflow.com/comment/41483170
tagged with: firefox
downvote count: 0
tagged with: websocket

http://stackoverflow.com/a/26430086
has comment: http://stackoverflow.com/comment/41505021
has comment: http://stackoverflow.com/comment/41509989
has comment: http://stackoverflow.com/comment/41510211
type: Answer
upvote count: 0
has body: I think it is working with your Code. &lt;input type="range" id="rangevalue" onchange="arduino()"&gt; &lt;p id="t"&gt;&lt;/p&gt; &lt;script&gt; function arduino() { document.getElementById("t").innerHTML = document.getElementById("rangevalue").value; }&lt;/script&gt; JSFiddle
score: -1
has comment: http://stackoverflow.com/comment/41510497
answers question: http://stackoverflow.com/q/26429492
downvote count: 1

http://stackoverflow.com/comment/41611088
type: Comment
has text: Use this http://www.geekymonkey.com/programming/jquery/TextFill/jquery-textFill-0.1.js
type: QuestionComment
comment on: http://stackoverflow.com/q/26488090
score: 0

http://stackoverflow.com/comment/41599380
has text: Actually reinitializing freezes the div entirely, but the code seemed correct. I'm not sure how to change steps via the plugin API or directly internal variable.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26480145

http://stackoverflow.com/comment/41573088
has text: Remove the `||` part of the conditions. When you're using loose equality, `null` is also checked with `== ''`.
comment on: http://stackoverflow.com/q/26467603
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27848264
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26467603
score: 0
accepted answer of: http://stackoverflow.com/q/26467603
type: Answer
has body: you should use required field validator, its time saving, efficient, client side, and doesn't require much effort.

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/26446641
tags question: http://stackoverflow.com/q/26504540
tags question: http://stackoverflow.com/q/26457538
type: Tag

http
tags question: http://stackoverflow.com/q/26425987
tags question: http://stackoverflow.com/q/26489814
tags question: http://stackoverflow.com/q/26433061
tags question: http://stackoverflow.com/q/26462429
tags question: http://stackoverflow.com/q/26493744
tags question: http://stackoverflow.com/q/26418938
tag name: http
tags question: http://stackoverflow.com/q/26472732
tags question: http://stackoverflow.com/q/26384030
tags question: http://stackoverflow.com/q/26436533
tags question: http://stackoverflow.com/q/26387035
tags question: http://stackoverflow.com/q/26487237
tags question: http://stackoverflow.com/q/26502400
tags question: http://stackoverflow.com/q/26385301
tags question: http://stackoverflow.com/q/26410064
type: Tag
tags question: http://stackoverflow.com/q/26394771
tags question: http://stackoverflow.com/q/26475105
tags question: http://stackoverflow.com/q/26394651
tags question: http://stackoverflow.com/q/26420437

http://stackoverflow.com/comment/41517903
type: QuestionComment
comment on: http://stackoverflow.com/q/26436684
type: Comment
score: 1
has text: You didn't bother to search first, did you? It has been asked 3 years ago, exactly the same question: http://stackoverflow.com/questions/7684815/regex-for-alpanumeric-with-at-least-1-number-and-1-character

http://stackoverflow.com/comment/41594323
comment on: http://stackoverflow.com/q/26412773
score: 0
type: QuestionComment
has text: It looks like I may have been wrong about the session manager, but I have added `withCredentials: true` to the configuration of the $http service, and I see more data in the header. So I am testing that now.
type: Comment

http://stackoverflow.com/a/26465321
type: Answer
answers question: http://stackoverflow.com/q/26465297
score: 3
has body: You need to find the next tr sibling and then the lstMails element inside it $("body").on('click', ".copyMails", function() { $('#log').html($(this).closest('tr').nextAll('tr:has(.lstMails)').first().find('.lstMails').val()); }); Actions Nom Coordonnées Diplômes Profil associé 2014-2015 Copier les adresses emails Actions Nom Coordonnées Diplômes Profil associé 2014-2015 Copier les adresses emails BLABLABLA BLABLABLA Your code is getting the tbody ancestor of the clicked button, then trying to find the next sibling which has class lstMails - that is not what you are after.
upvote count: 3
has comment: http://stackoverflow.com/comment/41568673
downvote count: 0

http://stackoverflow.com/comment/41620486
has text: `$('.row-offcanvas').toggleClass('active');` This line is going to look for **all** elements with the class "row-offcanvas." For every one it finds, if something doesn't have the class "active," it will add it. If it has the active class, it will remove it. In the case of your buttons, let's assume the first button is already active. When that line is fired, your first button will not be active, and every other button will be active, regardless of which button you click.
comment on: http://stackoverflow.com/a/26493243
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26365873
has body: Here is the fiddle that solves both of your problems, http://jsfiddle.net/egjyd9rs/5/ Basically, the toggle function which takes care of both is as below, function myFunction() { currentlPlayingTime = vid.currentTime; if (currentlyPlaying === 1) { vid.src = src2; currentlyPlaying = 2; statusElement.innerText = 'Going to play video2..'; } else { vid.src = src1; currentlyPlaying = 1; statusElement.innerText = 'Going to play video1..'; } vid.load(); vid.addEventListener('loadedmetadata', function () { vid.currentTime = currentlPlayingTime; }, false); }
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26360255
answers question: http://stackoverflow.com/q/26360255
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/41467581
score: 1
comment on: http://stackoverflow.com/a/26407498
type: AnswerComment
type: Comment
has text: That said, your stand-alone call to `foo()` before `setInterval` may also be breaking things.

http://stackoverflow.com/comment/41586108
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26473852
has text: @Josh Did you try replacing the `scroll`, `scrollTo` and `scrollBy` methods?

http://stackoverflow.com/a/26470126
answers question: http://stackoverflow.com/q/26469230
type: Answer
score: 2
upvote count: 3
has body: You could use async (or some other control flow library) this way: var async = require('async'); gulp.task('build', function (callback) { async.series([ function (cb) { // example usage should be your build:scss task, // notice the call of `cb` on end event gulp.src('package.json') .pipe(gulp.dest('test/')) .on('end', cb); }, function (cb) { // same thing with the content of your build:js }, // all your other tasks ], callback); });
downvote count: 1

http://stackoverflow.com/a/26443544
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26442704
has body: If you're using the awesome underscore library there's a _.findWhere function. var sam21 = _.findWhere(people, { name: 'Sam', age: 21 }); if you want something without a whole other library you can use .filter. var sam21 = people.filter(function(person) { return person.age === 21 &amp;&amp; person.name === 'Sam'; }); I just noticed you're looking for the index. This answer can be useful: https://stackoverflow.com/a/12356923/191226

http://stackoverflow.com/q/26494915
has answer: http://stackoverflow.com/a/26495087
has answer: http://stackoverflow.com/a/28545867
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/9419263
has title: With an array of pictures I would like to have a different audio for each image
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41623961
tagged with: image
has body: I have set up a random slideshow that goes through many picture. I am wanting to add a short audio clip to each one and have them sync with the array I use for the random pictures. Below is a similar example of what I have. I'm new to JavaScript, and I've searched hundreds of places for an answer but nothing seems to work. Please help. Thank you. UPDATE. I may not have been clear. This is what I am trying to do: My son loves animals. He's autistic, so he is constantly listing out his animals and things about them. I created a slideshow for his computer with all 500 pictures and stuff about them. It auto plays random images on one screen and he can manually browse on another. He wants to record short, 5-10 second audio with their name and something about them. I want to be able to associate his recordings with the pictures and have the recordings play each time an image changes addImages = new Array addImages[0] = "one.bmp" addImages[1] = "two.bmp" addImages[2] = "three.bmp" addImages[3] = "four.bmp" addImages[4] = "five.bmp" addImages[5] = "six.bmp" addImages[6] = "seven.bmp" imgCt = addImages.length firstTime = true addSound = new Array addSound[0] = "tada.wav" addSound[1] = "recycle.wav" addSound[2] = "ringout.wav" addSound[3] = "notify.wav" addSound[4] = "tada.wav" addSound[5] = "tada.wav" addSound[6] = "tada.wav" imgCt2 = addSound.length function rotate() { if (document.images) { if (firstTime) { thisAdd = Math.floor((Math.random() * imgCt)) firstTime = false } else { thisAdd++ if (thisAdd == imgCt) { thisAdd = 0 } } document.myPicture.src=addImages[thisAdd] setTimeout("rotate()", 3 * 1000) } }
has comment: http://stackoverflow.com/comment/41623215
answer count: 2
has comment: http://stackoverflow.com/comment/41623263
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
linked to: http://stackoverflow.com/q/4227313
tagged with: html5-audio
type: UnansweredQuestion

http://stackoverflow.com/comment/41387276
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26358861
has text: Well, it was because my select lists were enclosed in "form"s. It worked fine when I removed the form tag. But what if I want to have it in a form tag??
score: 0

http://stackoverflow.com/comment/41375676
type: QuestionComment
has text: So I need to pass `this` (or `elem`) as argument to all of the f_xxx?
type: Comment
comment on: http://stackoverflow.com/q/26358515
score: 0

http://stackoverflow.com/comment/102545628
score: 0
type: Comment
has text: fitExtent has been changed to fit since 3.7. With that change this still works!
comment on: http://stackoverflow.com/a/26381201
type: AnswerComment

http://stackoverflow.com/comment/41448668
has text: Learn to use `console.log()` method, `alert()` is not a debugging tool.
comment on: http://stackoverflow.com/q/26399074
type: Comment
type: QuestionComment
score: 8

http://stackoverflow.com/q/26487910
possible better answer: http://stackoverflow.com/a/26488188
score: 0
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41609998
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
accepted answer: http://stackoverflow.com/a/26488676
has title: How do I change an image with Javascript based on dropdown selection value?
favorite count: 0
has comment: http://stackoverflow.com/comment/41610175
has answer: http://stackoverflow.com/a/26488676
tagged with: css
has comment: http://stackoverflow.com/comment/41610204
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26488188
type: Question
has body: I am a complete noob with JavaScript, but I have managed to make a form with 4 drop down selection boxes on the left hand side for a user (State, Car, Year, Condition). The user makes their drop down selections and clicks a 'calculate' button underneath, which then runs some simple functions based on their input and displays 4 different values on the right hand side of the form. In the middle of the form is a picture called car1.png which I would like to change based on the value which is returned to Result 3 (ie, if 0.07 show "car2.png", if 0.06 show "car3.png". I have tried everything I can possibly think of and have read through many tutorials on 'if' statements but feel I am looking in the wrong area. Any ideas how I would go about doing this as simply as possible given my lack of knowledge in this area would be much appreciated. Here is what I have come up with so far : State : SA VIC NSW QLD NT WA Car : Ford Nissan Toyota Holden Year : 1980 1981 1982 1983 1984 1985 Condition : New Used Defect Scrap Result 1: Result 2: Result 3: Result 4:
has comment: http://stackoverflow.com/comment/41610199
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26443342
answers question: http://stackoverflow.com/q/26442603
score: 1
accepted answer of: http://stackoverflow.com/q/26442603
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Solution : function countNumberOfUrl(urlstring) { var number = 0; var count = urlstring.match(/\http:|https:/g).length; if(count) { number = count; } return number; }
upvote count: 1

http://stackoverflow.com/q/26367421
tagged with: angularjs
type: UnansweredQuestion
has body: I want to have a loading state for each resource object in an ng-repeat. Restangulars addRequestInterceptor returns the element, but it doesn't seem to be linked to the angular $scope. Is there any way to get the $scope object from the arguments given? Restangular.addRequestInterceptor(function(element, operation, route, url){ if (element){ element.loading = true; } });
tagged with: restangular
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: angular-http-interceptors
tagged with: javascript
has comment: http://stackoverflow.com/comment/41392525
downvote count: 0
has comment: http://stackoverflow.com/comment/41392696
has title: Get scope object in restangular request interceptor
has comment: http://stackoverflow.com/comment/41393005
favorite count: 0
has comment: http://stackoverflow.com/comment/41392501

http://stackoverflow.com/comment/41511981
score: 0
type: QuestionComment
type: Comment
has text: I can see what's happening but still haven't worked out the solution: when I click Group 1.1 on the LHS nothing shows because the parent node Group has the attribute showGroupItems set to false. Because it is false the children node, which is Group 1.1 is not displayed even though the showGroupItems entry is set to true. This is tricky because I still want to show the hierarchy (if there is one) but from a node which may not be a parent node.
comment on: http://stackoverflow.com/q/26416566

http://stackoverflow.com/comment/41536693
type: QuestionComment
score: 1
has text: Right...so somehow in the following: `app.use('/', routes);` routes is a function, even though I do not see it defined anywhere?
comment on: http://stackoverflow.com/q/26447078
type: Comment

http://stackoverflow.com/comment/41566838
comment on: http://stackoverflow.com/q/26464103
score: 2
has text: @rafaelcastrocouto, you do not understand the question and are trying to close it instead? I need to change the variable from inside node.js and let the parent process keep it. The question you are referring to is about changing PORT variable before the node.js starts.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26391297
has answer: http://stackoverflow.com/a/26392480
has title: How do I grab the names of multiple files that are about to be uploaded?
type: Question
has comment: http://stackoverflow.com/comment/41435986
has comment: http://stackoverflow.com/comment/41435682
upvote count: 1
accepted answer: http://stackoverflow.com/a/26392480
answer count: 1
has comment: http://stackoverflow.com/comment/41436117
has comment: http://stackoverflow.com/comment/41435697
has body: I have the following form and div and jQuery. When selecting a file to be uploaded, the name of the file (with it's extension) will output to the div, however, it doesn't work for multiple files. When selecting multiple files, only the name of the first file is output. I looked all over for a solution for multiple files, and could not find it. &lt;form id="myform" action="" method="post" enctype="multipart/form-data"&gt; &lt;input type="file" multiple name="files[]" /&gt; &lt;input type="submit" name="submit" value="Submit"&gt; &lt;/form&gt; &lt;div class="filename"&gt;&lt;/div&gt; $("input:file").change(function (){ var fileName = $(this).val(); $(".filename").html(fileName); }); So remember, getting the list of file names (with their extensions) should happen as soon as files are selected, not after the form is being submitted. EDIT: On top of what i said below, another thing that happens is that when a single file is selected, the name of that file shows up next to the browse button, but when multiple files are selected, it doesn't show the name of each file, it just says "# files selected." for firefox and "# files" for chrome. i went to see what IE does and that one is different. it puts the path of the file or files in the text field next to browse button, so i guess that's what the other question and answer was all about. i tried all of these and none work, and even if one of them did, that seems to be an internet explorer only thing. i need a cross browser solution. var fileName = $(this).val().split('\\').pop(); var fileName = $(this).val().split(',').pop(); var fileName = $(this).val().split(', ').pop(); So to recap, when selecting multiple files, the name of each file should be output/displayed. even if that other solution works for removing file path and just leaving the file name and extension (for IE only), it doesn't work for showing the name of every file selected. it only shows the first file. EDIT2: Just in case you were wondering, i tried this too…
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/41435810
has comment: http://stackoverflow.com/comment/41435881
linked to: http://stackoverflow.com/q/6365858
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26486266
score: 0
has comment: http://stackoverflow.com/comment/41607715
has comment: http://stackoverflow.com/comment/41606997
has comment: http://stackoverflow.com/comment/41607331
type: Answer
accepted answer of: http://stackoverflow.com/q/26486056
has comment: http://stackoverflow.com/comment/41607286
answers question: http://stackoverflow.com/q/26486056
has comment: http://stackoverflow.com/comment/41608344
has body: You can do something like var $clearAll = $('.refinements &gt; .clear-filter'), $checks = $('.options input[type="checkbox"]'), $clear = $('.refinements .panel .clear-filter'); $checks.change(function () { var $options = $(this).closest('.options'), $clear = $options.prev(); //if the current checkbox is checked we can show the all and clear buttons if (this.checked) { $clear.show(); $clearAll.show(); } else { //if it is an uncheck operation then set the visibility based on overall state of respective checkboxes $clear.toggle($options.find('input[type="checkbox"]').is(':checked')) $clearAll.toggle($checks.is(':checked')) } }) $clearAll.click(function (e) { e.preventDefault(); $checks.prop('checked', false); $(this).hide(); $clear.hide(); }) $clear.click(function (e) { e.preventDefault(); $(this).next().find('input[type="checkbox"]').prop('checked', false); $clearAll.toggle($checks.is(':checked')); $(this).hide(); }) Demo: Fiddle
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41607381

http://stackoverflow.com/q/26496769
tagged with: ios8
tagged with: ios-web-app
tagged with: javascript
tagged with: touch
downvote count: 0
favorite count: 0
has title: Web-app on iOS8 doesn't transfer Touch events to iFrames
type: UnansweredQuestion
answer count: 0
upvote count: 3
tagged with: iframe
has body: In a web-app, on iOS 8.1, touch events (touchstart, touchend, etc.) don't seems to be transferred to iFrames, but on the same device in Safari they are. I tested the same web-app on iOS 7 and again, the touch events are transferred to the iFrame perfectly. So basically, the problem seems to be directly related to iOS 8. Unfortunately, I didn't found any documentation on the subject. Anyone have encounter the same problem, found a workaround or know if there is an official bug report? Thanks
type: Question
score: 3

http://stackoverflow.com/a/26456076
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26456052
has comment: http://stackoverflow.com/comment/41553272
has comment: http://stackoverflow.com/comment/41553538
answers question: http://stackoverflow.com/q/26456052
type: Answer
has body: You should change $(".readmore").click(function () { $(".readmore").next()... to $(".readmore").click(function () { $(this).next()... so the next() selector in the click() event function is only applied to the currently clicked element instead of all elements with the class readmore at the same time.
score: 0
has comment: http://stackoverflow.com/comment/41552746
has comment: http://stackoverflow.com/comment/41553463

http://stackoverflow.com/a/26427589
answers question: http://stackoverflow.com/q/26427473
downvote count: 0
has body: If you want angular-ish use ng-repat HTML {{s}} JS $scope.stuffs = ['Stuff 1', 'Stuff 2', 'Stuff 3'];
score: 2
upvote count: 2
type: Answer

http://stackoverflow.com/comment/41524280
has text: @BenjaminGruenbaum I'm sticking with jQuery Promises for now as the native JS version is not supported by **any** versions of Internet Explorer.
type: Comment
comment on: http://stackoverflow.com/a/26433774
score: 1
type: AnswerComment

newline
tags question: http://stackoverflow.com/q/26381971
tag name: newline
type: Tag

http://stackoverflow.com/comment/41374791
comment on: http://stackoverflow.com/a/26358129
type: Comment
has text: the same code is ok after change the name of the submit but why ?
score: 0
type: AnswerComment

http://stackoverflow.com/q/26423221
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41491830
favorite count: 0
accepted answer: http://stackoverflow.com/a/26426063
linked to: http://stackoverflow.com/q/24972601
has title: ng-option with static link option
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/26423720
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26426063
possible better answer: http://stackoverflow.com/a/26423720
has comment: http://stackoverflow.com/comment/41491893
type: Question
has body: How to add static option that represents a link to other page using ng-options. I am using select element with ng-options with predefined list of persons, where person is an object. I tried to use ng-repeat instead but this approach does not work: Anywhere {{person.name}} Varibale $scope.person gets the value "#/current". In this case linking works, but ng-model fails. Variable $scope.person should represent the selected person. What I am expecting is that $scope.person has selected value, unless user choose "Anywhere", in which case he should be redirected to another page. "#/home" and "#/current" represent the url location. "#/home"is a home page and "#/current" is a current page. onChange event redirects user to home page or reloads current page. So when user select "Anywhere" he should be redirected to home page. For any other option user´s page won´t be changed.

http://stackoverflow.com/q/26443511
type: UnansweredQuestion
has body: I need advice on how to hook into the event- when mvc data annotation validation messages gets rendered on focus out of current textbox. If I use the focusout event for that textbox and set adjacent div height, the new height does not consider the text from the validation message the and the adjacent div's height ends up being shorter, any help on how to solve this would be much appreciated
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: c#
tagged with: javascript
has title: Adjusting my adjacent div height when my current div height changes due to focusout validation messages
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/26495242
type: AnsweredQuestion
tagged with: android
has answer: http://stackoverflow.com/a/26495297
type: Question
answer count: 1
has body: on my android or on a iPhone I will get the else when I type glass on my computer it works fine &lt;script type="text/javascript"&gt; var x = prompt("Wholesale users enter in the password or hit enter for consumer information "," "); if(x == "glass"){ window.alert("sometext"); } else { window.alert("else"); } &lt;/script&gt;
score: 0
has comment: http://stackoverflow.com/comment/41624012
accepted answer: http://stackoverflow.com/a/26495297
has comment: http://stackoverflow.com/comment/41629240
tagged with: iphone
tagged with: javascript
has title: JS If statement not working on android 4.4.2 or iphone

http://stackoverflow.com/comment/41400194
score: 0
type: QuestionComment
type: Comment
has text: ^ More correctly, this is equivalent: `if (stuntSet === "all" || stuntSet === character.stunts[i].category)`.
comment on: http://stackoverflow.com/q/26371514

http://stackoverflow.com/comment/41656476
has text: So looking at this I don't quite understand how this works - mainly `$catsubs = $_POST[$cat]` Would you mind explaining?
comment on: http://stackoverflow.com/a/26510699
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41491542
has text: I try and continue open one div , no differents divs in each click , the idea it´s with each click open new div
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26422990

http://stackoverflow.com/q/26425109
possible better answer: http://stackoverflow.com/a/26425296
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I need to start a spinner before loading an image from the server. My HTML page contains This tesst text This tesst text This tesst text This tesst text And I want it to show a spinner whilst image loads, like Facebook. So I need to replace to a spinner image until the real image is loaded
downvote count: 0
has answer: http://stackoverflow.com/a/26426829
accepted answer: http://stackoverflow.com/a/26426829
has answer: http://stackoverflow.com/a/26426583
has title: How can I set Pre-load image on image loading from Server
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26425296
tagged with: preloader
type: Question
upvote count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41630344
type: QuestionComment
comment on: http://stackoverflow.com/q/26498313
score: 0
has text: Another idea - try showing the element before positioning it. `$(".custNotes-span", this).show().position({...}).css({...})`
type: Comment

http://stackoverflow.com/comment/41608133
type: Comment
has text: For some other reasons I do have 0.5 second timeout on the blur event, forgive me, I don't quite understand this "just make sure to save timeout id so you can clear it on mouseenter to menu" Could you please give me more details, thank you.
comment on: http://stackoverflow.com/a/26486697
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41395675
comment on: http://stackoverflow.com/q/26369192
score: 1
type: QuestionComment
type: Comment
has text: Promises all the way. Take a look at q.js.

http://stackoverflow.com/comment/41595230
has text: It looks like you may be setting week just after even though the promise seems like it is resolved after week is set. Can you just return week and use it instead `then(function(week) {`
comment on: http://stackoverflow.com/q/26479179
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26438814
type: Question
tagged with: javascript
tagged with: flask
score: 0
answer count: 1
tagged with: websocket
has answer: http://stackoverflow.com/a/26439634
tagged with: python
accepted answer: http://stackoverflow.com/a/26439634
has title: How to call a client side method from the server using socket.io
type: AnsweredQuestion
has body: I am using flask-socketio for the server and have the following code to call a client function from the server. Is this the correct way to do it? Or is there a better way Server @socketio.on('connect', namespace='/test') def test_connect(): sleep(5) emit('my response', {'data': 'myFunction', 'parameter': 2}) Client socket.on('my response', function(msg) { console.log(msg) window[msg.data]({parameter1 : msg.parameter}); }

http://stackoverflow.com/q/26497205
type: AnsweredQuestion
has body: I am trying to create a function that will trim off array values that are not 4 chars long. For some reason, it does not work. I think that it might be with the return statement but I am not sure and I need help with it. Here is the code for the function: (Please don't suggest ways of making the hasher better, I just need help on the function) function cutit(seq){ for(var i=0;i&lt;seq.length;i++){ var temparr=seq[i].split(""); if(temparr.length % 4 !== 0){ seq.splice(seq[i],1); return seq; } } }
type: Question
accepted answer: http://stackoverflow.com/a/26497958
tagged with: for-loop
has answer: http://stackoverflow.com/a/26497958
has title: Javascript hasher nested function
tagged with: function
answer count: 1
tagged with: arrays
tagged with: javascript
score: 0

http://stackoverflow.com/q/26419181
answer count: 1
has comment: http://stackoverflow.com/comment/41490904
tagged with: graph
has title: How to apply highchart's license
tagged with: javascript
type: UnansweredQuestion
tagged with: highcharts
downvote count: 0
score: 16
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/38856736
upvote count: 16
has body: Few days ago I bought a highchart's license but I am confused how should I use it in my graphs. Only I need to set credits option like, credits: { enabled: false } Or do I need to specify my license key somewhere else in the code?

http://stackoverflow.com/comment/41448894
type: QuestionComment
has text: can we see any live demo or something?
score: 0
comment on: http://stackoverflow.com/q/26398830
type: Comment

http://stackoverflow.com/q/26503418
upvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/26503684
tagged with: javascript
has title: Can use casperjs login to facebook but capture to png only show nav bar
linked to: http://stackoverflow.com/q/26415188
answer count: 1
downvote count: 0
favorite count: 0
tagged with: casperjs
tagged with: facebook
has body: Can use casperjs login to facebook but capture to png only show nav bar this my code: facebook.js casper.start("http://www.facebook.com/login.php", function(response) { if (this.exists('[name="lsd"]')) { this.page.evaluate(function(a,b) { document.querySelector("input[name='email']").value = a document.querySelector("input[name='pass']").value = b; document.querySelector("#login_form").submit(); console.log("Login submitted!"); },user_email,user_pass); } else { this.echo('[name="lsd"] not found', 'ERROR'); phantom.exit(); } this.capture('img/'+user_email+'_login.png'); }); casper.run(); please help me to solve the issue.
has answer: http://stackoverflow.com/a/26503684
linked to: http://stackoverflow.com/q/25359247
type: AnsweredQuestion
score: 3
tagged with: capture

http://stackoverflow.com/comment/41468936
comment on: http://stackoverflow.com/q/26410350
has text: @KevinB Code golf comes to mind, for one thing. And... I just noticed that it worked, and was wondering why I hadn't seen it anywhere else.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41533603
has text: That's it! Glad you found it.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26440065
score: 1

http://stackoverflow.com/comment/41428138
score: 0
comment on: http://stackoverflow.com/a/26383372
type: Comment
has text: Thanks, this worked fine and I just had to find out about the "attr" binding to get different attribute values for each input.
type: AnswerComment

http://stackoverflow.com/a/26359473
type: Answer
answers question: http://stackoverflow.com/q/26359280
has body: declare circle as global variable and Change google.maps.event.addListener(map, "click", function (e) { To google.maps.event.addListener(circle, "click", function (e) { demo
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26359280

http://stackoverflow.com/comment/64937928
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26483233
has text: while this is possible, it duplicates much of the work that the TreeView DataSource binding gives you. keep the data fetching in the DataSource transport, as shown in Dan's answer.

http://stackoverflow.com/comment/41601446
type: Comment
type: QuestionComment
has text: @Asik no I don't want a back button. The 'home' view has no view loaded, then when the user clicks on 'contact' it loads the contact view. The home link should then change the route to home again (which has no view loaded)
score: 0
comment on: http://stackoverflow.com/q/26482905

http://stackoverflow.com/comment/41513810
has text: *innerText* isn't supported by all browsers in use, so that will be interminably slow for some. ;-)
comment on: http://stackoverflow.com/q/26434382
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/41451236
has text: Which version of Firefox are you using? The code hangs on FF 32 Windows 32-bit version, though.
comment on: http://stackoverflow.com/q/26397714
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26447286
has body: function checkcomplex(whichcontrol) { var passcheck=true; var x=0; if (whichcontrol.value.length==0) return true; else if (whichcontrol.value.length!=11) passcheck=false; else { while (passcheck &amp;&amp; x&lt;3) { if (whichcontrol.value.charAt(x) &gt;='0' &amp;&amp; whichcontrol.value.charAt(x) &lt;='9')x++; else passcheck=false; } if (whichcontrol.value.charAt(x)=='-') x++; else passcheck=false; while (passcheck &amp;&amp; x&lt;6) { if (whichcontrol.value.charAt(x) &gt;='0' &amp;&amp; whichcontrol.value.charAt(x) &lt;='9')x++; else passcheck=false; } if (whichcontrol.value.charAt(x)=='-') x++; else passcheck=false; while (passcheck &amp;&amp; x&lt;11) { if (whichcontrol.value.charAt(x) &gt;='0' &amp;&amp; whichcontrol.value.charAt(x) &lt;='9')x++; else passcheck=false; } } //end else if (passcheck) return true; else return errorinfield(whichcontrol,"Must be of the form 999-99-9999!"); } This currently brings up an alert if the number is not in the format of 999-99-9999 and I want to change this to make it bring up and alert if the number is not in the format of 02X-XXXXXXX (X's being numbers) Can anyone help me with this?
has answer: http://stackoverflow.com/a/26447331
has title: How do I change this format to something like 02X-XXXXXXX?
type: UnansweredQuestion
downvote count: 2
type: Question
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/41598211
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26480615
type: Comment
has text: okay.. In my last part I want to call a function which is in separate module and my current module is dependent on that module. therefore how to call that function inside controller of that parent module.

http://stackoverflow.com/comment/41483780
comment on: http://stackoverflow.com/q/26418484
type: QuestionComment
has text: This is not feasible in general. What if the the `alert()` is inside an `if`. There's no way for the caller to know whether the condition will be true or false, so it can't tell whether it will be called. This is equivalent to the [Halting Problem](http://en.wikipedia.org/wiki/Halting_problem)
type: Comment
score: 1

http://stackoverflow.com/comment/41509599
has text: If you don't mind answering, what is the `+` for in `+new Date()`. What does it do?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26432403
type: Comment

http://stackoverflow.com/q/26506429
favorite count: 0
linked to: http://stackoverflow.com/q/14008521
has comment: http://stackoverflow.com/comment/41643739
type: Question
has body: So I have this code now, and in input I have in ascending order my name's letters "ahimrsu". I need to show up the right number for "mariush" from all combinations which should to be 2170. For now it only show ahimrsu, ahimrus, ahimsru, ahimsur, ahimurs, ahimusr, ahirmus, ahirmsu.... etc How can I do this?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41643626
possible better answer: http://stackoverflow.com/a/26507002
has answer: http://stackoverflow.com/a/26507002
upvote count: 2
has answer: http://stackoverflow.com/a/26509019
answer count: 3
has title: Permutation Javascript
has comment: http://stackoverflow.com/comment/41644219
has comment: http://stackoverflow.com/comment/41643828
has comment: http://stackoverflow.com/comment/41643732
has comment: http://stackoverflow.com/comment/41644182
linked to: http://stackoverflow.com/q/18681165
accepted answer: http://stackoverflow.com/a/26509019
tagged with: algorithm
linked to: http://stackoverflow.com/q/26502895
tagged with: javascript
has comment: http://stackoverflow.com/comment/41644041
has comment: http://stackoverflow.com/comment/41644132
has answer: http://stackoverflow.com/a/26510235
has comment: http://stackoverflow.com/comment/41644022
has comment: http://stackoverflow.com/comment/41644309
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41644073
tagged with: arrays
downvote count: 0
tagged with: permutation

http://stackoverflow.com/comment/41563887
score: 0
comment on: http://stackoverflow.com/q/26462429
type: Comment
type: QuestionComment
has text: You mean to say you want `student`, `150`, etc from JSON as `String`, `int`, etc. & set it in setter methods or use somewhere else in Java code ?

http://stackoverflow.com/comment/41499339
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26412283
has text: @MarcoCI Can you elaborate on the last part? The check for the HTML5 APIs is in the mule uploader not in my code. By launchers i meant whether or not the launchers launched browsers that support HTML5. Guess so, right?

http://stackoverflow.com/comment/41587571
has text: Could you show me on fiddle?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26474981

http://stackoverflow.com/comment/41587157
type: AnswerComment
has text: Doesn't work with tweets loaded via Ajax. That's why I use event delegation.
type: Comment
comment on: http://stackoverflow.com/a/26474853
score: 0

http://stackoverflow.com/a/26369825
has comment: http://stackoverflow.com/comment/41401017
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41407099
score: 0
has body: why not defining 2 controllers one for each div with a respective factory fetching your json. or if you rather want to have only one controller you can fetch the json and assign it to different models in the $scope of this controller. Such as $scope.first = parsedJsonData1 $scope.second = parsedJsonData2 within your divs you can then use ng-repeat to iterate over each models data ..but i have problems with the images load...i visualize the textual url and not the real image. because you have to render an image tag which uses your models data.attribute as url try something like (given that photo1 contains the url): &lt;img ng-src="{{x.photo1}}"/&gt;
has comment: http://stackoverflow.com/comment/41400740
has comment: http://stackoverflow.com/comment/41399069
answers question: http://stackoverflow.com/q/26368469
accepted answer of: http://stackoverflow.com/q/26368469

http://stackoverflow.com/a/26398691
type: Answer
score: 67
has comment: http://stackoverflow.com/comment/41448505
has comment: http://stackoverflow.com/comment/41448466
answers question: http://stackoverflow.com/q/26398537
has comment: http://stackoverflow.com/comment/95812642
has body: You don't need NodeJS for creating a client side image editing tool. AngularJS is a web application framework, maintained by Google and the community, that assists with creating single-page applications, which consist of one HTML page with CSS and JavaScript on the client side. But if someday you will want to upload and store those images on a server and make them accessible by multiple clients - then yes you will also need a server. This server could be made with NodeJS.
has comment: http://stackoverflow.com/comment/95631612
downvote count: 0
upvote count: 67
has comment: http://stackoverflow.com/comment/41448315

internet-explorer
tags question: http://stackoverflow.com/q/26392887
tags question: http://stackoverflow.com/q/26384177
tags question: http://stackoverflow.com/q/26482645
tags question: http://stackoverflow.com/q/26504949
tags question: http://stackoverflow.com/q/26418653
tags question: http://stackoverflow.com/q/26423193
tag name: internet-explorer
tags question: http://stackoverflow.com/q/26477705
tags question: http://stackoverflow.com/q/26376520
tags question: http://stackoverflow.com/q/26510935
tags question: http://stackoverflow.com/q/26472717
tags question: http://stackoverflow.com/q/26463673
tags question: http://stackoverflow.com/q/26407977
tags question: http://stackoverflow.com/q/26380234
tags question: http://stackoverflow.com/q/26425562
tags question: http://stackoverflow.com/q/26510942
tags question: http://stackoverflow.com/q/26377103
tags question: http://stackoverflow.com/q/26419019
tags question: http://stackoverflow.com/q/26497009
tags question: http://stackoverflow.com/q/26410304
tags question: http://stackoverflow.com/q/26426699
type: Tag
tags question: http://stackoverflow.com/q/26378925
tags question: http://stackoverflow.com/q/26405439
tags question: http://stackoverflow.com/q/26378733
tags question: http://stackoverflow.com/q/26478978
tags question: http://stackoverflow.com/q/26483380
tags question: http://stackoverflow.com/q/26407505
tags question: http://stackoverflow.com/q/26405756
tags question: http://stackoverflow.com/q/26369085

http://stackoverflow.com/q/26433677
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/477691
linked to: http://stackoverflow.com/q/17117910
has comment: http://stackoverflow.com/comment/41512885
has comment: http://stackoverflow.com/comment/41512199
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26433820
favorite count: 0
has answer: http://stackoverflow.com/a/26433722
upvote count: 2
has comment: http://stackoverflow.com/comment/41512355
has answer: http://stackoverflow.com/a/26433888
accepted answer: http://stackoverflow.com/a/26433888
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41512175
tagged with: forms
possible better answer: http://stackoverflow.com/a/26433722
type: Question
has body: We're using custom buttons to submit forms. A click event is assigned to .btn-submit's to submit the respective form. However, without some type of or element located within the , pressing ENTER in either the username or password text field does not submit the form. How do I still allow users to submit a form when pressing ENTER in an input field without a type="submit" element present in the ? HTML Username Password Log In JS $(document).ready(function() { $('.btn-submit').on('click', function(e) { $(this).parents('form:first').submit(); }); });
has title: Form not submitting on ENTER when no type="submit" element present
downvote count: 0

http://stackoverflow.com/comment/41610274
score: 0
type: Comment
type: QuestionComment
has text: @Code no [Problem](http://jsfiddle.net/arunpjohny/4u2und9o/1/) - [Solution](http://jsfiddle.net/arunpjohny/4u2und9o/2/)
comment on: http://stackoverflow.com/q/26487865

http://stackoverflow.com/comment/41404840
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26373987
has text: That's not AJAX, that's a redirect. What's your question? What are you trying to do?

http://stackoverflow.com/a/26401684
type: AcceptedAnswer
downvote count: 0
has body: The issue is that you use the DIV mode and not the iFrame mode. If you want to use the DIV mode the issue is that there is already a doctype, head, footer, etc in that page. Which can not exists twice in a page and the browser will remove it from your page. You can use eather the iFrame mode or the solution below. The solution I use is to replace that tag by a custom tag of mine which I replace when I go from design mode to edit mode and when I save it to the database I also replace my custom tags to the normal tags. For example: The code below is an example I use in my project (does not contain the doctype yet): // Add the custom filter to the editor function OnClientLoad(editor, args) { editor.get_filtersManager().add(new MyFilter()); } // Replace the tags HTML does not expect twice var tags = ["html", "body", "head", "title", "form", "textarea"]; MyFilter = function () { MyFilter.initializeBase(this); this.set_isDom(false); this.set_enabled(true); this.set_name("RadEditor filter"); this.set_description("RadEditor filter description"); } MyFilter.prototype = { getHtmlContent: function (content) { var newContent = content; for (var i = 0; i &lt; tags.length; i++) { var tag = tags[i]; newContent = newContent.replace(new RegExp("&lt;j" + tag, "gi"), "&lt;" + tag); newContent = newContent.replace(new RegExp("&lt;" + "/j" + tag + "", "gi"), "&lt;" + "/" + tag + ""); } return newContent; }, getDesignContent: function (content) { var newContent = content; for (var i = 0; i &lt; tags.length; i++) { var tag = tags[i]; newContent = newContent.replace(new RegExp("&lt;" + tag, "gi"), "&lt;j" + tag); newContent = newContent.replace(new RegExp("&lt;" + "/" + tag + "", "gi"), "&lt;" + "/j" + tag + ""); } return newContent; } } MyFilter.registerClass('MyFilter', Telerik.Web.UI.Editor.Filter); And get the HTML from the editor also replace the new tag: function GetEditorHtmlCall() { var html = $find("RadEditor1").get_html(true); for (var i = 0; i &lt; tags.length; i++) { var tag = …
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26372838
score: 1
answers question: http://stackoverflow.com/q/26372838

http://stackoverflow.com/comment/41462576
type: QuestionComment
has text: `$(#monthValue').html(selectedYear + ' ' + selectedMonth);`
score: 1
comment on: http://stackoverflow.com/q/26406916
type: Comment

http://stackoverflow.com/comment/41399640
type: QuestionComment
comment on: http://stackoverflow.com/q/26371248
score: 0
type: Comment
has text: please use www.jsfiddle.net to show us what you have already.

http://stackoverflow.com/comment/41474450
type: Comment
has text: I tried playing around with the methods here: http://ejohn.org/blog/ecmascript-5-objects-and-properties/ but wasn't able to cause an error on a readonly property. I was using strict mode too.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26413084

http://stackoverflow.com/comment/41425709
type: Comment
has text: @mplungjan you don't seem to need to handle that on Chrome. Not sure about other browsers though. I've added an `onload` handler, regardless.
comment on: http://stackoverflow.com/a/26385877
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41550474
score: 0
has text: (1) In the clause `$.ajax(...).then(display_content, ...)`, the success handler `display_content` will receive the parameters passed to it when the AJAX response is received - ie `data`, `textStatus`, `jqXHR`. It's easier to understand with an anonymous function - `$.ajax(...).then(function(data, textStatus, jqXHR), ...)`. (2) `$(' ')` creates a new, jQuery-wrapped DIV element, which is inserted into the DOM a couple of lines later with the clause `.append($container)`.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26446371

http://stackoverflow.com/a/26400877
type: Answer
has comment: http://stackoverflow.com/comment/41452357
has comment: http://stackoverflow.com/comment/41452158
has comment: http://stackoverflow.com/comment/41451789
type: AcceptedAnswer
has body: It's telling me that my li is an illegal token. Still not sure what to do about this as I thought I was appending inside a ul You are using multi-line string literal for adding html. The line breaks need to be escaped, and this can be done via a backslash. Change to function commits(repo){ $('#listing').find('h3').text("Latest Commits to user/" + repo); return $.ajax({ type: 'GET', url: 'https://api.github.com/repos/user/' + repo + '/commits', error: function(xhr, status, error){ //var err = eval("(" + xhr.responseText + ")"); var err = JSON.parse(xhr.responseText); alert(err.Message); }, complete: function(commit_data){ for(var i = 0; i < 10; i++){ $('#listing').append( " "+ " "+ " "+ ""+ "" + commit_data.responseJSON[i].author.login + ""+ ""+ "" + ($.timeago(commit_data.responseJSON[i].commit.committer.date)) + " "+ "SHA: " + commit_data.responseJSON[i].sha + ""+ " "+ "" + commit_data.responseJSON[i].commit.message + ""+ " " ); } } }); }
score: 0
accepted answer of: http://stackoverflow.com/q/26400145
answers question: http://stackoverflow.com/q/26400145

http://stackoverflow.com/q/26384868
has title: Dynamic menu for a RichCombo box in CKEditor
has comment: http://stackoverflow.com/comment/47556459
has answer: http://stackoverflow.com/a/29721768
upvote count: 17
has comment: http://stackoverflow.com/comment/41783798
has body: I've written a plugin which adds a RichCombo box to my CKEditor. I want to be able to update the content in the ListBox within this RichCombo Here's my code. var merge_fields = []; CKEDITOR.plugins.add('mergefields', { requires: ['richcombo'], //, 'styles' ], init: function (editor) { var config = editor.config, lang = editor.lang.format; // Gets the list of tags from the settings. var tags = merge_fields; //new Array(); // Create style objects for all defined styles. editor.ui.addRichCombo('tokens', { label: "Merge", title: "title", voiceLabel: "voiceLabel", className: 'cke_format', multiSelect: false, panel: { css: [config.contentsCss, CKEDITOR.getUrl(CKEDITOR.skin.getPath('editor') + 'editor.css')], voiceLabel: lang.panelVoiceLabel }, init: function () { // this.startGroup("mergefields"); for (var this_tag in tags) { this.add(tags[this_tag], tags[this_tag], tags[this_tag]); } }, onClick: function (value) { editor.focus(); editor.fire('saveSnapshot'); editor.insertText(value); editor.fire('saveSnapshot'); } }); } }); Unfortunately this list is not update when merge_fields changes. Is there a way to reinitialize the plugin, or failing that remove it and re-add it with updated content? Note Id prefer NOT to have to remove the entire editor and replace it, as this looks very unpleasant to the user UPDATE As requested, here's a jsfiddle to help http://jsfiddle.net/q8r0dkc4/ In this JSFiddle, you'll see that the menu is dynamically created the first time it is accessed. It should should the checkboxes which are selected. However, every subsequent time it is accessed, it keeps the same values and is not updated. The only way to update it is to reinitialise the editor using the reinit button I have provided, but this causes the editor to disappear and reappear, so I don't want to have to do this. 200 points of a bounty to someone who can make the dropdown dynamically update EVERY TIME it is called.
downvote count: 0
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/7762810
score: 17
favorite count: 0
has comment: http://stackoverflow.com/comment/47552032
has answer: http://stackoverflow.com/a/29722429
type: Question
answer count: 2

http://stackoverflow.com/a/26472965
upvote count: 1
has comment: http://stackoverflow.com/comment/41583663
score: 1
answers question: http://stackoverflow.com/q/26472649
has body: This should work with a push, I don't see why this wouldn't work. Here is an example, I just used angular to easily display in HTML, not needed for what you are doing:http://plnkr.co/edit/PBCYxfjMqV3jzggMHJZ7?p=preview var people = [ { name: "Joe", surname: "surname" }, { group: "name", people: [{ name: "name", surname: "surname" }, { name: "name", surname: "surname" }] }, { name: "James", surname: "surname" } ]; var person = { name: "Jennifer", surname: "surname" }; people.push(person);
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41601061
type: Comment
type: QuestionComment
has text: okay leave my last part just answer the first part of question
score: 0
comment on: http://stackoverflow.com/q/26480615

http://stackoverflow.com/q/26456746
has body: I am using PhantomJS to screenshot a webpage. However the library calls to a hosted jQuery file to inject jQuery functionality in the page DOM to allow some manipulations. Seen here: http://phantomjs.org/api/webpage/method/include-js.html The code looks like this: if ( loaded ) { page.includeJs("http://code.jquery.com/jquery-1.8.3.min.js", function() { . . . I don't want to make an external call for JS because (a) it's slower and (b) its not reliable. I would like to use a local copy and I set that path as such but it is NOT loading in. page.includeJs("assets/javascript/jquery.min.js", function() { . . . What is the problem here? Why is my path not working as I expect it to? Does this function page.includeJs not allow relative paths?
answer count: 1
tagged with: javascript
favorite count: 0
has title: Phantomjs using a local file with page.includeJs?
downvote count: 1
type: UnansweredQuestion
tagged with: phantomjs
score: 7
has answer: http://stackoverflow.com/a/26456916
upvote count: 8
type: Question

http://stackoverflow.com/comment/41473396
has text: Which do you think is the most robust choice given the fact that I will have a windows machine running the web app on Chrome browser and a custom made Android app?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26412619
type: AnswerComment

http://stackoverflow.com/a/26362676
accepted answer of: http://stackoverflow.com/q/26362295
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26362295
type: Answer
has comment: http://stackoverflow.com/comment/41383110
has body: You need to do a return of the inner promise inside the first then, and then add that promise to the list. var valueRequests = []; angular.forEach(properties, function (property, key) { valueRequests.push(requestPropertyAttributes(property).then(function (result) { if (result.isList) { return requestPropertyList(property); } else { return requestPropertyValue(property); } })); }); $q.all(valueRequests).then(function () { //do sth. after all data was read });
score: 4
upvote count: 4

http://stackoverflow.com/comment/41467513
type: Comment
comment on: http://stackoverflow.com/a/26409424
type: AnswerComment
has text: Possibly clearer to use `forEach` to capture the specific file and avoid later problems of reading `tiles[i]` with the wrong `i`. Also it's specifically an `HTMLCollection` that is returned.
score: 0

http://stackoverflow.com/comment/41571833
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26466896
has text: There's allot of html which goes between the li's I cut most of it out as it's easier to read the code code that way.
score: 0

http://stackoverflow.com/comment/41601152
type: QuestionComment
comment on: http://stackoverflow.com/q/26482909
has text: Use `parseInt` method
score: 1
type: Comment

http://stackoverflow.com/q/26434214
has body: I am trying to require a file with browserify using variables passed into a function: var playersOptions = { name: 'players', ajax: 'team-overview', route: { name: 'overview', path: 'playersOverview', url: 'playersoverview' } }; var BackboneView = require(playersOptions.route.path); //Error: Uncaught Error: Cannot find module 'playersOverview' var BackboneView = require('playersOverview'); //Requires the file without any problems. I am confused as to why this would fail? How can it not find the module when both are strings?
has title: Require in browserify doesn't work variable name
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26434259
tagged with: browserify
accepted answer: http://stackoverflow.com/a/26434259
downvote count: 0
answer count: 1
favorite count: 0
score: 13
upvote count: 13
type: AnsweredQuestion

http://stackoverflow.com/q/26380468
tagged with: javascript
has answer: http://stackoverflow.com/a/31504333
upvote count: 3
has body: I'm using angular-ui-select and I have a question. How can I modify ui-select so it would be possible to add items manually - not only choosing from existing items in ng-model but adding a new element. Thank you in advance
favorite count: 0
has answer: http://stackoverflow.com/a/38926911
tagged with: angularjs
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/52550455
has title: Adding item to ui-select Angular
has answer: http://stackoverflow.com/a/26380550
has answer: http://stackoverflow.com/a/30624308
score: 3
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/38718044

http://stackoverflow.com/q/26369808
has answer: http://stackoverflow.com/a/26370022
type: AnsweredQuestion
downvote count: 1
type: Question
has title: Issue On Accessing to In Script JSON object in jQuery Ajax
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26370022
score: -1
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Can you please take a look at This Demo and let me know how to access to JSON object like credit which is declared inside the same requester script as: var credit = [{ "name": "John Johnson", "street": "Oslo West 16", "phone": "222 7894562" }, { "name": "Davie Amber", "street": "Alberta 52", "phone": "555 1234567" }, { "name": "Marck William", "street": "Delestre 125", "phone": "666 7254599" }]; $("button").click(function () { $.ajax({ url: "credit", success: function (result) { $("#div1").html(result); } }); }); I know in real world, there is no need to do this since is doable in simple JavaScript but for doing a specific test I need to provide the test environment like this which is running by $.ajax() method. Thanks
favorite count: 0
tagged with: ajax

http://stackoverflow.com/a/26418015
answers question: http://stackoverflow.com/q/26417705
has body: Need to Add the following line in Webservice.Before Starting Class [System.Web.Script.Services.ScriptService]
score: 0
type: Answer

http://stackoverflow.com/q/26429414
answer count: 0
downvote count: 0
score: 1
has title: Tracking the Size of Individual Divs, Making it Fluid
type: Question
has comment: http://stackoverflow.com/comment/41505051
tagged with: javascript
has comment: http://stackoverflow.com/comment/41516048
has body: In this framework I'm building, the JavaScript outputs a div block to the screen and uses a "rowTracker" in order to make sure to put the next div onto the next line once the screen cuts it off. The next step I'd like to take is to track the size of each individual div, and have the divs rearrange once the screen width resizes. It currently rearranges after refreshing the page. width = 200; height = 200; gutter = 20; rowTracker = new Array(); heightTracker = new Array(); widthTracker = new Array(); pageWidth = 0; $(document).ready(function(){ pageWidth = $(document).width(); // Assign pageWidth to document page width counter = 0; // Sets first counter counter2 = 0; // Sets second counter $("section.neo__content div").each(function(index,element){ // Loops or iterates for each div if(((counter + 1) * (width+gutter)) < pageWidth){ // If width + gutter of div is less than width of page $(this).css({"top":(1 * ( (rowTracker[counter]?rowTracker[counter]:0) + gutter)),"left":(counter * (width+gutter))}); // Places div into proper position depending on page width and 20px gutter rowTracker[counter] = ( (rowTracker[counter]?rowTracker[counter]:0) + $(this).height() + gutter); // Row tracker, array of counter heightTracker[counter] = ($(this).height()); // Gets height of div widthTracker[counter] = ($(this).width()); // Gets width of div counter++; // Increment counter for each div }else{ // If not, run this console.log(rowTracker); // Outputs heights of each row to console console.log(heightTracker); console.log(widthTracker); counter = 0; // Reset counter counter2++; // Second counter iterates throughout loop $(this).css({"top":(1 * ((rowTracker[counter]?rowTracker[counter]:0) + gutter)),"left":(counter * (width+gutter))}); rowTracker[counter] = ( (rowTracker[counter]?rowTracker[counter]:0) + $(this).height() + gutter); counter++; } }); }); * { margin: 0; padding: 0; text-decoration: none; border: 0; border: none; color: #333; font-size: 1.2em; } html, body { width: 100%; …
upvote count: 1
has comment: http://stackoverflow.com/comment/41508056
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41506844
favorite count: 0
has comment: http://stackoverflow.com/comment/41515254
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41503751
tagged with: fluid-layout

http://stackoverflow.com/a/26509848
type: Answer
has comment: http://stackoverflow.com/comment/41650030
accepted answer of: http://stackoverflow.com/q/26509477
has body: The problem here is with how the script is published, you have it set up to execute as you, so the items are created on your drive. Under the "Deploy as a web app..." settings check the option "Execute the app as" , the value needs to be "User accessing the web app" instead of "Me". See: https://developers.google.com/apps-script/guides/web#deploying_a_script_as_a_web_app
has comment: http://stackoverflow.com/comment/41649910
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26509477

http://stackoverflow.com/a/26364949
answers question: http://stackoverflow.com/q/26364745
has comment: http://stackoverflow.com/comment/41387748
type: Answer
downvote count: 2
has comment: http://stackoverflow.com/comment/41387709
has body: In general there shouldn't be a big waste of memory, because when you have var someArray = new Array(); someArray[0] = "stuff"; someArray[1] = "things"; someArray[10] = "more stuff"; someArray[20] = "other things"; someArray[100] = "far away stuff"; and then do this: alert(someArray[2]); The result would be null/undefined. Allocated memory is not undefined, it would be an empty String. There is a very detailed description to your problem here on stackoverflow i guess, but i had no time reading it. Check it out, maybe it helps you. Detailed Description
score: -2
upvote count: 0

http://stackoverflow.com/q/26431774
has body: I'm trying to implement the Smart Table module in my AngularJS app. I'd prefer this over some others mainly because the others seemed require a lot of boilerplate code in my controller and I like to keep my controllers as DRY as possible. But I'm open to other modules that can accomplish the same thing without boilerplate. It works great when dealing with a straight-up array of objects, but if some of those objects have nested objects, the filtering and sorting has strange behavior. This will take some explaining so bear with me. First of all, here is my array of nested objects (shortened for readability here): $scope.products = [ { 'display': 'Live', 'name': 'LC1D09', 'category': 'Motor Control', 'subcategory': 'Contactor', 'manufacturer': 'Telemecanique', 'specs': { 'phase': 3, 'poles': 3 }, 'new': { 'price': 158.95 }, 'refurbished': { 'price': 145 }, 'onlineStores': { 'amazon': true, 'ebay': false }, 'isCool': true }, { 'display': 'Pending', 'name': 'FA32020', 'category': 'Circuit Breaker', 'subcategory': 'Molded Case', 'manufacturer': 'Square D', 'specs': { 'phase': 1, 'poles': 2 }, 'new': { 'price': 217.79 }, 'refurbished': { 'price': 192.82 }, 'onlineStores': { 'amazon': true, 'ebay': true }, 'isCool': false } ]; $scope.displayedProducts = $scope.products; Here's my HTML: Name Category Subcategory Manufacturer New Price Refurb. Price Display Specs Cool Yes No {{product.name}} {{product.category}} {{product.subcategory}} {{product.manufacturer}} ${{product.new.price | number : 0}} ${{product.refurbished.price | number : 0}} {{product.display}} {{product.specs}} {{product.onlineStores.ebay}} So this all works fine if my array doesn't have nested objects. But with the nested objects (eg st-search="new.price" I get the following issues (see the screenshot): Sometimes when I enter text in a "nested object" search field, all other fields that also have nested objects inherit the same value (but the filtering still works fine). This doesn't always do this, just somet…
downvote count: 0
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41737911
score: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/27973502
favorite count: 0
tagged with: smart-table
has title: AngularJS smart-table strange behavior with nested objects and st-search
upvote count: 5
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28371466
has comment: http://stackoverflow.com/comment/53139991

http://stackoverflow.com/comment/41468318
type: Comment
has text: ok, how can I do that? and it needs to change everytime a box gets checked. That is why I was using jquery to do it.
score: 0
comment on: http://stackoverflow.com/q/26409987
type: QuestionComment

http://stackoverflow.com/a/34853838
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26385618
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26385618
type: Answer
has body: Use node.js and execute your script using Runtime.exec(). you would run node on this or you can go for Rhino scripting engine to envoke methods in .js file from within a java class. Hope that helped.
score: 1

series
tag name: series
type: Tag
tags question: http://stackoverflow.com/q/26492796

http://stackoverflow.com/comment/41414854
score: 0
has text: I'm not sure of your exact criteria for "plaintext post". Does it mean that the only child element is a `p.text`? Or does it mean that there is neither a `div.vid` nor a `img` descendant (direct child)? You decide.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26379831

http://stackoverflow.com/q/26501566
score: -1
upvote count: 2
answer count: 2
downvote count: 3
has comment: http://stackoverflow.com/comment/41635203
has answer: http://stackoverflow.com/a/26501702
tagged with: if-statement
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41635255
has comment: http://stackoverflow.com/comment/41635482
favorite count: 0
type: Question
has body: You know what are the differences between the control structure in Javascript and control structure in PHP? Both use the if / else, for or while, but that vary in that change? Are two different programming languages ​​but there are differences in the part of "control structure" in the syntax although both are similar. Examples Javascript control structure &lt;script type="text/javascript"&gt; var a = 5; var b = 8; if (a &lt; b) { alert(a +" is smaller than " +b); } &lt;/script&gt; PHP control structure &lt;?php // Number comparison $a = 5; $b = 8; if ($a &lt; $b) { echo $a ."is smaller than" .$b; } // Result : 5 is smaller than 8 ?&gt; Thanks
has answer: http://stackoverflow.com/a/26501950
tagged with: php
has title: Differences between the control structures php and control structures javascript

http://stackoverflow.com/comment/41441698
has text: Why the javascript isn't available in the scope of the Create function?
type: Comment
comment on: http://stackoverflow.com/a/26394766
score: 0
type: AnswerComment

http://stackoverflow.com/q/26504743
has title: Extract div data from HTML raw DIV text via JS
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26505114
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41640724
type: Question
accepted answer: http://stackoverflow.com/a/26504965
has comment: http://stackoverflow.com/comment/41641048
tagged with: javascript
has answer: http://stackoverflow.com/a/26505114
has body: I'm trying to extract data from a JS function that only renders an element's HTML - and I need the element's ID or class. Example: JS Element Value: x = ' Toate (75) '; I need to do get the element's id or class (in this case the id would be myId). Is there any way to do this? Strip the tags or extract the text via strstr? Thank you
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26504965
linked to: http://stackoverflow.com/q/16559171

http://stackoverflow.com/q/26454483
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26454670
type: Question
has body: I'm trying to slide a div from the left to the right side when the 'submit' button is clicked. After a little pause, the div would automatically slides back to it's original position. Currently it goes to the right side but it isn't coming back to the left corner. CSS #mainform{ position: absolute; display: block; padding-top:20px; font-family: 'Fauna One', serif; } HTML Contact Form JS $(document).ready(function() { $('#submit').click(function(e) { reslide(); function reslide() { $('#mainform').delay().animate({width: '510px', left: '1050'}, 600).delay(5000).animate({width: '510px', right: '1000px'}, 200, function() { setTimeout(reslide, 3000); }); } $('.hello').fadeIn(1500); $("Successfully send").appendTo(".hello"); $('.hello').fadeOut(2500); }); });
tagged with: javascript
tagged with: jquery
has title: jQuery div animate from left to right and comes back after pause
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26454658
type: UnansweredQuestion

http://stackoverflow.com/comment/41562350
has text: *\*Nods** Fair point
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26461542
score: 0

http://stackoverflow.com/comment/59385105
score: 1
has text: if you got answer then could you post it?
comment on: http://stackoverflow.com/q/26469794
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41553359
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26456438
has text: How so? Can you post an example please?

http://stackoverflow.com/comment/41458668
score: 0
type: Comment
type: QuestionComment
has text: Yes but most of the content looks odd. So, definitely I need to call another html page.
comment on: http://stackoverflow.com/q/26404812

http://stackoverflow.com/q/26463972
has answer: http://stackoverflow.com/a/26466000
has body: I am trying to create a custom event for toggling with Angular. The directive is called toggleable. It sounds trivial at first, but tricky bit is that i want to be able to to use any button or link on the page for toggling. The code i have written is as below Directive 'use strict'; angular.module('onsComponents') .directive('togglable', function() { return { restrict: 'A', transclude: true, scope: { togglerId: '@', show: '@' }, link: function(scope, element, attrs) { if (!scope.togglerId) { console.error("Toggler id must be given") return } scope.visible = (scope.show === 'true') scope.toggle = function() { alert("Before " + scope.visible) scope.visible = !scope.visible alert("After " + scope.visible) } //Bind click event to given dom element angular.element('#' + scope.togglerId).bind("click", function() { scope.toggle() }) }, templateUrl: 'app/components/toggler/toggler.html' } }) The Template The View Click me to toggle Hey The toggle link seems to be working. I can see the alerts when the link is clicked. The trouble is the content does not appear. It seems like the link is not really is in the same scope with the content, another scope is created when i do this. If i move the click link within the template as below, it works. But that is not really what i want. Click me to toggle So how can i achieve that ?
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41566505
has title: Angular directive, binding click event to outside element not working
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26464256
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41568729
has answer: http://stackoverflow.com/a/26464256
type: Question
accepted answer: http://stackoverflow.com/a/26466000
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41569224
tagged with: javascript
tagged with: angularjs-scope

http://stackoverflow.com/a/26492770
has body: Debugged into the masonry source code and figured out the cause, it's how the elements got prepared that matters - each of the element that got pushed to the elements array should be an HTMLElement. And once I got that fixed, the issue was gone.
answers question: http://stackoverflow.com/q/26475562
score: 0
type: Answer

http://stackoverflow.com/q/26506008
has title: How to make CrossUI TreeView editable?
type: AnsweredQuestion
has body: Is there an item property to enable the edit mode like UIBuilder so that user can rename the item caption?
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26530105
accepted answer: http://stackoverflow.com/a/26530105
tagged with: javascript
score: 0
upvote count: 1
answer count: 1
tagged with: web-frameworks
favorite count: 0

http://stackoverflow.com/comment/41523426
comment on: http://stackoverflow.com/a/26439805
has text: He wrote a comment for it, but it takes less space though is that better in anyway?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41473389
score: 0
comment on: http://stackoverflow.com/q/26412592
has text: By the way, your first question is not the same as the code sample you've given. if you use `$('#foo .bar').on('click', function(){/*...*/})` or `$('#foo').find('.bar').on('click', function(){/*...*/})`, they do the exact same thing.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26397326
downvote count: 0
answers question: http://stackoverflow.com/q/26397317
type: Answer
score: 2
upvote count: 2
has body: $( "input[myattr='navo']" ) returns a jQuery object, not a dom element so it doesn't have a property called value. You need to use the various methods provided by jQuery on the jQuery object. In this case you can use the .val() method to get/set the value of an input element $(document).ready(function() { alert($("input[myattr='navo']").val()); $("input[myattr='navo']").val("Simon Commission"); alert($("input[myattr='navo']").val()); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="text" myattr='navo' value="Morley Minto Reform" /&gt;

http://stackoverflow.com/comment/41436304
has text: Also you should close the line that includes jQuery properly by using ` ` instead of `</scipt>` (maybe the browser is smart enough to know that before ` ` goes so it works it in the same fashion as ` ` does).
type: QuestionComment
comment on: http://stackoverflow.com/q/26391522
score: 1
type: Comment

http://stackoverflow.com/a/26473411
upvote count: 2
has comment: http://stackoverflow.com/comment/41598679
type: AcceptedAnswer
has body: It is difficult to tell without more code but I have seen people have problems in WinJS when they don't call Binding.processAll in their code app.onactivated = function (args) { // Other activation code ... var personDiv = document.querySelector('#nameSpan'); WinJS.Binding.processAll(personDiv, person); var bindingSource = WinJS.Binding.as(person); } In general you can resolve most of the issues referencing these two tutorials but if you feel you have gotten this all correct, we need some more code to help! Ref: http://msdn.microsoft.com/en-us/library/windows/apps/hh700358.aspx , http://msdn.microsoft.com/en-us/library/windows/apps/Hh700356.aspx In your case you can define a namespace and your data as follows: "use strict"; WinJS.Namespace.define("MyAppData", { items: new WinJS.Binding.List([ { AccountType: "Internal", Index: 1, Requirements: "Do something to something else", Rework: true, State: "onHold", LoadHours: "5.7" }, { AccountType: "Retail", Index: 2, Requirements: "Watch something for a duration of time", Rework: true, State: "complete", LoadHours: "2.1" } ]) }); Then wire this to your controls like this:
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41596956
answers question: http://stackoverflow.com/q/26428263
accepted answer of: http://stackoverflow.com/q/26428263

jqbootstrapvalidation
type: Tag
tag name: jqbootstrapvalidation
tags question: http://stackoverflow.com/q/26509989

http://stackoverflow.com/q/26433188
downvote count: 3
has answer: http://stackoverflow.com/a/26468450
has comment: http://stackoverflow.com/comment/41575129
has title: Why submitting a form overrides setting location.href in a submit button click handler?
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41581105
has comment: http://stackoverflow.com/comment/41575505
has body: This question is inspired by this post. In a nutshell: Why window.location.href is not redirecting to a new page (example.com) when executing the code below? I've always believed, that setting window.location.href immediately loads a new page, but in this case it doesn't. Submitting the form just reloads the page instead, and setting a new location seems to be totally ignored. Why? How? What I'm missing here? Please notice, that I'm aware of several ways how to prevent form submitting in this case, rather I'd like to know, why setting location.href is ignored, what is the mechanism behind the behavior? I've tried to search explanation from the standard, but haven't found anything so far. Additional information This seems to happen in all major browsers (Chrome, Firefox, IE11, Edge ...), but not when the code is run in a Stack snippet (because it's sandboxed, and won't send forms anyway). A console.log put in the function shows, that the click handler is executed before the actual submission is executed. A jsFiddle reproducing the issue.
has comment: http://stackoverflow.com/comment/41575172
tagged with: javascript
tagged with: dom-events
linked to: http://stackoverflow.com/q/26430575
has answer: http://stackoverflow.com/a/26468448
answer count: 3
tagged with: submit
has comment: http://stackoverflow.com/comment/41574719
score: 1
has comment: http://stackoverflow.com/comment/41575620
favorite count: 0
has comment: http://stackoverflow.com/comment/41574610
has comment: http://stackoverflow.com/comment/41576614
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26742171
has comment: http://stackoverflow.com/comment/41575204

http://stackoverflow.com/q/26416936
has comment: http://stackoverflow.com/comment/41481020
score: 0
has body: is there a way to know the class name of an object in javascript that is coming from java using websockets. the classes are sent as json. in javascript i parse the message as: var chatMessage = JSON.parse(frame.body); and in java i send the object as: //chatMessage is ChatMessage object; template.convertAndSend("/topic/chat", chatMessage); the constructor function in javascript returns "object" only. how can i get "ChatMessage" class in javascript? or should make a ChatMessage object in javascript then use the instanceof operator? the data comes from the server is json: [{"sender":"user","message":"test"},{"sender":"user","message":"asd"},{"sender":"user","message":"test2"}] console.log(chatMessage) output: [Object, Object, Object, Object, Object, Object]
has comment: http://stackoverflow.com/comment/41481094
has title: java object to javascript object websockets
has comment: http://stackoverflow.com/comment/41481073
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41481091
answer count: 0
tagged with: java
type: Question
tagged with: javascript

http://stackoverflow.com/a/26397028
answers question: http://stackoverflow.com/q/26396924
upvote count: 1
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41445192
has body: You could also add a condition checking if the button has already been clicked by setting a variable to true after it has been clicked: window.document_clicked = false; $(document).on('click', '#button1', function(e){ if(!window.document_clicked){ $.ajax({ url: 'http://www.page.com', data: data, method: 'POST', success: function(data){ window.document_clicked = true; }, error: function(err){ } }); } });

http://stackoverflow.com/q/26479367
favorite count: 0
tagged with: accessibility
type: Question
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27475963
type: UnansweredQuestion
has title: Accessibility issues with modifying DOM with JavaScript/jQuery
has comment: http://stackoverflow.com/comment/41597425
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
has body: I am developing a website for a report. The majority of the report fits within a column that can be no larger than 800px. However there are a couple of sections of the report that include tables that are just so detailed it is impossible to fit within that space. The solution I am considering is to use JavaScript/jQuery to detect tables that are too large for the column and turn them into links, that when clicked, brings up a light box using more available screen space and displays the table. This does not seem to difficult to do… but then I started considering accessibility. So after detecting the oversized tables should I cut them out of the DOM and store them in a variable or should I hide them? Do accessibility devices such as screen readers use the original source or do they respect changes made by Javascript?

http://stackoverflow.com/comment/41399669
comment on: http://stackoverflow.com/q/26361829
has text: i have set the set_time_limit(0) and ini_set('max_execution_time', '0'). the server browser still goes back to previous page. it is not a browser setting since i've spoken to the server tech and they told me its an apache setting and they won't make it longer to avoid bad scripts. it is also not a memory issue since i've set it to 4000 (checked whit echo ini_get both values and they change corectly)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41445823
comment on: http://stackoverflow.com/q/26397308
type: QuestionComment
type: Comment
score: 1
has text: Note that parseInt and `-` have slightly different behavior. Try with a key of `"010"`. This is why parseInt should generally always be used with a radix (or conversion should be forced through other means).

http://stackoverflow.com/q/26463244
accepted answer: http://stackoverflow.com/a/26465151
upvote count: 2
tagged with: three.js
type: Question
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26465151
has body: Is it possible to increase the scale of a cylinder on the Y-axis from a specific point. As instead of the cylinder growing from its origin up and down to the new scale, growing from the top upwards/downwards only like a bar chart. Current code : function animate() { render(); cylinder.scale.y += 0.1; requestAnimationFrame(animate); }
answer count: 1
downvote count: 0
tagged with: javascript
has title: Three.js - scale cylinder from point
favorite count: 0

http://stackoverflow.com/comment/41593222
score: 2
has text: http://jsfiddle.net/Ld5oque8/ - as you can see the width is calculated as a function of time here
comment on: http://stackoverflow.com/q/26478112
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26498043
tagged with: parsing
has answer: http://stackoverflow.com/a/26498063
has answer: http://stackoverflow.com/a/26498093
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26498098
tagged with: http://stackoverflow.com/tag/json
type: Question
possible better answer: http://stackoverflow.com/a/26498063
tagged with: javascript
has answer: http://stackoverflow.com/a/26498348
has comment: http://stackoverflow.com/comment/41628881
has body: I have big json string that is decoded from decodeURIComponent() function. Now I am trying to parse this string to Json object using JSON.parse() function. When i run, it says 'unexpected syntax token m'. I have two doubts here 1. Is there any better tool to get the syntax corrections as it is a large string. 2. When I give the same json string to validate in this url "http://jsonviewer.stack.hu", I am getting valid json object.. how is this possible. The valid json object which I m getting in point 2 is what I would need in my program. Please give me some suggestions on how to resolve this. here is my json string: https://drive.google.com/file/d/0Bz0478Hh7tBqS0pXUTBMTVFPZzA/view?usp=sharing
score: 0
accepted answer: http://stackoverflow.com/a/26498093
has title: parsing json using JSON.parse() throws error

http://stackoverflow.com/q/26413191
score: 0
has comment: http://stackoverflow.com/comment/41494048
tagged with: destroy
has title: Destroy Function in Ruby On Rails does not work (Another thread)
tagged with: javascript
has body: before I opened this post I read a lot of post on stackoverflow and I tried the solutions... from: Ruby on Rails: Why the confirmation message does not appear in "link_to('delete', ...)"? and Ruby on Rails: Why the confirmation message does not appear in "link_to('delete', ...)"? I'm really confused because following the tutorial on the book https://www.railstutorial.org/book/toy_app but I have the other version where the toy_app is called demo_app I don't know if it is a problem of compatibilty but almost every step I do I need to research to solve one configuration error... you know, change sqlite3-ruby for sqlite and so on... Now I'm on the same problem of others, Destroy Function in Ruby On Rails does not work, I tryed various solution and I can´t make it. My configuration is: Windows 7 64 bits Rails 3.2.19 Ruby 1.9.3 HTML destroy code is: Destroy and my application.html.erb is DemoApp <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> <%= javascript_include_tag 'jquery_ujs' %> <%= csrf_meta_tags %> <%= yield %> application.js looks like // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // = require jquery = require jquery_ujs //= require_tree . And I checked Chrome and Internet Explorer and on both of them Javascript is enabled... What more can I do?? Thanks
has comment: http://stackoverflow.com/comment/41491116
answer count: 0
has comment: http://stackoverflow.com/comment/41493326
has comment: http://stackoverflow.com/comment/41474418
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41494023
tagged with: ruby-on-rails
linked to: http://stackoverflow.com/q/4437991
type: Question

shopify
tags question: http://stackoverflow.com/q/26412955
tags question: http://stackoverflow.com/q/26440014
tags question: http://stackoverflow.com/q/26496823
tags question: http://stackoverflow.com/q/26497501
tag name: shopify
type: Tag
tags question: http://stackoverflow.com/q/26379057
tags question: http://stackoverflow.com/q/26405657
tags question: http://stackoverflow.com/q/26438825

http://stackoverflow.com/a/26370040
has comment: http://stackoverflow.com/comment/41397343
has comment: http://stackoverflow.com/comment/41397402
has body: window.setInterval(function(){ /// call your function here }, 5000); You probably need to call location.reload(); as well.
answers question: http://stackoverflow.com/q/26369940
type: Answer
has comment: http://stackoverflow.com/comment/41397481
score: 0

http://stackoverflow.com/q/26445954
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41534490
type: Question
score: 0
has title: .toggle() not setting display to none?
has comment: http://stackoverflow.com/comment/41534651
answer count: 1
accepted answer: http://stackoverflow.com/a/26446048
has comment: http://stackoverflow.com/comment/41534610
has body: Whilst creating a jQuery dropdown menu i ran in to a most peculiar problem - an element that has been hidden is still affecting the page. Why is this happening, and how can I fix it? It is affecting the functionality by blocking part of the button, forcing one to call the function from a unblocked part. For example; Start Animation EDIT: set the top setting to ten px to completely cover up the button if you can't see the problem.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41534583
has comment: http://stackoverflow.com/comment/41534560
has answer: http://stackoverflow.com/a/26446048

http://stackoverflow.com/comment/41392244
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26366732
type: Comment
has text: what's the id that I should give in here document.getElementById('scripthere'). not clear. There's no id for external scriptthat I see

http://stackoverflow.com/q/26461504
has title: keydown event does not fire correctly using jQuery trigger
type: Question
has answer: http://stackoverflow.com/a/26461581
accepted answer: http://stackoverflow.com/a/26461581
answer count: 1
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: events
has body: Please consider this code: 1 2 3 nima and javascript: $(document).ready(function () { $("#Button1").click(function () { var e = jQuery.Event("keydown"); e.which = 9; // # Some key code value e.keyCode = 9; $("#TextBox1").trigger(e); }); $("#TextBox1").on("keydown", function (e) { alert(e.keyCode); }); }); the problem is when I press TAB on TextBox1 I get message "9" for keyCode and Textbox2 get focus. but when I press Button1 I get message "9" for keyCode but Textbox2 does not get focus. Where is my mistake? thanks Live Demo
favorite count: 0
downvote count: 0
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/26438274

http://stackoverflow.com/q/26497720
possible better answer: http://stackoverflow.com/a/26497884
has comment: http://stackoverflow.com/comment/41628865
type: Question
has comment: http://stackoverflow.com/comment/41628698
answer count: 2
has comment: http://stackoverflow.com/comment/41628515
has comment: http://stackoverflow.com/comment/41628608
has body: Being a longtime classical inheritance OO programmer I'm very comfortable with the use of constructors and creating objects that accept required parameters as constructor arguments. For example, an object that sends alerts related to an order might look like: var orderNotifier = function(orderId, notifier, recipients) { this.notifyApproved = function() { // use the notifier object passed as ctor param to send notifications // related to orderId to recipients } this.notifySomeOtherEvent = function() { // use the ctor params again } } // then use it like var on = new orderNotifier(12345, new BasicNotifier(), someArrayOfEmails); on.notifyApproved(); So that is a contrived example but exemplifies (IMHO) the value of a parameterized constructor. Specifically: Passing state to the object in a single statement Simplified method signatures Internal state is hidden Appreciating that the constructor creation pattern in JavaScript doesn't very well support information hiding, I was attracted to the Immediately Invoked Function Expressions (IIFE) pattern with its closures and stronger access control. Now I've run up against the fact that I can't pass object construction parameters using the IIFE pattern, or at least I don't understand how I can. I know you can pass parameters to the anonymous function like so: (function(param){})(someVar); But that isn't the same as explicitly creating a new object and passing parameters to the constructor. By the very nature of the IIFE pattern I don't necessarily have the data to pass to the object yet. My IIFE version of the above would like like: var orderNotifier = (function() { var privateHelperMethod = function() { return 'blahblahblah'; }; return { notifyApproved: function(orderId, notifier, recipient) { // use the notifier object passed as ctor param to send notifications // related to orderId to recipients var msg = privateHelperMethod() }, notifySomeOtherEvent: function(orderId, notifier, recipient) { // use the ctor params again var…
has comment: http://stackoverflow.com/comment/41628630
has comment: http://stackoverflow.com/comment/41628796
upvote count: 7
has answer: http://stackoverflow.com/a/26498022
has title: IIFE creation pattern - but how to support constructor parameters?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41628699
has comment: http://stackoverflow.com/comment/41628343
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26497884
downvote count: 0
score: 7
favorite count: 0
accepted answer: http://stackoverflow.com/a/26498022
has comment: http://stackoverflow.com/comment/41628539

http://stackoverflow.com/a/26388066
has comment: http://stackoverflow.com/comment/41430142
has comment: http://stackoverflow.com/comment/41430647
has comment: http://stackoverflow.com/comment/41430144
has body: To get the byte[] representation of a file, I would look at the Apache FileUtils library, specifically the org.apache.commons.io.FileUtils.readFileToByteArray(java.io.File file) method. To get the String representation of the file, use org.apache.commons.io.FileUtils.readFileToString(java.io.File file) (You also need to know about java files.) Also, the java.sql.PreparedStatement object guards against SQL injection attacks.
has comment: http://stackoverflow.com/comment/41430260
has comment: http://stackoverflow.com/comment/41429985
has comment: http://stackoverflow.com/comment/41430298
answers question: http://stackoverflow.com/q/26387743
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41430030
has comment: http://stackoverflow.com/comment/41430059

http://stackoverflow.com/a/26431124
answers question: http://stackoverflow.com/q/26430716
type: Answer
has body: I would suggest assigning a CSS class ("InputClassName" in this example) to the inputs you want to validate against - and then changing your code to something like this: inputs = form.getElementsByClassName('InputClassName'); for (index = 0; index &lt; inputs.length; ++index) { if (inputs[index].value==null || inputs[index].value=="" || inputs[index].value.length &lt; 6)) { alert("Field must be 6 characters or more"); return false; } } The advantage of this approach is that you can add radio buttons or checkboxes WITHOUT the "InputClassName" class - that have values less than 6 characters and your logic will still work. With the current setup, your logic would break.
score: 0

http://stackoverflow.com/comment/41510845
type: QuestionComment
type: Comment
has text: See also: [What exactly is a Node.js event loop tick](http://stackoverflow.com/a/19823583/201952)
score: 1
comment on: http://stackoverflow.com/q/26431146

http://stackoverflow.com/comment/41724190
comment on: http://stackoverflow.com/q/26510561
type: QuestionComment
has text: Further investigation showed me that the code above has to be put in my index file before my script imports in order for it to work... It seems like ng-view may be getting loaded after the scripts after all.
score: 0
type: Comment

http://stackoverflow.com/q/26355560
has comment: http://stackoverflow.com/comment/41370310
has body: I have to process a JS Uint8ClampedArray. When I print the full array with document.write(data) the result is fine, but when I access to the first item document.write(data[0]) the result is some undefined and wrong numbers. The array is created like this: var myArray = new ArrayBuffer(imgData.data.length); var data = new Uint8ClampedArray(myArray); data=httpRequest.responseText; The information comes from a C cgi program which prints binary data this way: for(int i = 0; i&lt;len; i++) printf("%u", input[i]);
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1645847
answer count: 0
score: 0
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41370099
has comment: http://stackoverflow.com/comment/41371795
has title: Entire JavaScript array prints OK, but not one cell

conflict
tag name: conflict
type: Tag
tags question: http://stackoverflow.com/q/26442596
tags question: http://stackoverflow.com/q/26469067

http://stackoverflow.com/comment/41495828
comment on: http://stackoverflow.com/q/26425308
type: Comment
type: QuestionComment
score: 0
has text: What format is the MySQL data column?

http://stackoverflow.com/comment/41618529
comment on: http://stackoverflow.com/q/26492308
type: Comment
type: QuestionComment
score: 0
has text: @Likwid_T Yes, typo. Good catch. Am correcting.

http://stackoverflow.com/q/26387676
has comment: http://stackoverflow.com/comment/41429430
has comment: http://stackoverflow.com/comment/41429683
answer count: 1
tagged with: javascript
has title: Passing a variable into an other function ( jeasyui )
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26388348
score: 0
has comment: http://stackoverflow.com/comment/41429465
has comment: http://stackoverflow.com/comment/41429501
has comment: http://stackoverflow.com/comment/41429350
has comment: http://stackoverflow.com/comment/41429571
has comment: http://stackoverflow.com/comment/41429497
has body: Hello, I have been desperately trying to pass a variable between functions, I have tried some solutions but they didn't worked - maybe I do it wrong. I got no ideas how to solve this, this might be trivial for some of you, looking forward a help. How does it work : The input radio's are supposed to add a parameter in the url ( queryParams - all should be ok according to the documentation ), I call it a additional filter for displaying specified data. When you click a radio script gets the value and should attach it to the queryParams. If you have more questions don't hesitate to ask. Radio1 Radio2 Radio3 $("li").on("click", "input", function () { $('#dg').datagrid('reload'); //reloads the grid alert($(this).val()); //gets the value of input type radio globalVar = $(this).val(); //assign the value to a global variable $('#string').html(globalVar); }); $('#dg').datagrid({ url: 'data_loader.php', queryParams: { //this adds to the url ?ltype=valur ltype: globalVar //assign the global variable here } }); //$('#string2').html(globalVar); JSFiddle example.
tagged with: jquery-easyui
has comment: http://stackoverflow.com/comment/41430340
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26388348
has comment: http://stackoverflow.com/comment/41429547
has comment: http://stackoverflow.com/comment/41429928
type: Question

http://stackoverflow.com/q/26509872
has body: I am animating an SVG, to translate a logo when a button is clicked, and to translate it back when another button is clicked. This works smoothly on all devices other than IOS devices, ipad and iphone (no matter which browser). On ios the logo will move up once, then won't move up again once it's come back down. See this example www.saminaraza.com/fpd/fpd.html Is there a known issue? Is there an issue with the code, or will I have to come up with a workaround? Thanks
has answer: http://stackoverflow.com/a/26523853
type: Question
tagged with: ios
tagged with: javascript
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has title: SVG animation translate bug in IOS?
has answer: http://stackoverflow.com/a/37580510

http://stackoverflow.com/comment/41396989
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26369792
has text: This may help: http://www.sitepoint.com/html5-javascript-mouse-wheel/

http://stackoverflow.com/comment/41467320
score: 0
comment on: http://stackoverflow.com/q/26409331
type: Comment
type: QuestionComment
has text: Yes, that should do it.

http://stackoverflow.com/q/26403023
accepted answer: http://stackoverflow.com/a/26404784
type: Question
answer count: 2
tagged with: javascript
has title: The correct way to load third party scripts?
score: 0
has answer: http://stackoverflow.com/a/26404784
has answer: http://stackoverflow.com/a/26403292
has body: With a bit of help from Stackoverflow I've managed to display blog content from Tumblr on my own website. I've noticed that if the Tumblr site is slow, it effects the page loading speed of my own website. I found this article on javascript.info. The article recommends using this code to create a variable of the external script URL. var script = document.createElement('script') script.src = 'http://ads.com/buyme?rand='+Math.random() // now append the script into HEAD, it will fetched and executed document.documentElement.firstChild.appendChild(script) I (kind of) understand what's happening in the first two lines, but I don't understand how to use the last bit of the code: document.documentElement.firstChild.appendChild(script) How would I add the script variable into the src of the script? Hope someone can help, this'd be useful for other third party scripts on my site. UPDATE Thanks to 'The Spooniest' for helping with this (see thread below). I was having problems getting this to work with my current page, so I decided to strip it down and create a basic page to see if I could get just this script working. The code below works, it drops the Javascript just before the tag. Great! However there's somehting that bothers me when I inspect the page (using Dev Tools) I see this warning: Uncaught SyntaxError: Unexpected token < ?rand=0.9741437959019095:1 Any ideas why this appears? Is it a problem? Demo A basic page UDATE 2 Figured out what the problem was. The URL in the script wasn't a .js file. When I enter a URL linking to a .js file (which I want) it works a treat!
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26403292

http://stackoverflow.com/a/26370832
has comment: http://stackoverflow.com/comment/41399505
upvote count: 1
has comment: http://stackoverflow.com/comment/41399294
type: Answer
has comment: http://stackoverflow.com/comment/41398805
has comment: http://stackoverflow.com/comment/41399058
has comment: http://stackoverflow.com/comment/41399274
has body: window.location.href is a string. setting the onClick to a string will do nothing, because you haven't told it to do anything. For example, if you want onClick to alert() a string, this is how you'd do it: Button Example: http://jsfiddle.net/vyyw3ynp/1/ Edit: printing via document.write() Button Example: http://jsfiddle.net/vyyw3ynp/3/
has comment: http://stackoverflow.com/comment/41399361
answers question: http://stackoverflow.com/q/26370733
downvote count: 0
has comment: http://stackoverflow.com/comment/41398956
score: 1

http://stackoverflow.com/comment/41475436
type: QuestionComment
comment on: http://stackoverflow.com/q/26413598
score: 0
type: Comment
has text: what, I though it was a plain JS codes right?

http://stackoverflow.com/comment/41490957
comment on: http://stackoverflow.com/a/26422758
score: 0
type: AnswerComment
has text: You'r welcome, please mark the answer as right if you feel it solved your problem.
type: Comment

http://stackoverflow.com/comment/41410012
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26377258
type: Comment
has text: Works great, just what I needed.

http://stackoverflow.com/q/26365113
possible better answer: http://stackoverflow.com/a/26366904
has title: How to use an iterator as is in the ECMA6 proposal?
upvote count: 1
has answer: http://stackoverflow.com/a/26367425
has body: I'm trying to figure out how it is intended to use the iterators as defined in the current ECMA6 draft. The iterator is proposed as follows: function makeIterator(array){ var nextIndex = 0; return { next: function(){ return nextIndex &lt; array.length ? {value: array[nextIndex++], done: false} : {done: true}; } } } I feel like I'm missing out something, because this would mean you have to use it in this fashion: var it = makeIterator(someArray); var current = it.next(); while (current.done !== true){ console.log(current.value); current = it.next(); } Because, of course, something like this does skip values: var it = makeIterator(someArray); while (it.next().done !== true){ console.log(it.next().value); } Coming from a Java world I'm confused to why they did not include a hasNext function. Because this would allow the following usage: function makeBetterIterator(array){ var nextIndex = 0; return { next: function(){ return nextIndex &lt; array.length ? {value: array[nextIndex++], done: false} : {done: true}; }, hasNext: function(){ if(nextIndex &lt; array.length){ return true; }else{ return false; } } } } var someArray = ["one", "two", "three", "four", "five"]; var it = makeBetterIterator(someArray) while (it.hasNext() === true){ console.log(it.next().value); } Is there simpler way to use iterators or is that how it's supposed to be done? If there is no simpler way, why are iterators proposed like this when there's clearly a better solution?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/46264644
score: 1
type: Question
tagged with: ecmascript-6
tagged with: iterator
accepted answer: http://stackoverflow.com/a/26367425
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26366904
favorite count: 0
answer count: 3

http://stackoverflow.com/comment/41523244
type: QuestionComment
comment on: http://stackoverflow.com/q/26439695
has text: maybe you should learn some javascript first?
score: 0
type: Comment

http://stackoverflow.com/q/26483812
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: validation
has title: Jquery validation for disabled selectbox
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I am using jQuery validation for my application.I have a form that having 2 select boxes.The second select box is disabled according to the first select box value. Also these boxes are coming under an add more functionality. So the form may have multiple such boxes. Thus I am added the validation rules using addClassRules. example code is below. $.validator.addClassRules("classname", { required: true}); The validation working fine. I want to remove the validation for second dropdown when the first dropdown having a specific value. Currently I have the following issue once the validation works change the dropdown value second box disabled. click on the second dropdown and then click on out side the error message displayed for second dropdwon. Form will submit when click on submit button. I have tried with $('form').validate({ignore:":disabled"}); inside first dropdown's onchange function. but it is not working. I hope will get a solution for this problem. Thanks in advance
has comment: http://stackoverflow.com/comment/41708975
answer count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
tagged with: forms
has comment: http://stackoverflow.com/comment/41603377

http://stackoverflow.com/comment/63781699
has text: Hi @dave, and thanks for the heads up. I'll edit and resubmit.
comment on: http://stackoverflow.com/a/29931389
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26395145
has body: var obj = { "#cuidado" : $("#cuidamos").offset().top - 490, "#sabor" : $("#productos").offset().top - 490, "#locat" : $("#encuentranos").offset().top - 490 }; $(window).scroll(function () { $.each(arr , function(key, val) { if ($(window).scrollTop() &gt; val) { $(key).fadeIn(); }else{ $(key).fadeOut(); } }); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26394851

http://stackoverflow.com/comment/41620279
score: 0
comment on: http://stackoverflow.com/a/26493191
type: AnswerComment
has text: @user3447014 background color will be gray according to this code - change gray to any other color and it should change the background color.
type: Comment

http://stackoverflow.com/comment/41591737
type: QuestionComment
has text: no. I want text not integer. I tried to review the link before but not working. see my code I used ajax jquery and I got the text and since I'm using form_open_multipart, the script cannot be applicable to get the text value
comment on: http://stackoverflow.com/q/26462023
score: 0
type: Comment

http://stackoverflow.com/comment/41542125
score: 0
type: Comment
type: QuestionComment
has text: @George Thanks for the correction! I do not know what I was thinking! :-)
comment on: http://stackoverflow.com/q/26442698

http://stackoverflow.com/comment/41607267
comment on: http://stackoverflow.com/q/26486482
score: 0
type: Comment
type: QuestionComment
has text: How specifically does this fail? When you step through this in a debugger, where does the observed behavior differ from the expected behavior? Is the `myHTML` string being created the way you expect? Is it being set to the `div`? How exactly does this not work?

http://stackoverflow.com/q/26369171
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26370006
score: 0
answer count: 2
tagged with: jquery-tooltip
has answer: http://stackoverflow.com/a/26370006
tagged with: javascript
has body: So basically, I'm trying to create a form that shows tooltips on mouseover. Once one of the fields has been clicked, I want to disable the cursor from triggering other tooltips. Once the user clicks outside of the text box, I want the mouse to resume triggering tooltips. My problem - I've got everything working, except I can't turn the mouse listeners back on. Code is as follows: $(function () { infoTips(); }); function infoTips(){ $("input:text").tooltip({ content : function(){ return $(this).attr("title"); }, position : { my : "left top", at : "right top", of : ".tip" } }).on("focusin", function () { $("*").tooltip().off("mouseover mouseout mouseleave"); }).on("focusout", function () { //This line doesn't work - $("*").tooltip().on("mouseover mouseout mouseleave"); // }); } http://jsfiddle.net/kjhansen/WmRuN/480/ Thank you!
possible better answer: http://stackoverflow.com/a/26369556
has title: JQuery Tooltip - reversing tooltip().off(mouseover mouseleave)
has answer: http://stackoverflow.com/a/26369556
type: Question

http://stackoverflow.com/a/26428221
has body: You shouldn't be using ajax for these kinds of things. If you want to force the user to download the response, that could get messy. Open a new tab/window instead; in most browsers it'll close itself anyway, and the user won't even notice that it was open! :) If you know your URLs on-load you could simply make an anchor tag with the target="_blank"-attribute. I.e.: &lt;a href="http://localhost:12150/api/Download/Report?Id=&lt;?=$reportID?&gt;" target="_blank"&gt;Download report&lt;/a&gt; (Well, you know basic HTML, but you get the idea) If you want/need to do it with JS, go with a simple window.open(): window.open("../api/Download/Report?Id=" + selectedItem.Id,'_blank'); Disclaimer: I don't know if that relative URL will actually work in window.open(). If it doesn't just fiddle around with constructing the URL via PHP first: $reportURL = $_SERVER['SERVER_NAME']."/api/Download/Report?Id="; and then, in your JS, just echo it: window.open("&lt;?=$reportURL?&gt;" + selectedItem.Id,'_blank');
type: Answer
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/26428163
answers question: http://stackoverflow.com/q/26428163
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41655570
score: 0
type: AnswerComment
type: Comment
has text: i dont think its that, intval returns 0 for text but you are not outputting that. But try commenting it out anyway. It still seems like the function is not found. What is the page url you have the jquery code on?
comment on: http://stackoverflow.com/a/26498415

http://stackoverflow.com/comment/41390567
score: 2
comment on: http://stackoverflow.com/q/26366569
type: QuestionComment
type: Comment
has text: Where is the element with `id` `eventListings`? Why haven't you included jquery in the snippert..? did you even check whether what you cliams to be working is working in it or not..?

http://stackoverflow.com/q/26369069
has comment: http://stackoverflow.com/comment/41395301
possible better answer: http://stackoverflow.com/a/26369298
tagged with: javascript
has comment: http://stackoverflow.com/comment/41395732
has comment: http://stackoverflow.com/comment/41395434
has comment: http://stackoverflow.com/comment/41395518
score: 0
has comment: http://stackoverflow.com/comment/41396093
answer count: 2
has title: JavaScript search() method equates to zero in two ways, leading to problems
tagged with: jquery
has comment: http://stackoverflow.com/comment/41395552
has comment: http://stackoverflow.com/comment/41395395
has comment: http://stackoverflow.com/comment/41395924
linked to: http://stackoverflow.com/q/2683466
has comment: http://stackoverflow.com/comment/41395568
has answer: http://stackoverflow.com/a/26369298
tagged with: regex
has body: If you take a piece of code like this: var string = "javascript"; var search = string.search(""); console.log(search); and then you take this piece of code: var string = "javascript"; var search = string.search("j"); console.log(search); both pieces of code evaluate to 0. It's fairly annoying since I would imagine it should amount to -1 since there is no match, nothing and the. This is a problem in a script I am trying to write because these both evaluate to the exact same number even though they aren't the same value and this is making me move all my data in my .json file over by one space from this: "heman", "candy", "powerpuffgirls", "oranges" to this: " heman", " candy", " powerpuffgirls", " oranges" because when I test for a match from the input field the user enters to the .json data I have no way of evaluating whether the data was blank or one matching character was entered (since the javascript search method evaluates both as the same amount '0'). This incapacity of javascript to know the difference between a 'nothing' and a 'single matching char' moved along at zero index (since it's a single matching char) has forced me to move all of .json data over one space. This feels...wrong to do, like not good practice. It's a solution but it seems like a lame one. Does anybody know any work arounds for a problem like this? Seems like a pretty simple common problem. Is there some way through this, perhaps with regular expressions or something?
has answer: http://stackoverflow.com/a/26369391
accepted answer: http://stackoverflow.com/a/26369391
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/41474665
type: Comment
has text: Its working now. I had to replace double quotes with single quotes. Thanks
comment on: http://stackoverflow.com/a/26412837
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41646942
score: 1
has text: Before giving some suggestions, are you using any server side framework, if so what is it? Why do you want to use a text file, is this a requirement or your solution to a problem? It doesn't sound ideal to me so if you describe the problem you are solving with this maybe a better approach could be found
type: Comment
comment on: http://stackoverflow.com/q/26508215
type: QuestionComment

http://stackoverflow.com/comment/41575819
has text: The code is technically valid, but it doesn't do what you think it does. The first line of the function is effectively just `var x = document.forms.reg.mail.value;` - it only really checks one field.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26468995
score: 3

http://stackoverflow.com/comment/41633137
comment on: http://stackoverflow.com/a/26465231
score: 0
type: AnswerComment
type: Comment
has text: There is no other way? I guess making one view model for each step actually makes the most sense in the long run...?

http://stackoverflow.com/a/26467693
answers question: http://stackoverflow.com/q/26467542
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26467542
has body: Your JSON object doesn't have a lat and lng property, they are in the nested object position. To get the coordinates you should use data.position.lat and data.position.lng.
score: 0

http://stackoverflow.com/comment/41519227
comment on: http://stackoverflow.com/q/26437383
score: 0
type: QuestionComment
has text: is that an extra double quote at the end of: $row['id']."\" maybe try taking out the \" and see what happens
type: Comment

http://stackoverflow.com/comment/41409541
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26376633
type: Comment
has text: Not Totally drag and drop, its more on replication.. What user do in the small canvas it should reflect in the larger canvas..

http://stackoverflow.com/comment/41554892
has text: With all this code, exactly what does one do to trigger the action (what do you click on), what exactly do you want to have happen on the click and what exactly is it doing now? You need to remember that we know nothing about what you want to do or how your page works.
score: 1
comment on: http://stackoverflow.com/q/26457311
type: Comment
type: QuestionComment

http://stackoverflow.com/a/47395688
has comment: http://stackoverflow.com/comment/107069800
upvote count: 5
type: Answer
answers question: http://stackoverflow.com/q/26421109
has body: Model.removeAttribute("id"); More documentation removeAttribute
downvote count: 0
score: 5

http://stackoverflow.com/q/26414167
upvote count: 6
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41484197
type: Question
has comment: http://stackoverflow.com/comment/41476482
has answer: http://stackoverflow.com/a/26414528
accepted answer: http://stackoverflow.com/a/26414528
tagged with: javascript
has body: I want to download a JSON(or XML) file by pressing a button. In HTML I define: export json In JavaScipt I have following code: function exportJson() { var obj = {a: 123, b: "4 5 6"}; var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(obj)); // what to return in order to show download window? } I found a very nice answer in Stackoveflow, but I fail to adjust it into my problem, mainly show the download window. I do not want to create another link somewhere in the page (like done in above mentioned answer, just directly show download window).
downvote count: 0
answer count: 1
tagged with: jquery
has title: javascript button to download a file
favorite count: 0
tagged with: download
score: 6
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41453229
type: Comment
type: QuestionComment
has text: check this http://blogs.sitepointstatic.com/examples/tech/css3-target/accordionhorz.html#acc1, it is css based one
comment on: http://stackoverflow.com/q/26401774
score: 0

http://stackoverflow.com/q/26406599
tagged with: node.js
score: 1
has answer: http://stackoverflow.com/a/26406891
upvote count: 1
type: Question
tagged with: mongodb
has title: Stuck implementing a nested data filtering loop, possibly a more elegant way of doing this?
tagged with: mongoose
tagged with: javascript
has body: Here's the data. What I want to do is inject all this data into one variable that contains all the categories and all the books belonging to those categories: var categories = [ // ... { "_id" : "5436b12b456f61180f815c06", "name" : "Horror" }, { "_id" : "5436b43f18bbc8a8073e786e", "name" : "Action" } // ... ]; var books = [ // ... { "_id" : "5436b43f18bbc8a8073e786d", "title" : "The Bourne Legacy", "category" : "5436b43f18bbc8a8073e786e" }, { "_id" : "5436b5c9de9884e010d5ef24", "title" : "Digital Fortress", "category" : "5436b50dc6faf3d41071a669" } // ... ]; And this is a mockup of how I'd like the data to look like after filtering: categories_titles = [ { categoryName: 'Category One', categoryTitles: [ {title: 'Book 1'}, {title: 'Book 2'}, // ... ] }, { categoryName: 'Category Two', categoryTitles: [ {title: 'Book 3'}, {title: 'Book 4'}, // ... ] } ]; And this is how I'm trying to solve the problem: categories_titles= []; for (var category in categories) { for (var book in books) { if (books[book].category == categories[category]._id) { categories_titles.push( { name: categories[category].name, titles: [ {title: books[book].title} ] } ); } } } This method works only partially; all the categories are being listed but some are being repeated, and some titles are missing or otherwise not where they're supposed to be. Also, accessing items, something like: categories_titles[0].titles[0].title is quite a monstrosity and I have a feeling that this could be solved more elegantly. Please advise.
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26460520
type: Question
score: 1
tagged with: fabricjs
accepted answer: http://stackoverflow.com/a/26462150
tagged with: canvas
upvote count: 1
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26462150
favorite count: 0
has title: Canvas fullscreen mode using fabric.js
has body: I try to use a fullscreen mode (HTML5 fullscreen) for a canvas object of Fabric.js. var canvas = fabricCanvas.getSelectionElement(); if(canvas.requestFullScreen) { canvas.requestFullScreen(); } else if(canvas.webkitRequestFullScreen) { canvas.webkitRequestFullScreen(); } else if(canvas.mozRequestFullScreen) { canvas.mozRequestFullScreen(); } The problem is, that events don't work in fullscreen mode. I suppose it is caused by using 2 canvases in Fabric: lower for drawing and upper for events. During the passing to fullscreen mode the lower canvas become "upper". Also, I've tried: var canvas = fabricCanvas.getSelectionElement(); In this case, there are events, but no visualization. Any ideas how to solve this?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/41616760
comment on: http://stackoverflow.com/q/26475768
has text: Thanks @PSL This worked fine but I had a more nested and complicated object and I couldn't simply cast them all into an array. I ended up using your timeout idea but added a variable that checks if fade is true or not and then setting to false on the timeout and have this in ng-class. I have a plnkr for my answer.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41643670
type: QuestionComment
has text: $('[name="employee[0][name]") s/b $("[name="+employee[0][name]+"]"), anyway, you need to use objects to achieve this.
comment on: http://stackoverflow.com/q/26506513
score: 0
type: Comment

http://stackoverflow.com/comment/41560021
comment on: http://stackoverflow.com/a/26374755
has text: You're welcome. Let me know if you have any questions. I'll be happy to answer.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26386094
answers question: http://stackoverflow.com/q/26383250
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/44834366
has comment: http://stackoverflow.com/comment/44805635
downvote count: 0
has body: The issue is caused by Chrome update. Chrome API changes in versions 37+ have made it incompatible with WebStorm debugger. WEB-12418 is fixed in WebStorm 8.0.5 and WebStorm 9 EAP.
score: 3

http://stackoverflow.com/q/26443028
upvote count: 10
has answer: http://stackoverflow.com/a/31418455
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: nunjucks
has body: I'm able to use client-side templating for nunjucks as I precompile from node.js and expose JS template files. I call the client-side templates like so: nunjucks.render('partials/some-template.html', { abc: 123 }) and get a string back. How can I call macros as I've tried but am doing this wrong. Macros are first declared on the page in terms of node.js then called successive times for example in Node.js: {% include 'macros/checkbox.html' %} ... {{ checkbox('you cool?', 'cool', false) }} {{ checkbox('you collected?', 'collected', false) }} But not sure how to get the macro then call it again and again in client-side. I did make an effort to go through the inspection in the console so far but no luck.
score: 10
has title: How to use nunjucks macros in the browser client-side?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/31418455
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/a/26437023
answers question: http://stackoverflow.com/q/26436857
score: 1
upvote count: 1
has body: If you are not actually wanting to get matches and are just wanting to test that the email fits the regular express than use the test method of the RegExp object and pass the string you want to test against. var emailReg = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; function emailValidate() { var x = document.forms["creation"]["emailCreation"].value; var y = x.length; var z = emailReg.test(x); alert(z); return z; } &lt;form name="creation" onsubmit="return emailValidate()"&gt; &lt;input name="emailCreation" type="email" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt;
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26436857
type: Answer

http://stackoverflow.com/comment/41404512
score: 3
has text: ActionScript and JavaScript are almost the same language, so it should not take you too much time to pick it up. But since PhantomJS is just a displayless run environment for JavaScript code, you can't do anything at all with PhantomJS unless you do some JavaScript (or have someone do it for you).
comment on: http://stackoverflow.com/q/26374064
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42080478
type: Comment
comment on: http://stackoverflow.com/q/26483541
has text: We are seeing this as well. We do not use momentjs. We are seeing this mainly on Chrome for iPad but also on IE 8. We use wordpress for admin only. Our front end stack is jQuery with Foundation 5 and Foundation 3 for IE 8 (via conditional comments). This is not a wordpress site.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41474236
has text: Yes a web app can talk to a web server, is the web server on the phone then?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26412619

http://stackoverflow.com/comment/41509754
comment on: http://stackoverflow.com/a/26432403
type: AnswerComment
has text: Yea, I know. It can't be that accurate.
score: 0
type: Comment

http://stackoverflow.com/q/26467179
tagged with: dojo
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26469936
accepted answer: http://stackoverflow.com/a/26469936
has title: data-dojo-attach-point class-lie analog
possible better answer: http://stackoverflow.com/a/26471010
type: Question
tagged with: javascript
score: 0
answer count: 2
has body: One uses data-dojo-attach-point as a unique identifier (analog of ID) in order to access particular widget-element inside particular instance of the widget. Is there any class-like analog one could use? For example there is a widget Foo and its instances Foo1, Foo2, Foo3 etc. And each Foo has 10 Dijit/Form/TextBox elements and a button. The aim is to change all 10 buttons with 1 line of code. One would simply add a class to each of 10 elements and use Dojo/Query to access each of them. or Is it possible to add class to a widgets (Diji/Form/TextBox) (not its DomNode). So when one uses Dojo/Query - it would list all elements of the current instance of the widget.
has answer: http://stackoverflow.com/a/26471010

http://stackoverflow.com/a/26470579
upvote count: 2
type: Answer
has body: Try utilizing the animationend event $.each(["webkit", "moz", "MS", "o", ""], function (k, v) { selected[0].addEventListener(v !== "" ? v + "AnimationEnd" : "animationend" , function (e) { $(this).unbind('click') .promise().done(function (el) { el.fadeOut(500); console.log("done") }); }) }) jsfiddle http://jsfiddle.net/guest271314/x7gqb1g4/ An alternative approach ; "infinite" loop by maintaining count !== 0 , "stop" by calling .stop() , clearQueue() setting .data() flag // v2 // `d` : duration , `count` : iteration (function ($) { $.fn.blink = blink; function blink(d, count) { var el = $(this); $.fx.interval = 0; return el.each(function (i, elem) { var elem = $(elem); elem.data("count", count); return elem.fadeTo(d, "0", "linear", function () { elem.fadeTo(d, "1", "linear", function () { elem.data("count", --count); return (elem.data("count") !== 0 &amp;&amp; !elem.data("stop") ? elem.blink(d, elem.data("count")) : elem.stop(true, true).data("stop", false)) }) }) }).promise("fx") }; }(jQuery)); // e.g., var selected = $("div") , button = $("button:first") , stop = $("button:last"); selected.on("click", function (e) { // start `$.fn.blink` , log returned `promise` on stop $(this).blink(750, 10).then(function (el) { console.log(el, el.queue(), el.data()); }) }); button.on("click", function () { // unbind `click` event selected.unbind('click') .promise().then(function (el) { el.fadeOut(500); }); }); stop.on("click", function () { // stop animation selected.data("count", null).data("stop", true).clearQueue() }) jsfiddle http://jsfiddle.net/guest271314/33ptL9do/
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41590830
answers question: http://stackoverflow.com/q/26454687

http://stackoverflow.com/comment/41589785
has text: Try [`console.log(window.hello123)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Values,_variables,_and_literals#Global_variables) as well.
comment on: http://stackoverflow.com/q/26476347
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26362572
score: 0
has comment: http://stackoverflow.com/comment/41408705
type: Answer
has body: Can you try to use done/fail, just to be sure it's working : function getMonster () { var theMonster = $.ajax({ url : "http://codepen.io/chriscoyier/pen/difoC.html", success : function(data){ console.log("Monster Succeeded inside 'success' block"); } }); return theMonster; } var theMonster = getMonster(); theMonster.done(function(){ console.log("Moster Succeeded outside"); }) .fail(function(){ console.log("Monster Failed :("); }); And add "true" : $.ajaxSetup({ beforeSend: function(jqXHR) { if ($.cookie("mycookie") == null) { console.info("Expired Session"); AppModule.timeout(); return (false); } return (true); } });
answers question: http://stackoverflow.com/q/26361486

http://stackoverflow.com/a/28080801
type: Answer
answers question: http://stackoverflow.com/q/26367108
score: 1
upvote count: 1
downvote count: 0
has body: TL;DR - A Node child process forking "bug" leaves Grunt waiting for a debugger that can never connect. Sails uses child_process.fork() to spawn a separate process for grunt to run in. The new process inherits the node command line parameters of the calling process (default operation of fork). In your case, "--debug-brk". This causes the node process for grunt to stop on the first line - waiting for a debugger to connect. Unfortunately, under Windows, this listening port appears to be opened with SO_REUSEADDR. This means that two processes are allowed to listen on the same port! "Once the second socket has successfully bound, the behavior for all sockets bound to that port is indeterminate." In my testing, I found that all connections only hit the first process that started listening. I could never connect to the child Grunt process to allow execution to continue. I've heard that in newer versions of Node (0.15?) every fork will get own port incrementally from base. But I haven't tested this myself.

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/26376109
tags question: http://stackoverflow.com/q/26399348

http://stackoverflow.com/comment/41377263
type: Comment
has text: Most probably by the time you have subscribed for the event the element is already loaded.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26359238

http://stackoverflow.com/a/26470644
score: 2
upvote count: 2
has body: You can use Regex: if (str.replace(/[\s\n\r]+/g, "") != "") { // if you remove spaces and line breaks, it doesn't equal nothing } EDIT - it should be faster if (/\S/.test(str)) { // found something other than spaces or line breaks // "\S" should match any character that is not a space or line break }
answers question: http://stackoverflow.com/q/26470431
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26470431
type: Answer

http://stackoverflow.com/a/26480880
has comment: http://stackoverflow.com/comment/41598020
type: Answer
has comment: http://stackoverflow.com/comment/41598095
has comment: http://stackoverflow.com/comment/41597863
score: 2
answers question: http://stackoverflow.com/q/26480808
upvote count: 2
has comment: http://stackoverflow.com/comment/41597892
has body: You can't. JSON means: JavaScript Object Notation. It is a serialisation to String values of all properties of an Object. Function properties are not serializable. If you deserialize the JSON-string to Object you'll have to convert the string containing the function to a real javascript function (e.g. using eval or new Function). See also ..., chapter 5: A JSON value can be an object, array, number, string, true, false, or null
has comment: http://stackoverflow.com/comment/41598062
downvote count: 0
has comment: http://stackoverflow.com/comment/41598001

http://stackoverflow.com/comment/41457217
score: 0
comment on: http://stackoverflow.com/q/26403985
type: QuestionComment
type: Comment
has text: not clear at all what your issue is

http://stackoverflow.com/q/26441080
has comment: http://stackoverflow.com/comment/41525915
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41526020
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41525786
answer count: 0
linked to: http://stackoverflow.com/q/15053390
type: Question
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
has comment: http://stackoverflow.com/comment/41525952
has comment: http://stackoverflow.com/comment/41527480
score: 0
has comment: http://stackoverflow.com/comment/41525996
tagged with: http://stackoverflow.com/tag/html
has title: Passing Fullcalendar Clicked Day to Modal Form (rails) (have fiddle)
has body: There was another question similar to this one here, but it didn't quite answer my question. I am using Rails, and Fullcalendar for a booking app. The functionality I am looking for is that when a user clicks on a day, it opens up a modal popup with a form to create a new booking. I have this working -- but I want one step further. I want the form select fields to prepopulate with the date that was clicked on the fullcalendar. Also, relating to rails -- the form populates a lot of heavy html select menus. Should I be targeting these select menus with jquery and trying to pass the values from fullcalendar there, or is there an easier way. The form looks like this: <%= form_for @booking, class: "ui form segment" do |f| %> <%= f.label 'start_time', 'Start Time:' %> <%= f.datetime_select :start_time, { minute_step: 15 } %> <%= f.label 'end_time', 'End Time:' %> <%= f.datetime_select :end_time, { minute_step: 15 } %> <%= f.label 'studio_id', 'Studio:' %> <%= f.collection_select(:studio_id, Studio.all, :id, :name) %> <%= f.label 'Title', 'Title' %> <%= f.text_field( :title)%> <%= f.label 'Engineer', 'Engineer' %> <%= f.collection_select( :engineer_id, Engineer.all, :id, :email)%> <%= f.submit 'Submit', class: "ui large green button" %> <% end %> Which renders the long html you will see in the fiddle The default start time for the form is 'today' at a the most recent hour (10:59 yields 10:00). It would be cool to override THIS to whatever data the fullcalendar is holding, itstead of targeting crazy li select etc.

http://stackoverflow.com/a/26516122
type: Answer
has body: I found a fix by looking into the carousel documentation thanks to the comment of the user workabyte. This is how it looks now: $(window).load(function () { if (window.location.href.indexOf("something-on-url") &gt; -1) { $(".orbit-slides-container").one("orbit:before-slide-change", function () { $("html,body").animate({ scrollTop: $("#specificDiv").offset().top }, 200); }); } The orbit:before-slide-change is a event from the orbit API (http://foundation.zurb.com/docs/v/4.3.2/components/orbit.html). There is also an event supposedly triggered when the carousel is fully loaded, orbit:ready, but this didn't work for me.
downvote count: 0
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26492979
answers question: http://stackoverflow.com/q/26492979
upvote count: 1

http://stackoverflow.com/a/26407483
type: Answer
answers question: http://stackoverflow.com/q/26406747
has body: You could also define init in the controller as you do: app.controller('LoginCtrl', function($scope) { $scope.init = function() { ... }; }); And then call it from the markup: &lt;body ng-init='init()'&gt; ... &lt;/body&gt;
score: 0

http://stackoverflow.com/a/26476186
has comment: http://stackoverflow.com/comment/41590231
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26467096
has comment: http://stackoverflow.com/comment/41590118
has comment: http://stackoverflow.com/comment/41591738
has comment: http://stackoverflow.com/comment/41592315
answers question: http://stackoverflow.com/q/26467096
has comment: http://stackoverflow.com/comment/41590651
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: Without a code change in Chutzpah it is not possible to set those properties on the PhantomJS object. Please file an issue at https://github.com/mmanela/chutzpah asking for this functionality and then fork/patch Chutzpah to add it (or wait for a developer on the project to hopefully get to this). Update: I pushed a fix for this issue. Once this is released you can use the following in a Chutzpah.json file: { "userAgent": "myUserAgent" }

http://stackoverflow.com/comment/41587534
comment on: http://stackoverflow.com/q/26474981
type: Comment
has text: just make the search icon a label tied to the input so that clicking the icon focuses the input; no JS needed.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41654151
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26511911
type: Comment
has text: I need the white area above the #bottomwrap div to stay where it is and the whole window has a background image so I can't place a div over top.

http://stackoverflow.com/q/26488368
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41611904
has comment: http://stackoverflow.com/comment/41611522
answer count: 0
has comment: http://stackoverflow.com/comment/41611429
tagged with: geolocation
has comment: http://stackoverflow.com/comment/41610894
type: Question
has title: Google maps Geo reverse location loop & time interval
tagged with: javascript
has comment: http://stackoverflow.com/comment/41612467
tagged with: google-maps-api-3
score: 0
has body: What im trying to do is. I read a RSS feed about police reports etc. the code would refresh the rss page every 30+ seconds and add all the data into the database with the lon &amp; lat. The thing is, i want to get the street address using reverse geo location. it works well but it only gives the address of the last item in the php loop. is there a way i can get all the streets using the code below? $xml=("http://feeds.livep2000.nl"); function getFeed($feed_url) { $content = file_get_contents($feed_url); $x = new SimpleXmlElement($content); $conn = new Connection; $x-&gt;registerXPathNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); $x-&gt;registerXPathNamespace('content', 'http://purl.org/rss/1.0/modules/content/'); $x-&gt;registerXPathNamespace('geo', 'http://www.w3.org/2003/01/geo/wgs84_pos#'); $i = 0; foreach($x-&gt;channel-&gt;item as $entry) { $geolat = $entry-&gt;xpath('geo:lat'); $geolon = $entry-&gt;xpath('geo:long'); if($geolat != "" &amp;&amp; $geolon != ""){ $checkifexists = $conn-&gt;query("SELECT `alerts` FROM `alerts_p2000` WHERE `lat` = '".$geolat[0]."' AND `lon` = '".$geolon[0]."'"); if($checkifexists-&gt;num_rows == '0') { $sql = "INSERT INTO `alerts_p2000` (`title`,`lat`,`lon`,`date_added`,`cat`) VALUES ('".$conn-&gt;real_escape_string($entry-&gt;title)."','".$geolat[0]."','".$geolon[0]."',now(),'68')"; $conn-&gt;query($sql); $alert_id = $conn-&gt;inserted_id(); $description = "&lt;b&gt;".$conn-&gt;real_escape_string($entry-&gt;description)."&lt;/b&gt;"; $sql = "INSERT INTO `alerts_content_p2000` (`description`,`alert_id`,`img`)VALUES('".$description."','".$alert_id."','68/politie')"; $conn-&gt;query($sql); $alertcontent_id = $conn-&gt;inserted_id(); $sql = "UPDATE `alerts_p2000` SET `alert_content_id` = '".$alertcontent_id."' WHERE `alerts` = '".$alert_id."'"; $conn-&gt;query($sql); $i++; ?&gt; &lt;script&gt; console.log('test'); var app = angular.module('app', []); app.controller('mainctrl', function($scope, $filter) { ///// HIER D…
has comment: http://stackoverflow.com/comment/41611741
has comment: http://stackoverflow.com/comment/41612071
tagged with: angularjs

http://stackoverflow.com/comment/41587793
type: Comment
comment on: http://stackoverflow.com/a/26475041
type: AnswerComment
score: 0
has text: Luis: I was told that it is better to mock the services for unit testing of the controller and that services should be tested in a different unit test. The idea was that one will have few dependency issues and better separation of concerns. What do you think about that?

http://stackoverflow.com/a/26414924
upvote count: 1
downvote count: 0
has body: I thought I'd offer a different approach using promises which are ideal for knowing when multiple async operations have all completed. This particular solution uses the Bluebird promise library: var Promise = require('bluebird'); var fs = Promise.promisifyAll(require('fs')); var promises = ["a", "b", "c", "d"].map(function(val) { return fs.writeFileAsync('content/' + val + ".json", JSON.stringify(content[val], null, 4)); }); Promise.all(promises).then(function() { // all writes are done here }).catch(function(err) { // error here });
type: Answer
answers question: http://stackoverflow.com/q/26413329
score: 1

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/26434135
type: Tag

http://stackoverflow.com/comment/41553961
type: Comment
comment on: http://stackoverflow.com/q/26456453
score: 0
has text: Well if nothing else you could just modify the width and height.
type: QuestionComment

http://stackoverflow.com/comment/41556612
score: 0
type: Comment
type: QuestionComment
has text: document.querySelector() or document.querySelectorAll().
comment on: http://stackoverflow.com/q/26458337

http://stackoverflow.com/comment/41616878
type: AnswerComment
comment on: http://stackoverflow.com/a/26458232
score: 0
type: Comment
has text: After further investigation I am conforming what you are seeing, it does allow me to set up a user object with write permissions initially, but as you stated not after, even with masterKey permissions.

http://stackoverflow.com/comment/41588531
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26475337
has text: If you want to know the max value of `1/60` (it's always that), you can take a second (literally) after page load and count the iterations.

http://stackoverflow.com/q/26388340
has answer: http://stackoverflow.com/a/26388585
possible better answer: http://stackoverflow.com/a/26388534
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41430669
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41432002
favorite count: 0
has comment: http://stackoverflow.com/comment/41433912
has answer: http://stackoverflow.com/a/26388463
has body: Hello I am new with jQuery and there are a few things I want to add to my code. What I more or less want (found it online): http://jsfiddle.net/EMYFt/5/ I have a loop in PHP creating all of those DIVs(at their x,y coordinate) and thats why I need to add a button. I want every desk_box DIV when click to remain open until the user decides to click X. Right now I got it working only if the user clicks on the same DIV. It is annoying because eventually it hides the other ones and I have to refresh the page. So, adding the (x) button would help. Thanks in advance it is appreciated! Below is my code (JSFiddle mirror): I want to add an (x) button in in my station_info_ DIV which is being toggled.Also, how can I make that DIV overlay on top of the desk_box DIV (look at my fiddle: when you click on 84 it will go under 100. $(document).ready(function() { $(".desk_box").click(function() { var id = $(this).attr("data") $("#station_info_"+id).toggle(); }); }); #map_size{ position:center; width:1190px; height:1300px; background:#0099FF; border-style: solid; border-color: black; position: relative; } /* desk boxes*/ .desk_box{ width: 23px; height: 10px; border: 4px solid black; padding:10px; } /*station info*/ .station_info_ { display: none; width:150px; height:150px; margin-left:20px; border:4px solid black; background-color:white; position:relative; } id:84 Hello the id is:84 Section: H id:90 Hello the id is:90 Section: H id:100 Hello the id is:100 Section: H
score: -3
tagged with: css
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26389141
downvote count: 3
has answer: http://stackoverflow.com/a/26388534
type: Question
accepted answer: http://stackoverflow.com/a/26388463
has title: How can I add a "x" button in a jQuery toggle function?

http://stackoverflow.com/q/26468770
has title: preventing ng-select from firing when focus is lost
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26470162
upvote count: 1
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41577899
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26470162
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41575750
has body: I have a multi-select box created in Angular js with values from a database, some of which are preselected if they meet certain conditions. fooSearch.html &lt;select multiple ng-model="foo"&gt; &lt;option ng-repeat="item in fooList" value="{{item.id}}" ng-selected="fooIsSelected(item.id)"&gt; {{item.label}} &lt;/option&gt; &lt;/select&gt; fooSearch-dctv.js scope.foo = []; scope.fooIsSelected = function(id){ var isBar = PermissionsFxty.hasPermission('A_PERM') &amp;&amp; (id == "15" || id == "16" || id == "17"); var isBaz = PermissionsFxty.hasPermission('B_PERM') &amp;&amp; (id == "1" || id == "3"); if((isBar || isBaz) &amp;&amp; scope.foo.indexOf(id) == -1){scope.foo[scope.foo.length] = id;} return isBar || isBaz; }; The issue is that whenever another element focus fooIsSelected(id) gets fired and reselects any items that may have been unselected by the user. This happens regardless of what options the user selected or unselected prior to the multiselect box losing focus. Why is it doing this? Is there a way to prevent this with out placing a $watch on scope.foo and setting a flag?
tagged with: angularjs

http://stackoverflow.com/q/26361820
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41381515
accepted answer: http://stackoverflow.com/a/26362012
score: 0
has comment: http://stackoverflow.com/comment/41381554
has title: AngularJS v1.2.16 bug when using IE?
tagged with: angularjs
has answer: http://stackoverflow.com/a/26362012
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41381462
has body: This piece of code : if (window.angular.bootstrap) { //AngularJS is already loaded, so we can return here... console.log('WARNING: Tried to load angular more than once.'); return; } is contained in AngularJS version 1.2.26 and causing an issue for IE. Error message is "console is undefined". My fix is just to remove console.log ? What is meaning of window.angular.bootstrap ?
linked to: http://stackoverflow.com/q/690251
type: Question
answer count: 1

http://stackoverflow.com/comment/41423387
score: 0
has text: @Apostolos The firsts advantage: One function inside `$(document).on()` can handle all events coming from different objects. The seconds: It's simpler and keeps the 'finishing' private to each object. It's also possible to combine both solutions.
type: Comment
comment on: http://stackoverflow.com/a/26381793
type: AnswerComment

http://stackoverflow.com/comment/41534010
score: 1
comment on: http://stackoverflow.com/q/26445692
has text: FYI this won't work `document.getElementById( '.container' )` You are referencing a class when it expects an ID
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41585539
type: Comment
score: 1
has text: add a breakpoint (debugger) to your close click. Check what's in the $(".status") selector when you do it for the second time.
comment on: http://stackoverflow.com/q/26473891
type: QuestionComment

http://stackoverflow.com/comment/105579405
has text: please give more clarity regarding what is `Set`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/59714003
type: AnswerComment

http://stackoverflow.com/comment/41535794
has text: I'm thinking of trying to edit the code in custom2.js so that I can get it to use setAttribute('placeholder', 'Search') instead of the kind of mangled way it uses default value right now. . .
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26446527

ngresource
tags question: http://stackoverflow.com/q/26399460
tags question: http://stackoverflow.com/q/26511582
tag name: ngresource
type: Tag

http://stackoverflow.com/a/26367252
has comment: http://stackoverflow.com/comment/41395056
has comment: http://stackoverflow.com/comment/41408031
has body: The other answers are almost right: var board = [['RS', 'H', 'RS', 'H', 'RS', 'H', 'RS', 'H'], ['BS', 'RS', 'BS', 'RS', 'BS', 'RS', 'BS', 'RS'], ['RS', 'BS', 'RS', 'BS', 'RS', 'BS', 'RS', 'BS'], ['BS', 'RS', 'BS', 'RS', 'BS', 'RS', 'BS', 'RS'], ['RS', 'BS', 'RS', 'BS', 'RS', 'BS', 'RS', 'BS'], ['BS', 'RS', 'BS', 'RS', 'BS', 'RS', 'BS', 'RS'], ['RS', 'BS', 'RS', 'BS', 'RS', 'BS', 'RS', 'BS'], ['F', ' RS', 'BS', 'RS', 'BS', 'RS', 'BS', 'RS']]; function getChar(board, c) { var i, j, collection = []; for (i = 0; i &lt; board.length; i++) { for (j = 0; j &lt; board[i].length; j++) { if(board[i][j] == c) collection.push({row:i, col:j}); } } return collection; } console.log(getChar(board, "F")); console.log(getChar(board, "H"));
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26367002

http://stackoverflow.com/comment/41454780
type: AnswerComment
has text: But you have to escape the period `.`
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26402658

http://stackoverflow.com/comment/41525412
comment on: http://stackoverflow.com/a/26433774
type: Comment
has text: @BenjaminGruenbaum thanks for mentioning Bluebird I was unaware of that library
score: 0
type: AnswerComment

http://stackoverflow.com/q/26441434
tagged with: javascript
has answer: http://stackoverflow.com/a/26441575
has comment: http://stackoverflow.com/comment/41526065
has body: for (var i = 1; i &lt; 99999; i++) { window.clearInterval(i); console.log('interval cleared'); } The above code will log 99999 times "interval cleared". But how to log if for loop is completed? if(for loop is completed){ console.log('interval cleared'); }
has answer: http://stackoverflow.com/a/26441680
has comment: http://stackoverflow.com/comment/41526180
upvote count: 0
has answer: http://stackoverflow.com/a/26441579
has comment: http://stackoverflow.com/comment/41526223
has comment: http://stackoverflow.com/comment/41526021
has comment: http://stackoverflow.com/comment/41526157
has title: How to consider if for loop is completed?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26441517
score: -3
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41526251
downvote count: 3
has comment: http://stackoverflow.com/comment/41526096
type: Question
has comment: http://stackoverflow.com/comment/41526024
has answer: http://stackoverflow.com/a/26441517
possible better answer: http://stackoverflow.com/a/26441575

http://stackoverflow.com/q/26510945
has answer: http://stackoverflow.com/a/26511920
answer count: 3
score: 2
has answer: http://stackoverflow.com/a/26511500
has body: I'm working on a simple website to use at a conference and I'm looking for some help understand the implications of two ways to achieve an effect: Using .toggle() to show or hide content This is the method I started with because it is an intuitive action to tap an element to have it's content appear. However, a problem arises when I try to limit one open div at a time. Summary I'm having trouble limiting the number of opened elements. Applying an active class with jQuery Using this method, I can display the hidden content by selecting the child element (see code below), but this stops the user from closing the content by tapping it again. Because I'm expanding divs horizontally, this isn't ideal because of the scroll space that's added. Summary: How do you close the active div on a second click with this method? CodePen Demo - Staged site Relevant Code This method is using CSS to apply the active class. It works, but like I said above, I'm having a hard time removing the active class from an element tapped again. Use the demo linked above to see how the toggle action works on the page (uncomment lines 8 and 9). $(".title").click(function() { //remove active class from other elements $('.post').removeClass('active'); // Bind to the div $post = $(this); // Set active class on .post to control scroll position $post.parent().toggleClass('active'); // Toggles the hidden .content div //$post.next().toggle(250); $('html, body').animate({scrollLeft: $('.active').offset().left},500); }); The accompanying .active CSS: .post .content { display:none; } .active { margin-top:-120px; } /* Shows the content div rather than toggling with jQuery */ .active &gt; .content { display:block; } Is there a way I can allow both behaviors (tap to open/close, one open div at a time)? Which method is best suited for that?
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26511173
tagged with: css
has comment: http://stackoverflow.com/comment/41652597
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/41652201
has title: Using `.toggle()` rather than applying a class to show content
type: Question
has comment: http://stackoverflow.com/comment/41652099
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26511920
has answer: http://stackoverflow.com/a/26511173

http://stackoverflow.com/a/26417961
score: 4
answers question: http://stackoverflow.com/q/26417934
upvote count: 4
has comment: http://stackoverflow.com/comment/41482981
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26417934
type: Answer
has comment: http://stackoverflow.com/comment/41483046
has comment: http://stackoverflow.com/comment/41482861
has body: var bmi = (weight/(height*height))* 703; calculate.innerHTML = bmi; if(bmi &gt; 25) Update: var bmi = (weight/(height*height))* 703; document.getElementById("answer").innerHTML = bmi; if (bmi &gt; 25) { document.getElementById("answer06").innerHTML = "you are fat"; } else if (bmi &lt; 18.5) { document.getElementById("answer06").innerHTML = "you are too skinny"; }

http://stackoverflow.com/comment/41554644
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26457163
has text: If $().perfectScrollbar
type: Comment

http://stackoverflow.com/comment/41446811
type: AnswerComment
has text: @bodesam, please accept the answer if it worked so that others in a similar problem would also benefit out of this. Thanks.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26379568

http://stackoverflow.com/comment/41583748
type: QuestionComment
comment on: http://stackoverflow.com/q/26473064
score: 0
has text: Have you logged `JSON.stringify(arrayData)` to confirm it is what you think it is before attaching it to `formdata`?
type: Comment

http://stackoverflow.com/q/26410150
has comment: http://stackoverflow.com/comment/41469012
has comment: http://stackoverflow.com/comment/41468596
answer count: 0
type: UnansweredQuestion
has body: So I have a page with nested repeaters on it. The nested repeater is throwing off my Container.ItemIndex so in my Javascript function when I look for the certain IDs it breaks once it gets to the nested numbers. Parent repeater goes 0-9 but then it has the nested one use 10-19. My main repeater starts up again at 20 but the javascript breaks as soon as it hits 10. I need to have the funciton run 0-9 AND 20-32. Is there any way to turn off the itemindex on the nested repeater or look for all my numbers in the javascript? Javascript Function while(document.getElementByID("pricePerUnit_"+orderId+i) { i++ } Aspx page &lt;tr id="mainTr&lt;%# Container.ItemIndex %&gt;"&gt; Main repeater that uses 0-9 then 20-32
has comment: http://stackoverflow.com/comment/41479764
tagged with: repeater
has title: While loop is breaking because of no id found
has comment: http://stackoverflow.com/comment/41468542
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41468780
tagged with: javascript
score: 0

http://stackoverflow.com/q/26483215
has body: I'm using phonegap and am very new to this. script source: &lt;script src="http://www.transfermate.com/en/exchange_rates_api.asp"&gt;&lt;/script&gt; I'm trying to get rid of the &lt; br >s in the div 'currency_converter_calculator_subscribe_form_under_info' My attempt so far: $('#currency_converter_calculator_subscribe_form_under_info.form_under_info calculator_subscribe_form_under_info br').remove(); EDIT The problem is the script produces a string like this: 4 USD United States of America Dollars = 3.1308 EUR Euro I need the line to not take up as much space, so I need to get rid of the &lt; br >s or shorten the string. I know that after the number there will be a 3 character length acronym always e.g. USD, EUR. It would also work to parse out the part of the string after this char code and before the = sign either but I can't reference the label properly or so it would seem: $('#currency_converter_calculator_subscribe_form_under_info').val('testing'); Best possible solution would be: 4 USD = 3.1308 EUR Any help appreciated
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26483448
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26484152
score: 0
possible better answer: http://stackoverflow.com/a/26483448
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: cordova
has title: how to remove brs in a given script
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26484152

http://stackoverflow.com/q/26510861
has answer: http://stackoverflow.com/a/26511341
downvote count: 0
tagged with: jquery
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41652393
score: 2
has body: I am manipulating a select, which before I show is got more than one selected option. After my code just one stays selected, but because I removed the previous selected the select is showing the default instead of the next selected. 1 month 2 month 3 month And javascript $('#test option[value=3]').remove(); Example here: example Is this expected? In the console the option 2 in the example will still have the selected attribute.
type: Question
has comment: http://stackoverflow.com/comment/41651963
has answer: http://stackoverflow.com/a/26511574
tagged with: javascript
has title: Removing selected option from dropdown selects default option not next selected
answer count: 2

http://stackoverflow.com/comment/41406619
has text: Ah sorry, I misunderstood. I thought browsers used node.js. What I really would like to do is somehow use these programming paradigms that node.js has in the browser. Is there a js library that provides `emit` and `on` like in Node.js?
comment on: http://stackoverflow.com/q/26375193
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29166299
downvote count: 0
score: 1
has body: According to the documention you can write it this way: bookshelf.Img.query(function(qb) { qb.offset(30).limit(10); }) .fetchAll() .then(...); This will return a collection of 10 images starting from the 30th image.
answers question: http://stackoverflow.com/q/26411241
upvote count: 1
type: Answer

http://stackoverflow.com/q/26478090
tagged with: javascript
has comment: http://stackoverflow.com/comment/41592989
score: 0
answer count: 1
has body: I have a 2 part question. In PHP, I use fetch_assoc like in the answer from this post which returns an array of objects. Then my JS is: var result = JSON.parse(response), output = ""; for (var i = 0; i &lt; result.length; i++){ var obj = result[i]; output += "&lt;div class='mysql_row'&gt;"; for (key in obj){ output += "&lt;div class='mysql_col'&gt;" + obj.key. + "&lt;/div&gt;"; } output += "&lt;/div&gt;"; } document.getElementById('main_grid').innerHTML = output; I read in another post that using "key" should give me the value, but I'm getting undefined even though logging to the console gives me an array of strings. Am I doing something wrong with my for..in? I'm not too experienced with PHP, is there a more elegant way to echo and display the data? My PHP code: $load = $connect-&gt;query("SELECT * FROM `user` WHERE `role` = 2"); $emp_proj = array(); while ($row = $load-&gt;fetch_assoc()){ $emp_proj[] = $row; }; echo json_encode($emp_proj);
has comment: http://stackoverflow.com/comment/41593025
has answer: http://stackoverflow.com/a/26478214
has comment: http://stackoverflow.com/comment/41593044
tagged with: php
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4372197
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41592913
tagged with: mysql
has title: parse json from php display with javascript
accepted answer: http://stackoverflow.com/a/26478214
type: Question

http://stackoverflow.com/a/26442428
answers question: http://stackoverflow.com/q/26438990
type: Answer
has body: I managed to work this out... $('#addBtn').bind( "click", function() { var link = 'mailto:' + toEmailAdd +'?subject=PDFs&amp;body='+htmlString window.open(link, 'Mailer'); setTimeout(ResetPage, 1); }); function ResetPage(){ document.location = ""; };
score: 0

http://stackoverflow.com/comment/41503000
comment on: http://stackoverflow.com/q/26429029
score: 0
type: Comment
type: QuestionComment
has text: Please post a complete code example.

http://stackoverflow.com/a/31365427
accepted answer of: http://stackoverflow.com/q/26434570
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26434570
has body: It does support FileReader. The problem is webengine/webview does not display alert boxes, confirmation boxes, or popup windows without some work on your part so that is actually what is failing. If you want alert boxes you need to create the dialog yourself: webEngine.setOnAlert ( new EventHandler&lt;WebEvent&lt;String&gt;&gt;() { @Override public void handle(WebEvent&lt;String&gt; arg0) { Alert alert = new Alert(AlertType.INFORMATION); alert.setHeaderText("Alert"); alert.setContentText(arg0.getData()); alert.showAndWait(); } } );
has comment: http://stackoverflow.com/comment/51751300
has comment: http://stackoverflow.com/comment/67431023
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26383407
has comment: http://stackoverflow.com/comment/41425123
has comment: http://stackoverflow.com/comment/52238271
upvote count: 35
has body: The new ui-grid has a special property for the cellClass: $scope.gridOptions = { enableSorting: true, data:'myData', columnDefs: [ { field: 'sv_name', displayName: 'Nombre'}, {field: 'sv_code', displayName: 'Placa'}, { field: 'count', displayName: 'Cuenta', cellClass: function(grid, row, col, rowRenderIndex, colRenderIndex) { if (grid.getCellValue(row,col) == 1) { return 'blue'; } return 'green'; } } ] }; Look at his Plunker Note that I made the color for class green in red because it's better to see and to stir maximal confusion:-) Update: Here is the solution for row coloring. Write your rowTemplate like this: var rowtpl=' '; Here is the forked Plunker Note that background-color is overwritten by cell backgrounds. Find a way around this by yourself:-) Sorry for the initial misread of your question. I leave the cellClass part in this answer in case anyone may need it.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/52233005
score: 35
accepted answer of: http://stackoverflow.com/q/26362666
type: Answer
has comment: http://stackoverflow.com/comment/41532314
has comment: http://stackoverflow.com/comment/52241010
has comment: http://stackoverflow.com/comment/54889192
answers question: http://stackoverflow.com/q/26362666
downvote count: 0

http://stackoverflow.com/comment/41657686
has text: ...and the jQuery selector for the previous **text** would be ?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26513414

http://stackoverflow.com/q/26426802
score: 1
tagged with: forms
downvote count: 1
has answer: http://stackoverflow.com/a/26426998
has answer: http://stackoverflow.com/a/26427041
type: Question
has answer: http://stackoverflow.com/a/26427859
tagged with: javascript
has comment: http://stackoverflow.com/comment/41520144
tagged with: jquery
has answer: http://stackoverflow.com/a/26427587
answer count: 4
favorite count: 0
has title: How to show form fields on keyup
upvote count: 2
type: UnansweredQuestion
tagged with: css
has body: I've been working on this for weeks now and I can't seem to get the hang of this. I'm trying to show the hidden fields only when the previous fields are entered. Here's my example code: HTML Field 1: Field 2: Field 3: Field 4: Field 5: Field 6: Field 7: Field 8: Field 9: CSS #group2 { visibility: hidden; } #group3 { visibility: hidden; } Script $(document).ready(function () { $('#group1').find('input[type="text"]').keyup(function () { CheckSubmit(); }); function CheckSubmit() { var x = true; $('#group1').find('input[type="text"]').keyup(function () { if ($(this).val().length === 0) { x = false; return; } }); if (x) { $('#group2').css('visibility', 'visible'); $('#group3').css('visibility', 'visible'); } else { $('#group2').css('visibility', 'hidden'); $('#group3').css('visibility', 'hidden'); } CheckSubmit(); }); I'm not sure what I'm doing wrong here. Can someone please assist?

http://stackoverflow.com/q/26484708
has answer: http://stackoverflow.com/a/26504986
accepted answer: http://stackoverflow.com/a/26504986
type: Question
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26489784
has comment: http://stackoverflow.com/comment/41606163
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: marionette
tagged with: backbone.js
has title: How to create html list use marionette?
has answer: http://stackoverflow.com/a/26489784
has body: Slide View Select 1 Sub Select 1 Sub Select 2 Sub Select 3 Select 2 Sub Select 1 Sub Select 2 Sub Select 3 Select 3 Sub Select 1 Sub Select 2 Sub Select 3 Please create to me a simple above output use marionette. here below i use marionette coding var APP = new Backbone.Marionette.Application(); APP.addRegions({ appMain:"#main" }); APP.module("APP",function(module, app, Backbone, Marionette, $, _){ module.title = Backbone.Model.extend({}); module.titles = Backbone.Collection.extend({ model:module.title }); module.subtitle = Backbone.Model.extend({}); module.subtitles = Backbone.Collection.extend({ model:module.subtitle }); module.iView = Backbone.Marionette.ItemView.extend({ tagName:"li", template:"#temp-itemview" }); module.csView = Backbone.Marionette.CompositeView.extend({ template:"#temp-compositeview", childView:module.iView, itemViewContainer:"ul", initialize:function(){ this.collection = this.model.get('subtitles'); } }); module.collView = Backbone.Marionette.CollectionView.extend({ childView:module.csView }); module.addInitializer(function(){ var array = [ {title:"Show 1",array:[{title:"Sub Show 1"},{title:"Sub Show 2"},{title:"Sub Show 3"}]}, {title:"Show 2",array:[{title:"Sub Show 1"},{title:"Sub Show 2"},{title:"Sub Show 3"}]}, {title:"Show 3",array:[{title:"Sub Show 1"},{title:"Sub Show 2"},{title:"Sub Show 3"}]}]; var titles = new module.titles(array); titles.each(function(title){ var array = title.get('array'); var subtitles = new module.subtitles(array); title.set("subtitles",subtitles); }); var superView = new module.collView({ collection:titles }); APP.appMain.show(superView); }); }); APP.start(); html &lt;script type="text/template" id="temp-itemview"&gt; &lt;%= title %&gt; &lt;/script&gt; &lt;script type="text/template" id="temp-compositeview"&gt; &lt;ul&gt;&lt;/ul&gt; &lt;/script&gt; Output is not clear.Please correct
type: AnsweredQuestion

http://stackoverflow.com/comment/41468062
has text: thanks. instead of bouncing, once the red reaches the top, the blue slides up, then red slides up etc. all from bottom to top, not bottom->top, top->bottom
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26409823
type: Comment

http://stackoverflow.com/comment/41625210
type: QuestionComment
comment on: http://stackoverflow.com/q/26495958
type: Comment
score: 1
has text: Why in the world do you need a regular expression to get the data from attributes?

http://stackoverflow.com/comment/41604163
score: 1
type: Comment
comment on: http://stackoverflow.com/q/26484749
type: QuestionComment
has text: Simply add day info in line with months.push()

http://stackoverflow.com/q/26389966
tagged with: canvas
accepted answer: http://stackoverflow.com/a/26391311
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I know that I can use the "translate-rotate-translate back-fillrect" procedure to rotate one single rectangle. However, what if I want to rotate them both at the same time and have a timeinterval() to make them rotate automatically every second? I tried to save and restore each time I try to draw, but it didn't work.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: css
has title: How to rotate 2 rectangles in a canvas at the same time?
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26391311
type: Question

http://stackoverflow.com/comment/41562864
has text: +1, also I would check if `column.value` actually _is_ a valid date value (a string that can be converted to a date). But to get it to work at all, I think your answer is right.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26461994

http://stackoverflow.com/comment/41544811
comment on: http://stackoverflow.com/a/26450023
score: 0
type: AnswerComment
has text: Are you saying that if you author your modules correctly then the nested require is not necessary?
type: Comment

http://stackoverflow.com/comment/41478695
has text: It shows the same thing. It also says that `og:title www.example.com` and that's not correct. When I view the source of my site it's ` `
score: 0
comment on: http://stackoverflow.com/q/26415371
type: Comment
type: QuestionComment

tabs
type: Tag
tags question: http://stackoverflow.com/q/26432414
tags question: http://stackoverflow.com/q/26362545
tag name: tabs
tags question: http://stackoverflow.com/q/26410394
tags question: http://stackoverflow.com/q/26379171

http://stackoverflow.com/comment/41408606
comment on: http://stackoverflow.com/q/26376444
has text: The UI isn't updated until the loop completes because JS is single threaded. You could try putting your nested loops inside `setTimeout` calls with a very low interval, although this may not work in all browsers. A better solution would be to only show the content needed on the page. Showing an entire book in one page is completely pointless IMO.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26388383
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26386777
score: 1
has comment: http://stackoverflow.com/comment/41431856
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Give the object tag some css: .objectclass { background-image:url(imageurl.gif); background-position:center center; background-repeat:no-repeat; } If your object data doesn't cover up the gif, just change the object tags classname in the data onload event.
has comment: http://stackoverflow.com/comment/42755462
has comment: http://stackoverflow.com/comment/41455739
answers question: http://stackoverflow.com/q/26386777

http://stackoverflow.com/comment/41478135
has text: wow. duh. thank you. do you know how I can select a default value for this dropdown? Angular shows a blank as default.
comment on: http://stackoverflow.com/a/26415205
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26389175
has answer: http://stackoverflow.com/a/26390761
accepted answer: http://stackoverflow.com/a/26389318
has comment: http://stackoverflow.com/comment/41431931
tagged with: switch-statement
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26390761
has title: Using switch to display specific drop down menu options
tagged with: javascript
has comment: http://stackoverflow.com/comment/41432030
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26389318
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41432960
has body: New to Javascript and am trying to create a simple switch statement to display and hide specific selection options from drop down menus. Not sure what I am doing wrong. All help is appreciated. Thanks function showHall() { var x = document.getElementById("schoolName").value; switch (x) { case "williams_college": document.getElementById("williamsHall").style.display = "block"; document.getElementById("albanyHall").style.display = "none"; break; case "suny_albany": document.getElementById("albanyHall").style.display = "block"; document.getElementById("williamsHall").style.display = "none"; break; default: document.getElementById("albanyHall").style.display = "none"; document.getElementById("williamsHall").style.display = "none"; break; } } Select School: Select Your School SUNY ALBANY WILLIAMS COLLEGE Hall: Select Your Hall AGARD ARMSTRONG OTHER HALL NOT ASSIGNED Select Your Hall ALBANY HALL1 ALBANY HALL2 ALBANY HALL3 OTHER HALL NOT ASSIGNED
has comment: http://stackoverflow.com/comment/41432543

http://stackoverflow.com/q/26506805
tagged with: postal-code
type: Question
has title: Javascript regex error with 'm' flag, 'invalid regexp group' when regex is valid and working elsewhere
tagged with: javascript
score: 0
answer count: 1
has body: This line of regex is breaking in javascipt, however when using a regex tester it works correctly: var pattern = new RegExp(/^(?m)^([A-Z0-9]{2,4})(?:\s*[A-Z0-9]{3})?$/); "SL44BZ".match(pattern); How do I make this work with javascript's .match()? It should return an array of two results splitting at the 'SL4'. It looks like this issue is with the multiline '(?m)' flag, however if I remove this wrong results are returned.
has comment: http://stackoverflow.com/comment/41644465
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41644326
has answer: http://stackoverflow.com/a/26507145
tagged with: regex
tagged with: match

http://stackoverflow.com/q/26510034
has body: I'm new with AngularJS and SignalR but I've ran into an issue that I just haven't been able to resolve or find other similar postings that might help me. Sorry that this became fairly lengthy but I wanted to supply as much information as possible. I'm trying to create a fairly simple SPA in which the page will have three basic areas. A Lobby (like a sign in area), then an Admin section and a User section. So based on how they sign in, they would be displayed either the Admin section or the User section. (Which all this works fine for me) Between the Admin section and User sections I have a chat area so messages can be sent back and forth between the Admin and any users connected in. But on the specific page, I get the display for the message that was entered, but it will 'not' display any messages coming from the other users (or Admin). I can see in the console that the message is received by the other page and it's added to the messages array but it acts like there are two messages array so it's not combining the messages into the same array to be displayed. I'll show this below after the code segments. Both of these chat areas are displaying the same messages array as: User chat area: {{msg.message}} Send Admin chat area: {{msg.message}} Send I have the following ChatHub method created: public void SendMessage(SendData data) { Clients.Group(data.roomNumber, Context.ConnectionId).newBroadcastMessage(data.name + ": " + data.message); } In my controller I have a variable defined as: $scope.messages = []; I then have the following directives declared: $scope.sendMemberMessage = function () { chat.server.sendMessage({ name: $scope.name, message: $scope.newMemberMessage, roomNumber: $scope.roomNumber }); displayMessage("You: " + $scope.newMemberMessage); $scope.newMemberMessage = ""; }; $scope.sendAdminMessage = function () { chat.server.sendMessage({ name: $scope.name, message: $scope.newAdminMessage, roomNumber: $scope.adminRoomNumber }); displayMessage("You: " + $sco…
tagged with: javascript
type: UnansweredQuestion
answer count: 1
has title: AngularJS with SignalR $scope variable issue
tagged with: angularjs
type: Question
score: 0
has answer: http://stackoverflow.com/a/26618070
tagged with: signalr
tagged with: angularjs-scope

http://stackoverflow.com/comment/41484134
has text: @Mihir— *window.event* is not supported by a large percentage of browsers in use.
comment on: http://stackoverflow.com/q/26418587
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26439939
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26440666
type: Question
has comment: http://stackoverflow.com/comment/41523724
has answer: http://stackoverflow.com/a/26444783
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41523512
possible better answer: http://stackoverflow.com/a/26440134
score: 0
has comment: http://stackoverflow.com/comment/41523624
has body: How can i get all DOM which attribute data-"value" in grater then 100 and less then 500
has answer: http://stackoverflow.com/a/26440134
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/41557311
has answer: http://stackoverflow.com/a/26440105
accepted answer: http://stackoverflow.com/a/26440105
has title: Jquery data Attribute conditional Selector
upvote count: 1

http://stackoverflow.com/a/26506856
type: Answer
has comment: http://stackoverflow.com/comment/41644452
answers question: http://stackoverflow.com/q/26504949
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41644311
has body: You can test for the decimal separator and remove it and everything thereafter: // Work out whether decimal separator is . or , for localised numbers function getDecimalSeparator() { return /\./.test((1.1).toLocaleString())? '.' : ','; } // Round n to an integer and present function myToLocaleInteger(n) { var re = new RegExp( '\\' + getDecimalSeparator() + '\\d+$'); return Math.round(n).toLocaleString().replace(re,''); } // Test with a number that has decimal places var n = 12345.99 console.log(n.toLocaleString() + ' : ' + myToLocaleInteger(n)); // 12,345.99 : 12,346 You'll need to change system settings to test thoroughly. Edit If you want to change the built–in toLocaleString, try: // Only modify if toLocaleString adds decimal places if (/\D/.test((1).toLocaleString())) { Number.prototype.toLocaleString = (function() { // Store built-in toLocaleString var _toLocale = Number.prototype.toLocaleString; // Work out the decimal separator var _sep = /\./.test((1.1).toLocaleString())? '.' : ','; // Regular expression to trim decimal places var re = new RegExp( '\\' + _sep + '\\d+$'); return function() { // If number is an integer, call built–in function and trim decimal places // if they're added if (parseInt(this) == this) { return _toLocale.call(this).replace(re,''); } // Otherwise, just convert to locale return _toLocale.call(this); } }()); } This will modify the built–in toLocaleString only if it adds decimal places to integers.
upvote count: 2
has comment: http://stackoverflow.com/comment/41644392
has comment: http://stackoverflow.com/comment/41645222

http://stackoverflow.com/q/26407208
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41463784
type: AnsweredQuestion
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26407268
type: Question
tagged with: facebook
tagged with: php
answer count: 1
score: 0
has body: I am trying to build a simple social media website in which people get to make posts and comment on the postings (Kinda like facebook). In order to fetch the posts and the comments, I have created two simple PHP scripts that get me the results in a json format. I then created two functions in jquery, getPosts() and getComments() to ajax the results. On success, these functions clone() the html frame I have created for each post/comment object that is returned. Here is my html frame:- //This is the div that I clone() for postings //This is the div that I clone for comments This is the getPosts() method to output the posts:- function getPosts(){ //This function gets the posts and clones the html for each post $.ajax({ type : 'GET', url : 'fetchposts.php', dataType: 'json', error : function(){ $('.dash_results_bar').html(' ' + "Sorry, couldn't load posts at the moment. This maybe because we are facing downtime or because the databases are being updated." + ' Retry' + " "); }, success : function(data) { var posts = data.posts; if(posts.length) { $('.KK-post_frame:first').css("display", "block"); $(posts).each(function(index, value){ $('.KK-post_frame:first') .clone(true) .attr('id', (value.post_id)) .find('.KK-post_username').html(value.user_fullname) .end() .find('.KK-post_text').html(value.post_text) .end() .find('.KK-post_comment_thread').attr('data-PID', value.post_id) .end() .appendTo('.KK-posts_feed'); }); $('.KK-post_frame:first').css("display", "none"); } } }); } This is the getComments() method to output the comments under each post:- function getComments(){ $('.KK-post_comment_thread').each(function(){ // I run this method for each comment thread div inside each of my posts div var pid = $(this).attr('data-PID'); // PID is the 'post id' that I use, to identify each comment thread div separately. var self = this; $.ajax({ type : 'POST', url : 'fetchcomments.php', data : 'pid='+pid, // I send the post id to the php script which returns the comments for the parti…
has title: JQuery function not executing on document load
has answer: http://stackoverflow.com/a/26407268

http://stackoverflow.com/a/26379766
score: 2
has comment: http://stackoverflow.com/comment/41414579
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26379716
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26379716
upvote count: 2
type: Answer
has body: You need to use the XPath utility of CasperJS for that since element is an XPath expression and not a CSS selector. var x = require('casper').selectXPath; casper.start('http://store.nike.com/us/en_us/', function () { if(this.exists(x(element))) this.echo('Found it!'); });

http://stackoverflow.com/a/26391973
score: 1
accepted answer of: http://stackoverflow.com/q/26391088
has body: You can add you own "touched" property to the year by using ng-blur and then use that "touched" property to add the right class Year {{year}} See this sample plunker: http://plnkr.co/edit/Wpz27yBw8OXSaYfpkP3z?p=preview
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26391088
upvote count: 1

http://stackoverflow.com/a/26406043
downvote count: 0
has comment: http://stackoverflow.com/comment/125418743
answers question: http://stackoverflow.com/q/26403701
upvote count: 2
type: Answer
score: 2
has body: Try to use Localstorage localStorage.setItem("Idofcheckbox",true) localStorage.getItem("Idofcheckbox") Note : Localstorage will store value as string.
has comment: http://stackoverflow.com/comment/126407443

http://stackoverflow.com/comment/41481700
score: 0
type: AnswerComment
type: Comment
has text: I apologise, Noypi, I was the downvoter. It was because I initially felt you had not understood the OP's question, and I questioned the need to manually bootstrap Angular. However, on reflection, I acknowledge that for the OP's specific question, if this was just a single page where you want to show content until AngularJS has loaded and fully rendered the content, then your solution works. I'm not sure how well it would work if this was just one page in a whole SPA where AngularJS is already bootstrapped, however. Would it work then?
comment on: http://stackoverflow.com/a/26398708

http://stackoverflow.com/a/26356707
type: Answer
upvote count: 4
downvote count: 0
has body: Your javascript code looks like C# code-behind. Assuming it is that case, you need to correct it to: Button b = new Button(); b.ID = "btn_test"; b.Text = "test"; b.OnClientClick = string.Format("function (s, e) {{ alert ({0}); }}", cpt_test);
answers question: http://stackoverflow.com/q/26356645
score: 4

http://stackoverflow.com/comment/41620197
type: QuestionComment
has text: `for(var i = 0; i < data.length; i++) { console.log(data[i]); }` ? Or `console.table(data)`?
score: 1
comment on: http://stackoverflow.com/q/26493285
type: Comment

http://stackoverflow.com/q/26471706
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41580902
has title: Match the character * and not the \* in regex?
has comment: http://stackoverflow.com/comment/41581996
upvote count: 1
type: Question
score: -2
has comment: http://stackoverflow.com/comment/41581545
downvote count: 3
accepted answer: http://stackoverflow.com/a/26472546
has comment: http://stackoverflow.com/comment/41582089
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41582173
has comment: http://stackoverflow.com/comment/41582453
tagged with: regex
has body: I have the following string Item * \* and *. I would like to match the all the * characters and skip the \* one. var input = "Item * \\* and *"; var output = (some regex magic happens here) alert(output); // Item foo \* and foo Any ideas?
has comment: http://stackoverflow.com/comment/41582238
has answer: http://stackoverflow.com/a/26472546

http://stackoverflow.com/q/26374826
tagged with: aggregation-framework
upvote count: 4
downvote count: 0
has title: MongoDB (mongoose) aggregate count instances of specific ObjectIDs in collection
tagged with: node.js
possible better answer: http://stackoverflow.com/a/26375386
type: AnsweredQuestion
has body: Assuming I have a schema that looks something like this: { field: [{ subDoc: ObjectId, ... }], ... } and I have some list of ObjectIds (user input), how would I get a count of those specific ObjectIds? For exmaple, if I have data like this: [ {field: [ {subDoc: 123}, {subDoc: 234} ]}, {field: [ {subDoc: 234}, {subDoc: 345} ]}, {field: [ {subDoc: 123}, {subDoc: 345}, {subDoc: 456} ]} ] and the list of ids given by the user is 123, 234, 345, I need to get a count the given ids, so a result approximating this: { 123: 2, 234: 2, 345: 2 } What would be the best way to go about this?
type: Question
tagged with: mongodb
answer count: 2
tagged with: mongoose
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26375370
accepted answer: http://stackoverflow.com/a/26375370
has answer: http://stackoverflow.com/a/26375386

http://stackoverflow.com/q/26415656
has comment: http://stackoverflow.com/comment/41479160
type: Question
possible better answer: http://stackoverflow.com/a/26415826
has body: I have an input field that I want to populate with the product of two input fields that appear earlier in the form. Item: These input fields can occur multiple times, so I'm attempting to loop over the item_total[] arrray and attach a listener to the focus event. $.each($("[name='item_total[]']"), function( index, value ) { $(this).focus(function() { var value = ? //not sure how to select the value of the two previous input fields // var value = $("item_qty[index]") * $("item_price[index]"); console.log(value); }); });
has answer: http://stackoverflow.com/a/26415808
tagged with: javascript
score: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26415808
has comment: http://stackoverflow.com/comment/41478940
has comment: http://stackoverflow.com/comment/41478980
has answer: http://stackoverflow.com/a/26415856
has answer: http://stackoverflow.com/a/26415705
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26415826
has title: calculate the product of two input fields in javascript using jQuery

http://stackoverflow.com/comment/41632577
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26500133
has text: @myfunkyside well, it can't contain any spaces
score: 0

http://stackoverflow.com/comment/41530228
score: 0
type: Comment
has text: no, but any var declared locally won't be available outside the function you declare it, I suspect you've used `this.func` previously to declare your functionality
type: AnswerComment
comment on: http://stackoverflow.com/a/26438905

http://stackoverflow.com/comment/41477007
has text: ^ The whole point of this site is for people to ask how to do things they do not understand. Your answer provided no information.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26392411
score: 4

http://stackoverflow.com/q/26403511
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26404169
type: UnansweredQuestion
type: Question
has title: Getting 404 response becaues ajaxSetup adds timestamp to GET parameters
has body: I have used $.ajaxSetup({ cache: false }); to stop caching of file in browser but it appends timestamp in along with GET request and now I'm getting 404-file not found response from server when requesting file using $.getJSON() because of this parameter after file url >?=1413455027207 >>>i.e. "http://test.com/objListObjlist.json?=1413455027207 " Anybody have any solution how can i handle this parameter in GET request?? and yes I'm using HTML,Javascript only :)
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/26418080
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41485602
has body: I currently utilize the createdRow callback to append buttons (with link) into one of the columns in a datatables. But this doesn't work when the window is resized (smaller) and that column is hidden (only shown when expanded), since createdRow will no longer be called. Is there any way to cater for this situation? Updated: Column 7 initially contains Id of the respective item (data[7]). In the createdRow callback, I replace the Id with 3 clickable icons (view/Update/Delete). createdRow: function (row, data, dataIndex) { $(row).children().eq(7).html("") .append($("&lt;i&gt;").addClass("fa fa-eye mr5").attr("title", "Details").css("cursor", "pointer") .click(function () { window.location.href = self.urlViewCam + "/?id=" + encodeURIComponent(data[7]); })) .append($("&lt;i&gt;").addClass("fa fa-pencil mr5").attr("title", "Update").css("cursor", "pointer") .click(function () { window.location.href = self.urlUpdateCam + "/?id=" + encodeURIComponent(data[7]); })) .append($("&lt;i&gt;").addClass("fa fa-trash-o").attr("title", "Delete").css("cursor", "pointer") .click(function () { if (self.confirmationModal) { $('#divConfirmMsg').text("Do you want to delete \"" + data[0] + "\"?"); $('#btnConfirmDelete').click(function () { deleteCamera(data[7]) }); self.confirmationModal.modal("show"); } else if (confirmDelete(data[0])) { deleteCamera(data[7]); } })); } Current workaround: When details are expanded, search for the next 'tr' (the expanded row), and modify its content. $(self.detailedTableElem).on('click', 'tr', function () { var camName = $(this).children().eq(0).text(); if (self.table.row($(this)).child.isShown()) { $(this).next('tr').find('li &gt; span.dtr-title').each(function () { if ($(this).text() == functionColName + ":") { appendIcons(camName, $(this).next('span.dtr-data')); } }); } });
type: Question
has comment: http://stackoverflow.com/comment/41671237
has title: Appending elements to datatables column
has comment: http://stackoverflow.com/comment/41597584
has comment: http://stackoverflow.com/comment/41487786
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41486412
score: 0
has comment: http://stackoverflow.com/comment/41671788
has comment: http://stackoverflow.com/comment/41673680
tagged with: datatables
has comment: http://stackoverflow.com/comment/41673592
has comment: http://stackoverflow.com/comment/41485165
answer count: 0

http://stackoverflow.com/comment/41509644
comment on: http://stackoverflow.com/a/26428196
has text: Nope. Checked this out, no effect.
score: 0
type: AnswerComment
type: Comment

checkbox
tag name: checkbox
tags question: http://stackoverflow.com/q/26436596
tags question: http://stackoverflow.com/q/26486056
tags question: http://stackoverflow.com/q/26417992
tags question: http://stackoverflow.com/q/26459196
tags question: http://stackoverflow.com/q/26377509
tags question: http://stackoverflow.com/q/26503926
tags question: http://stackoverflow.com/q/26399702
tags question: http://stackoverflow.com/q/26424222
tags question: http://stackoverflow.com/q/26488658
tags question: http://stackoverflow.com/q/26409987
tags question: http://stackoverflow.com/q/26385703
tags question: http://stackoverflow.com/q/26505582
tags question: http://stackoverflow.com/q/26502602
type: Tag
tags question: http://stackoverflow.com/q/26378660
tags question: http://stackoverflow.com/q/26509637
tags question: http://stackoverflow.com/q/26486441
tags question: http://stackoverflow.com/q/26423640
tags question: http://stackoverflow.com/q/26492525
tags question: http://stackoverflow.com/q/26375638
tags question: http://stackoverflow.com/q/26504378

http://stackoverflow.com/comment/41481465
has text: Try using `pointer-events: none` property. I haven't tried it on an `iframe` though.
comment on: http://stackoverflow.com/q/26417095
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26477460
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41953664
type: Answer
answers question: http://stackoverflow.com/q/26476800
accepted answer of: http://stackoverflow.com/q/26476800
score: 1
has body: I haven't found any good client side solution yet, so here is a little php-serverside function. For anyone who needs it: function specialchars($special) { $replace = array( '&lt;' =&gt; '&amp;lt;', '&gt;' =&gt; '&amp;gt;', '&amp;' =&gt; '&amp;amp;' ); return strtr($special, $replace); } Use the function specialchars based on your needs.
upvote count: 1

http://stackoverflow.com/a/79046470
type: Answer
has body: You can do so by using the Droidscript application, it is just Android studio's minimised version (initially) for androids itself, allows direct publishing of html, css and js (browser-js, nodejs), and even python DroidScript is an easy to use, portable coding tool which simplifies android app development. It dramatically improves productivity by speeding up development by as much as 10x compared with using the standard development tools. (FROM THEIR SITE) Yes, you can create an android application using only HTML and JS as the core language and access the device components as well! You can search for Droidscript application on Play store in case you wish to develop the app from android only (DroidScript: JS and Python IDE) or use their VS code extension. Site: https://droidscript.org, Sample apps: https://ds.justplayer.de, Docs: https://droidscript.github.io/Docs
answers question: http://stackoverflow.com/q/26381356
score: 0

http://stackoverflow.com/a/26434098
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41513058
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41513030
answers question: http://stackoverflow.com/q/26434018
has body: jQuery.extend does what you want. var obj1 = { id: 1, styles: { background: "white" } }; var obj2 = { id: 2, styles: { border: "1px solid #ccc" } }; var merged = jQuery.extend(true, obj1, obj2); // desired outcome console.log(merged); console.log({ id: 2, styles: { background: "white", border: "1px solid #ccc" } });

http://stackoverflow.com/q/26358058
has comment: http://stackoverflow.com/comment/128864955
tagged with: exception
type: UnansweredQuestion
upvote count: 6
has answer: http://stackoverflow.com/a/26358123
has body: I know that using following block, it is able to catch an Exception. try{ // Code }catch(err){ alert(err.message); } Say, I want to catch a NumberFormatException. How can I catch a specific Exception using JavaScript? (I actually want to catch NumberFormatException, InterruptedException, ConnectException which are well defined in Java)
score: 6
type: Question
linked to: http://stackoverflow.com/q/1433558
has comment: http://stackoverflow.com/comment/41374578
tagged with: javascript
linked to: http://stackoverflow.com/q/3656854
has title: Catch specific Exception in JavaScript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41374615
favorite count: 0

http://stackoverflow.com/a/29395439
answers question: http://stackoverflow.com/q/26452941
type: Answer
upvote count: 1
has body: Don't use the values as geometry.location.**k**, it depends on minimized file (with some tool like MinifyJS) then it'll changes when google release a new versión.
score: 1
downvote count: 0

http://stackoverflow.com/comment/41437279
type: QuestionComment
has text: Could you please provide a working Plnkr or JSFiddle?
comment on: http://stackoverflow.com/q/26392038
score: 0
type: Comment

http://stackoverflow.com/comment/41509327
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26430624
has text: I accepted jfriend00's answer because it showed me how to resolve conflicts between users. I really like your idea of writing a function that generates random numbers one digit at a time, though. Now that this is worked out with a little more effort I could change the generated id number from base 16 (0-f) to base 62 (0-Z). That should increase the probability of uniqueness exponentially even if it takes a few more ms to generate the number. I will try to remember to come back when I have more reputation to upvote this.

http://stackoverflow.com/comment/41402906
comment on: http://stackoverflow.com/q/26373020
score: 0
has text: You don't have a method named `Deck`.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41497890
comment on: http://stackoverflow.com/a/26426291
type: Comment
has text: return false will prevent other handlers to execute
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41582508
type: Comment
has text: Try to debug the length of the filter and check what it gives you
type: QuestionComment
comment on: http://stackoverflow.com/q/26472490
score: 0

http://stackoverflow.com/q/26426517
favorite count: 0
accepted answer: http://stackoverflow.com/a/26426692
downvote count: 2
score: -2
has body: How to parse HTML that is being returned by JSON object. Image URL : https://i.sstatic.net/aRbpW.jpg How can i parse only "Deal Price" from above HTML ?
answer count: 1
tagged with: http://stackoverflow.com/tag/json
has title: How to parse HTML that is being returned by JSON object
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26426692
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/41373532
comment on: http://stackoverflow.com/q/26357277
has text: So you never get `call3 resolved` log or test fails?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27826857
type: Answer
has comment: http://stackoverflow.com/comment/44059752
score: 0
answers question: http://stackoverflow.com/q/26431392
has body: You probably got an answer long ago, but just in case You need to change your Select options to reflect the new paging 5 5 10 15 20 25 30

http://stackoverflow.com/comment/41470856
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26411429
has text: On another note. Lol @ the off by 1 bug. Excellent programmers over at Facebook.

http://stackoverflow.com/a/26484863
accepted answer of: http://stackoverflow.com/q/26484805
type: Answer
answers question: http://stackoverflow.com/q/26484805
score: 2
has comment: http://stackoverflow.com/comment/41664649
has comment: http://stackoverflow.com/comment/41618541
has body: You can always declare a variable in the parent scope: var myFunction = function(foo){ var func = this; this.foo = foo; this.bar = { bar: function(){ return func.foo; } } } var f = new myFunction('foo'); alert(f.bar.bar());
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41611822
upvote count: 2

http://stackoverflow.com/comment/41381101
type: Comment
type: QuestionComment
has text: @jQueryAngryBird I am currently work with Jay's answer. I'll also try your once and after I vote. :) And how can I get Index ? I only pass value
comment on: http://stackoverflow.com/q/26360929
score: 0

http://stackoverflow.com/comment/41396272
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26366195
has text: It can look like this (it's simplify), there can be more taxonomies: `[ { "ID" : 21 , "post_title" : "Air Bank" , "post_excerpt" : "" , "info_maximalni_vyber" : "0" , "prispevek_unicef" : "0" , "taxs" : { "bank" : [ { "term_id" : 4 , "name" : "Air Bank" , "slug" : "air-bank" , "term_group" : 0 , "term_taxonomy_id" : 4 , "taxonomy" : "bank" , "description" : "" , "parent" : 0 , "count" : 1 , "filter" : "raw" } ] } }] `

http://stackoverflow.com/comment/41376274
has text: By far the best solution here, but I really think that the actual need might be more complicated than this, unless this is for a game.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26359046
type: AnswerComment

http://stackoverflow.com/q/26435441
has answer: http://stackoverflow.com/a/26435561
has title: How to get the elements surrounding a selected element in a matrix
has body: I have a 3x3 matrix and when I select a element in this matrix, I need to find elements surrounding that element(i.e.top, left, right, bottom). Below is the code I used to create a 3x3 matrix - You can view this // declare array of multi dimensions var arrOfArr = new Array(3); // or declare as [[],[],[]] as suggested by Elijah // allocate storage for (var x = 0; x &lt; arrOfArr.length; x++) { arrOfArr[x] = new Array(3); } // Populate the array // first array arrOfArr[0][0] = "00"; arrOfArr[0][1] = "01"; arrOfArr[0][2] = "02"; // second array arrOfArr[1][0] = "10"; arrOfArr[1][1] = "11"; arrOfArr[1][2] = "12"; // third array arrOfArr[2][0] = "20"; arrOfArr[2][1] = "21"; arrOfArr[2][2] = "22"; alert(arrOfArr); If I select an element in this matrix, I need to get top,left,right and bottom element of the selected element. How can I do this
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41515573
tagged with: javascript
score: 0
answer count: 3
tagged with: matrix
has answer: http://stackoverflow.com/a/26435643
has answer: http://stackoverflow.com/a/26437056
tagged with: jquery

http://stackoverflow.com/q/26484137
upvote count: 1
has comment: http://stackoverflow.com/comment/41606097
type: Question
has comment: http://stackoverflow.com/comment/41606530
has body: I try to update a HighCharts with setData() method with data from a successfully ajax response: $.ajax({ type: "POST", url: "createHighChartsContent.do", data: "document=Test", success: function(data) { data = JSON.parse(data); console.log(data); $("#chart01").highcharts().series[0].setData([data]); } }); &lt;div style="font-size: 2px; font-family: Verdana; margin-bottom:0px;"&gt; &lt;div id="chart01" style="height: 732px; margin: 0 auto"&gt;&lt;/div&gt; &lt;/div&gt; The servlet which creates the response looks like this: protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) { String json = new Gson().toJson("{x:1406199133117,y:5,name:'Test'}"); try { resp.getWriter().write(json); } catch (IOException e) { e.printStackTrace(); } } Problem: The HighChart instance is not updated. If I try to set the data in ajax response manually: $j("#chart01").highcharts().series[0].setData([{x:1406199133117,y:5,name:'Test'}]) it is working like expected. Whats wrong here? Edit: So, yes the JSON string is not valid. I try it with SteveP changes but it does not work. I think the main problem is that setData() needs an array with a valid JavaScript OBJECT. Following code is working: var s = {x:1406199133117,y:5,name:'Test'}; console.log(s); var arr = []; arr.push(s); $("#chart01").highcharts().series[0].setData(arr); JavaScript console shows Object {x: 1406199133117, y: 5, name: "Test"} I did not get it working to create such a object from the ajax data response. The HighChart is created this way: $("#chart01").highcharts({ chart: { //renderTo: "chart01", type: 'bar' }, title: { text: '' }, xAxis: { type: 'datetime', dateTimeLabelFormats: { week: '%e. %b %Y' }, offset: 10, maxZoom: 7 * 24 * 3600000 // seven days }, yAxis: { title: { text: 'Defects Count' }, minTickInterval: 1 }, plotOptions: { series: { stacking: 'normal' } }, series: [ { name:'Test', data: [] } ] });
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/41609368
has comment: http://stackoverflow.com/comment/41609569
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41609414
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26486105
has title: Set HighCharts data from JSON string with setData() function
score: 1
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/26375888
favorite count: 0
type: UnansweredQuestion
has body: I have nodeApp. It does stuff. At a particular time I need to communicate with an API that out there in the wild. Using the API in rest tool like Postman is straight forward: Postman Url: https://epicurl Headers: Content-Type : application/json Accept : application/json x-key : secret Body: { "some":"kickass" "data":"here" } Sending the above in Postman I get a nice quick response! Yay for rest tools. So their API works, now I need to make that same response in my Node.js application. This is where things get odd... Request Module: FAILS var request = require('request') ...lots_of_other_stuff... var options = { uri: 'https://epicURL', method: 'POST', json: true, headers : { "Content-Type":"application/json", "Accept":"application/json", "x-key":"secretbro" }, body : JSON.stringify(bodyModel) }; request(options, function(error, response, body) { if (!error) { console.log('Body is:'); console.log(body); } else { console.log('Error is:'); logger.info(error); } cb(body); //Callback sends request back... }); The above fails.. It throws the good'ol ECONNRESET error that we all love! Why? Who knows? https.request() - WORKS! var https = require("https"); https.globalAgent.options.secureProtocol = 'SSLv3_method'; var headers = { "Content-Type":"application/json", "Accept":"application/json", "x-key":"nicetrybro" } var options = { host: 'www.l33turls.com', port:443, path: "/sweetpathsofjebus", method: 'POST', headers: headers }; var req = https.request(options, function(res) { res.setEncoding('utf-8'); var responseString = ''; res.on('data', function(data) { responseString += data; }); res.on('end', function() { var resultObject = responseString; //Call the callback function to get this response object back to the router. cb(resultObject); }); }); req.on('error', function(e) { console.log(e); }); req.write(bodyString); req.end(); But then I notice... If i leave this line of code in place when using the Request Module it then works... var https = require("https"); https.global…
tagged with: node.js
answer count: 0
downvote count: 0
score: 1
tagged with: node-request
tagged with: post
type: Question
tagged with: javascript
has title: Post Method works using https.request but not with Needle or Request libraries
tagged with: express
upvote count: 1

http://stackoverflow.com/a/26397808
has comment: http://stackoverflow.com/comment/41447947
has comment: http://stackoverflow.com/comment/41447652
has comment: http://stackoverflow.com/comment/41447982
has comment: http://stackoverflow.com/comment/41447312
answers question: http://stackoverflow.com/q/26397534
has body: Okkay..Thanks For Your Reply... You Can Have To Use STYLE After &lt;table id="printTable"&gt; Like This SEE HERE OR You Can Put Style sheet in another .css file then include them after &lt;table id="printTable"&gt; I Think It Will Work For You
score: 0
has comment: http://stackoverflow.com/comment/41446769
type: Answer

http://stackoverflow.com/q/26452359
answer count: 3
has answer: http://stackoverflow.com/a/26454631
has answer: http://stackoverflow.com/a/26471253
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26470913
favorite count: 0
has answer: http://stackoverflow.com/a/26470913
upvote count: 8
tagged with: browserify
has title: Updated to Angular 1.3.0 no longer working
score: 8
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26471253
has comment: http://stackoverflow.com/comment/41579046
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41579198
type: Question
has body: I am using Browserify to wrap everything up. I have just upgraded from 1.2.23 to 1.3.0 and am now getting the following errors: Firefox Error TypeError: angular.module is not a function var app = angular.module('login-Controller', ['Views']); ----------^ Clearly says that angular is not defined. So I outputed the output from angular var angular = require('angular'), console.info(angular); // Object {} ='s an empty object Does this mean that angular is no longer compatible with browserify? If it is, how can I get it working? Detailed Error from Chrome Uncaught TypeError: undefined is not a function main.js:25868 C:\var\www\stage.mayfieldafc.com\src\site\js\users\loginCntrl.js.angularmain.js:1 smain.js:1 (anonymous function)main.js:28 ./src/site/js/app.js.angularmain.js:1 smain.js:1 emain.js:1 (anonymous function) main.js:183 Uncaught Error: [$injector:modulerr] Failed to instantiate module mays due to: Error: [$injector:nomod] Module 'mays' 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. http://errors.angularjs.org/1.3.0/$injector/nomod?p0=mays at http://localhost:3000/js/main.js:183:12 at http://localhost:3000/js/main.js:1900:17 at ensure (http://localhost:3000/js/main.js:1824:38) at module (http://localhost:3000/js/main.js:1898:14) at http://localhost:3000/js/main.js:4167:22 at forEach (http://localhost:3000/js/main.js:438:20) at loadModules (http://localhost:3000/js/main.js:4151:5) at createInjector (http://localhost:3000/js/main.js:4077:11) at doBootstrap (http://localhost:3000/js/main.js:1587:20) at bootstrap (http://localhost:3000/js/main.js:1608:12) http://errors.angularjs.org/1.3.0/$injector/modulerr?p0=mays&amp;p1=Error%3A%20…at%20bootstrap%20(http%3A%2F%2Flocalhost%3A3000%2Fjs%2Fmain.js%3A1608%3A12)main.js:183 (anonymous function)main.js:4190 (anonymous function)main.js:438 forEachmain.js:4151 loadModulesmain.js:4077 createInjectormain.js:1…

http://stackoverflow.com/q/26378587
accepted answer: http://stackoverflow.com/a/26379568
tagged with: javascript
score: 0
answer count: 2
has body: I'm trying to build an online quiz, I've done most of it - questions get selected randomly from database one at a time, user enters/selects an answer, there is a response, another random question pops up - I've done all that, the tricky aspect is how to attach a timer(Javascript, I guess) to the instance the question pops up and when a response is entered...any general guideline on how to do this? Thanks.
favorite count: 0
tagged with: timer
has answer: http://stackoverflow.com/a/26379568
has title: Setting Timer For Online Quiz
tagged with: php
possible better answer: http://stackoverflow.com/a/50968552
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/50968552
upvote count: 2
downvote count: 2
type: Question

http://stackoverflow.com/comment/41654641
type: Comment
comment on: http://stackoverflow.com/q/26510254
has text: Use a mix that would never happen in the code and use that as the separator /delimiter '||||'...can't u remove the tabs in the JS ?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41463272
type: Comment
score: 0
type: AnswerComment
has text: Hi Kamil, tnx for your reply. I get the tooltip, but do you maybe know how can I draw single points on my line chart?
comment on: http://stackoverflow.com/a/26400486

http://stackoverflow.com/a/26513148
has body: Try attaching a change event to your file input. When a file is selected from the dialog, the event will fire and you can submit your form: &lt;form ... &gt; &lt;input type="file" id="myFile" name="myFile" /&gt; &lt;/form&gt; Attach a listener to the change event, and submit the form: $("#myFile").on("change", function (evt) { $(this).closest("form").submit(); }); If the dialog is cancelled, no event is triggered.
answers question: http://stackoverflow.com/q/26512775
score: 0
type: Answer

http://stackoverflow.com/a/26490543
type: Answer
has comment: http://stackoverflow.com/comment/41615444
has comment: http://stackoverflow.com/comment/41615220
has comment: http://stackoverflow.com/comment/41616470
score: 1
answers question: http://stackoverflow.com/q/26490452
has body: You're doing your fetch loop wrong: while($row = $stmt-&gt;fetchAll(PDO::FETCH_ASSOC)) { ^^^^^^^^ fetchAll() returns ALL of the rows as an array of arrays, e.g. $rows = array( 0 =&gt; array( contents of row #1) 1 =&gt; array( contents of row #2) Which means the while() loop is utterly pointless. fetchAll will work only ONCE anyways, so there's no point in looping. All you need is $rows = $stmt-&gt;fetchAll(PDO::FETCH_ASSOC) echo json_encode($rows); And then in your client-side javascript: text_to_display = data_from_server[0].movieName;
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41641234
has comment: http://stackoverflow.com/comment/41615496
has comment: http://stackoverflow.com/comment/41616340
has comment: http://stackoverflow.com/comment/41615854

http://stackoverflow.com/q/26407665
has comment: http://stackoverflow.com/comment/41465357
answer count: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41466705
has comment: http://stackoverflow.com/comment/41464005
has comment: http://stackoverflow.com/comment/41467753
has body: I'm having some javascript issues with some legacy code, since my company is attempting to upgrade to IE11 from IE8. I have a piece of javascript that finds all commas in a field and replaces it with a couple characters, it is as follows: document.frm.txt_fieldValue[1].value = document.frm.txt_fieldValue[1].value.replace(/,/gi, "$0"); In my code this is all on one line, however. This code works in IE8, Chrome, and Firefox. However, in IE9+, specifically IE11 (since this is what my company is upgrading to), this code doesn't replace any commas. I can get it to replace a single comma by using the following code: document.frm.txt_fieldValue[1].value = document.frm.txt_fieldValue[1].value.replace(",", "$0"); Because I replaced a single comma, I know my code is reached. But I have searched around and I have yet to find a solid answer. Does anyone else have this problem? If so, has anyone found a solution? Thanks!
has title: Javascript replace with regular expression not working in IE 11
has answer: http://stackoverflow.com/a/26409810
possible better answer: http://stackoverflow.com/a/27281949
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27281949
tagged with: internet-explorer-11
score: 1
has comment: http://stackoverflow.com/comment/41466807
upvote count: 1
has comment: http://stackoverflow.com/comment/41466302
type: Question
accepted answer: http://stackoverflow.com/a/26409810
has comment: http://stackoverflow.com/comment/41465230
tagged with: javascript
has comment: http://stackoverflow.com/comment/41465176
has comment: http://stackoverflow.com/comment/41465133
has comment: http://stackoverflow.com/comment/41464382

http://stackoverflow.com/q/26449049
has comment: http://stackoverflow.com/comment/41540801
has body: I'm trying to use JavaScript to convert a COLORREF: COLORREF: When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. To create a COLORREF color value, use the RGB macro. To extract the individual values for the red, green, and blue components of a color value, use the GetRValue, GetGValue, and GetBValue macros, respectively. I know about UInt32Array but I don't know how to use it. How can I convert from COLORREF to RGB? It should be the opposite of this function I found: cssColorToCOLORREF: function(csscolor) { let rgb = csscolor.substr(1); let rr = rgb.substr(0, 2); let gg = rgb.substr(2, 2); let bb = rgb.substr(4, 2); return parseInt("0x"+bb+gg+rr); },
has title: COLORREF to RGB
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26449772
has comment: http://stackoverflow.com/comment/41540896
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26449772

http://stackoverflow.com/q/26364037
has answer: http://stackoverflow.com/a/26380587
answer count: 1
downvote count: 0
tagged with: asynchronous
favorite count: 0
tagged with: promise
accepted answer: http://stackoverflow.com/a/26380587
type: AnsweredQuestion
has body: I have the following function: var getUserInList = function(email){ console.log('getUserInList email:'+email); element.all(by.repeater('user in users')).filter(function(el, index){ console.log('index:'+index); return el.element(by.binding('user.email')).getText().then(function(text){ console.log('text:'+text+' email:'+email); return text === email; }); }).then(function(els){ console.log('els length'+els.length+'els[0]'+els[0]); if(els.length === 0)return null; return els[0]; }); }; On the first call it gives the following output to the console: .getUserInList email:test2@test.com end create index:0 index:1 index:2 text:test2@test.com email:test2@test.com text:test@test.com email:test2@test.com text:rory.gilfillan@gmail.com email:test2@test.com els length1els[0][object Object] index:0 index:1 index:2 text:test2@test.com email:test2@test.com text:test@test.com email:test2@test.com text:rory.gilfillan@gmail.com email:test2@test.com index:0 index:1 index:2 text:test2@test.com email:test2@test.com text:test@test.com email:test2@test.com text:rory.gilfillan@gmail.com email:test2@test.com .start delete getUserInList email:test3@test.com Amazingly although the function supposedly returns a value in line 9 in the console, the function continues to run. Then when the function is called again, it simply return undefined, no promise is returned. The first console output of the function is there but nothing after that. This makes no sense to me.
has title: Protractor element all filter broken
score: 1
upvote count: 1
type: Question
tagged with: protractor
tagged with: javascript

http://stackoverflow.com/comment/42199426
has text: So there is no way to have the getViewValue() be called in the compile or link phase of the directive once without watch?
type: Comment
comment on: http://stackoverflow.com/a/26428010
score: 0
type: AnswerComment

http://stackoverflow.com/q/26456252
has title: When using (substack's) Tape module for testing, how do I run only one test in a file?
tagged with: tap
tagged with: node.js-tape
answer count: 1
has answer: http://stackoverflow.com/a/27263679
favorite count: 0
tagged with: node.js
score: 14
type: AnsweredQuestion
upvote count: 14
accepted answer: http://stackoverflow.com/a/27263679
has body: When using Tape how do I run a specific test and ignore all other tests?
tagged with: unit-testing
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41436459
type: Comment
has text: can you provide your updated code or can you set up something in jsfiddle, most likely it will be a scope issue, where you're creating your div and where you're creating your widget, one more thing instead of using document.createelement try using domconstruct.create. Please provide more information
comment on: http://stackoverflow.com/a/26391115
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41611622
type: Comment
has text: I've tried this method before. I just get a generic require error when doing it this way: `Warning: JavaScript error: Error: Script error http://requirejs.org/docs/errors.html#scripterror on line 1765 for http://localhost:3000/test/lib/require.js`.
comment on: http://stackoverflow.com/a/26476625
score: 0
type: AnswerComment

jquery-events
tag name: jquery-events
tags question: http://stackoverflow.com/q/26364351
tags question: http://stackoverflow.com/q/26448785
tags question: http://stackoverflow.com/q/26420480
tags question: http://stackoverflow.com/q/26424805
tags question: http://stackoverflow.com/q/26448896
type: Tag
tags question: http://stackoverflow.com/q/26432381
tags question: http://stackoverflow.com/q/26496820
tags question: http://stackoverflow.com/q/26391577

http://stackoverflow.com/comment/41584995
has text: I want to trigger the change function when the cat_id is changed.But, cat_id is not receiving any value when I select Main category value.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26469192

http://stackoverflow.com/a/26505373
has comment: http://stackoverflow.com/comment/41641789
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26505309
has body: var arr = [ 3, 8, 7, 6, 5, -4, 31, 2, 21, 20, 1 ].sort(function(a, b) { return a - b }), // [-4, 1, 2, 3, 5, 6, 7, 8, 20, 21, 31] min = arr[0], // min max = arr[arr.length-1]; //max
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41642098

http://stackoverflow.com/q/26442617
type: Question
tagged with: google-maps
tagged with: javascript
tagged with: jquery
tagged with: google-maps-api-3
has title: using Google maps to draw multiple maps into page
has answer: http://stackoverflow.com/a/26443112
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: Most of the problem ,when creating div elements using JQuery no maps get Draw in the screen,but by providing them manually the divs ,the maps are fine IF I did put the HTML divs manually the maps appears ,but dynamiclly do not
score: -1
has comment: http://stackoverflow.com/comment/41528433
tagged with: http://stackoverflow.com/tag/json
downvote count: 1

http://stackoverflow.com/q/26461302
tagged with: forms
score: 0
answer count: 1
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/41565466
has answer: http://stackoverflow.com/a/26503891
type: UnansweredQuestion
has title: Backbone Forms weird bug/behavior
tagged with: backbone-forms
has body: BRIEF: I write my custom backbone editor, but Backbone can't initialize it because can't find schema for it. Backbone looks for schema in Form.editors array at backbone-forms.js? How can I register schema of my custom editor? DETAILED: I use Backbone Forms which are initialized in the next way: backbone-forms.js var Form = Backbone.View.extend({ initialize: function(options) { //..... //Check which fields will be included (defaults to all) var selectedFields = this.selectedFields = options.fields || _.keys(schema); _.each(selectedFields, function(key) { var fieldSchema = schema[key]; fields[key] = this.createField(key, fieldSchema); // &lt;==== Here troubles begins }, this); }, //.... }, { //.... editors: {} // &lt;===== QUESTION: where I should put my custom editor in this array??? }); Problem: When Backbone creating new Form it calls createSchema method which looks like: createSchema: function(schema) { //........ //PROBLEM: Form.editors[schema.type] is undefined schema.type = (_.isString(schema.type)) ? Form.editors[schema.type] : schema.type; return schema; } and Form.editors[schema.type] is undefined. That means I can't create/render my custom editor! Question: Where/How I can register my custom editor in Form.editors array?
type: Question
has comment: http://stackoverflow.com/comment/41564860
tagged with: javascript

http://stackoverflow.com/comment/41386262
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26363370
has text: Now that's how you write an answer!
type: Comment

http://stackoverflow.com/comment/41464246
type: AnswerComment
score: 0
type: Comment
has text: Right, because `this` is window (because `setTimeout` is a property of `window`). see my fiddle 2 comments up.
comment on: http://stackoverflow.com/a/26407582

http://stackoverflow.com/comment/41417775
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26381477
type: Comment
has text: No luck mate. Data is still being saved.

http://stackoverflow.com/q/26406719
type: Question
tagged with: visual-studio
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26413375
accepted answer: http://stackoverflow.com/a/26413375
answer count: 1
tagged with: javascript
has title: Minimum Telerik version ASP AJAX for Visual Studio 2013
tagged with: runtime-error
has comment: http://stackoverflow.com/comment/41471614
score: 0
tagged with: telerik
tagged with: undefined
has body: I started using Visual Studio 2013 today and from the get-go I'm having Telerik Issues. All javascript bombs out with message: 0x800a138f - JavaScript runtime error: Unable to get property 'documentElement' of undefined or null reference If there is a handler for this exception, the program may be safely continued. The solution works fine in VS2012 though. All searches point to Telerik being the problem. What is the minimum Telerik Version required for Visual Studio 2013?
has comment: http://stackoverflow.com/comment/41462895

http://stackoverflow.com/a/26386505
has comment: http://stackoverflow.com/comment/41583204
downvote count: 0
has comment: http://stackoverflow.com/comment/41500013
has comment: http://stackoverflow.com/comment/41499830
has comment: http://stackoverflow.com/comment/41481485
type: Answer
answers question: http://stackoverflow.com/q/26386118
score: 1
has comment: http://stackoverflow.com/comment/41496641
has comment: http://stackoverflow.com/comment/41467343
upvote count: 1
has comment: http://stackoverflow.com/comment/41509804
has body: The AnimatedPNG library you are using only checks the variable's value once - when initialized. in your code, you are changing the value after initializing it. $(document).ready( function() { $("#stoptheClock").val(6); // } ); Should be function() { stoptheClock = 6; noiseAnim.draw(false); noiseAnim.setFrameDelay(stoptheClock,1000); } You are not using JQuery for any useful cause in your code, therefore I have removed all of the Jquery parts.
has comment: http://stackoverflow.com/comment/41583186

http://stackoverflow.com/comment/41541034
type: QuestionComment
type: Comment
has text: Why reinventing the wheel? There are lots of solutions including Angular's own [ngResource](https://docs.angularjs.org/api/ngResource).
score: 0
comment on: http://stackoverflow.com/q/26447458

http://stackoverflow.com/a/26452002
answers question: http://stackoverflow.com/q/26451944
score: 0
type: AcceptedAnswer
type: Answer
has body: You could stop the event propagation, but it's discouraged as there could be some library which does something if the user clicks away/anywhere. A better solution is this one: $(document).ready(function() { $('a, div').on('click', function(e) { if (!e.isDefaultPrevented()) { //Don't do anything if we already processed that event. e.preventDefault(); $(this).css({'border-color': 'red'}); } }) });
accepted answer of: http://stackoverflow.com/q/26451944

http://stackoverflow.com/q/26392353
score: 0
has body: I am trying to restrict the jQuery UI DatePicker to Current year only and so far it is working fine at This Demo I used the following code to do the job $("#datepicker").datepicker({ minDate: new Date(2013, 12, 1), dateFormat: 'dd/mm/yy', maxDate: new Date(2014, 11, 31) }); As you can see the Previous and Next buttons disable at January (Previous Click) and December (Next click) but just wondering if there is a way to create a circular action(re start) at the end or beginning like ...<-October <-November <-December <-January -> .... ->November ->December->January -> Feb...> Thanks
has answer: http://stackoverflow.com/a/26392458
type: UnansweredQuestion
has title: How to Loop Into jQuery UI Restricted DatePicker
tagged with: jquery-ui
tagged with: jquery-ui-datepicker
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41594373
comment on: http://stackoverflow.com/q/26478541
score: 0
type: Comment
type: QuestionComment
has text: couldn't even get the toggle function to work. I figure it out thanks anyways

http://stackoverflow.com/q/26453226
downvote count: 0
has title: Javascript Date Gives me EDT but I want EST
has body: I am receiving a MySQL Timestamp in UTC and trying to covert it to the client's local timezone. However, When i do this I get the wrong time zone. Ive formatted my DateTime String to be: var utcTime = 2014-05-15T13:00:00Z However when after my conversion my dateObject is: Date {Thu May 15 2014 09:00:00 GMT-0400 (EDT)}. However, I want my Timezone to be GMT -0500 (EST). I've searched online and saw there is a way to do this by appending "UTC" to a MYSQL formatted Timestamp.. However, this method does not work in all browsers. If anyone has any insight on converting timezones i would appreciate it.
favorite count: 0
has answer: http://stackoverflow.com/a/26471228
has comment: http://stackoverflow.com/comment/41547580
upvote count: 2
has answer: http://stackoverflow.com/a/26529656
type: UnansweredQuestion
tagged with: utc
tagged with: datetime
score: 2
has comment: http://stackoverflow.com/comment/41547689
type: Question
tagged with: javascript
tagged with: date
answer count: 2

http://stackoverflow.com/comment/41433509
type: Comment
type: QuestionComment
has text: Is there any Javascript in the content being loaded?
comment on: http://stackoverflow.com/q/26389712
score: 0

http://stackoverflow.com/comment/41534425
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26436493
has text: SUCCESSSSSSSSS I just returned false in all if statement sections and changed the onsubmit values to return check_form() and everything now works perfectlY!!!!!!!!!! THANKYOUUUUUUUUUUUUUUUUUUU
score: 0

http://stackoverflow.com/q/26438176
type: Question
has comment: http://stackoverflow.com/comment/45553376
tagged with: jquery-backstretch
has comment: http://stackoverflow.com/comment/41531822
has comment: http://stackoverflow.com/comment/41575884
has body: I have used Durandal.js for my SPA. I need to have slideshow of Images as background in certain pages, for which I am using jquery-backstretch. I am fetching images from my web back-end. Everything works fine while navigating between pages in normal speed. But, when I navigate from one of the pages which has backstretch to another one with backstretch very rapidly, Images from backstretch in first page also creeps in second page. When I debugged, only the correct Images were being passed to second page. And also the slideshow is not running in a proper interval. So it must be both the backstretches being invoked. Please tell me how I can stop the previous backstretch from appearing again. Here are the relevant code snippets. This is my first page's(with backstretch) viewmodel code. var id = 0; var backstetcharray; function loadbackstretchb() { backstetcharray = new Array(); $.each(that.products, function (i, item) { if(item.ProductBackImage != "") { backstetcharray.push("xxxxxxxxxx" + item.ProductBackImage); } } ); $.backstretch(backstetcharray, { duration: 5000, fade: 1500 }); } var that; define(['plugins/http', 'durandal/app', 'knockout'], function (http, app, ko) { var location; function callback() { window.location.href = "#individual/"+id; // this.deactivate(); }; return { products: ko.observableArray([]), activate: function () { currentpage = "products"; that = this; return http.get('yyyyyyyyyyyyyyy').then(function (response) { that.products = response; loadbackstretchb(); }); }, attached: function () { $(document).ready(function () { $('.contacticon').on({ 'mouseenter': function () { $(this).animate({ right: 0 }, { queue: false, duration: 400 }); }, 'mouseleave': function () { $(this).animate({ right: -156 }, { queue: false, duration: 400 }); } }); }); $(document).ready(function () { $(".mainmenucont").effect("slide", null, 1000); }); //setTimeout($(".mainmenucont").effect("slide", null, 1000), 1000); $(document).on("click", ".ind1", function (e) { // alert("…
tagged with: javascript
tagged with: jquery
has title: Images from Backstretch(backstretch.js) in onepage creeping in to other page's backstretch in Durandal.js
score: 0
tagged with: durandal
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41556719

http://stackoverflow.com/a/26490105
has comment: http://stackoverflow.com/comment/41614654
downvote count: 1
has comment: http://stackoverflow.com/comment/41614308
answers question: http://stackoverflow.com/q/26489984
score: -1
has comment: http://stackoverflow.com/comment/41614390
has body: You can detect changes in the hash (e.g. http://example.com/#foo) by creating an event handler like so: window.addEventListener('hashchange', function(e) { console.log('Hash has changed!'); }); Specifically to angular, you can use the $routechangestart event to catch changes in the URL (i.e. the route) $rootScope.$on("$routeChangeStart", function (event, next, current) { // do something ... }); Alternatively, you can define your routes via the routeProvider and execute specific controllers based on the route that is set.
upvote count: 0
has comment: http://stackoverflow.com/comment/41614998
type: Answer

http://stackoverflow.com/q/26379916
has title: Passing javascript variable to servlet
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41415215
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26380440
linked to: http://stackoverflow.com/q/4112686
has comment: http://stackoverflow.com/comment/41415415
has comment: http://stackoverflow.com/comment/41418002
downvote count: 0
score: 1
tagged with: java
duplicate of: http://stackoverflow.com/q/4112686
has body: How can I pass a var from javascript to a servlet. Yes I know you can use getParameter on the servlet side, but I first need to do some javascript stuff then from there it need to pass that new variable to servlet. See my Javascript example: function openBrWindowAndSubmit() { var textBodyValue = encodeURIComponent(document.getElementById("textBody").value); alert(textBodyValue); //returns empty document.forms[0].submit(); var textBodyValue = encodeURIComponent(document.getElementById("textBody").value); alert(textBodyValue); //works } As you can see in above example the first "alert" block returns empty, but the second one returns the correct encoded value because the document.forms[0].submit is already called. So is there a way I can get the second variable "textBodyValue" (which is outside of document.forms[0].submit) to the servlet? I'm calling this at the servlet side: String test = req.getParameter("textBody"); Here's the JSP inside a form tag which calls the function on click: &lt;textarea id="textBody" name="textBody"&gt;&lt;/textarea&gt; &lt;input type="button" onClick="openBrWindowAndSubmit();" value="Click Here to Preview Email"&gt; Is there any workaround to this problem? I've been trying to change the javascript function to: function openBrWindowAndSubmit() { //v2.0 document.forms[0].target = "_blank"; document.getElementById("action").value = "view_template"; var textBodyValue = encodeURIComponent(document.getElementById("textBody").value); alert(textBodyValue); document.forms[0].submit(); var textBodyValue = encodeURIComponent(document.getElementById("textBody").value); alert(textBodyValue); $.ajax({ url: 'http://localhost:8080/restricted/comm/Email', data: textBodyValue, // processData: false, // contentType: false, type: 'POST', success: function(data){ alert(data); } }); } Can this work? i'm getting an undefined error when reaching the $ajax tag?
has comment: http://stackoverflow.com/comment/41420937
type: Question
has comment: http://stackoverflow.com/comment/41418837
tagged with: jsp
tagged with: javascript
tagged with: struts
tagged with: servlets

http://stackoverflow.com/a/26471202
score: 2
has comment: http://stackoverflow.com/comment/41582391
has comment: http://stackoverflow.com/comment/41579900
has comment: http://stackoverflow.com/comment/41580612
has comment: http://stackoverflow.com/comment/41580120
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26471098
type: Answer
has body: From the Underscore.js documentation var compiled = _.template("hello: <%= name %>"); compiled({name: 'moe'}); => "hello: moe" It looks like you are not using the _.template method correctly. It returns a compiled template function that you can call with the data to render: var compiledTemplate = _.template( homeTemplate, homeData ); this.$el.html( compiledTemplate( homeData ) );
has comment: http://stackoverflow.com/comment/41580592
accepted answer of: http://stackoverflow.com/q/26471098
upvote count: 2

http://stackoverflow.com/q/26440157
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41523902
tagged with: ajax
type: UnansweredQuestion
upvote count: 0
type: Question
has title: Automatically press enter key after ajax response
has comment: http://stackoverflow.com/comment/41523982
score: -2
tagged with: javascript
has body: I have an input field, on the ajax response I get some records in li tag. On every li there is an onclick function add_values. I want the Enter key to be automatically pressed when the user clicks on any li tag. HTML: JavaScript: function key_up_val(val) { if(val.length > 5) { $.ajax({ url:'ajax/google_suggestion.php', data:'keyword='+val, // KEYWORD PASSED VALUE WILL GO TO google_suggestion.php success:function(res) { if(res != '') { $(".suggestion_div").show(); $("#suggestion").html(res).fadeIn(); } else { $(".suggestion_div").hide(); $("#suggestion").hide(); } //alert(res); // RESPONSE } }); } } function add_val(values){ // this function is used in the ajax request onclick event $("#Search").val(values); // add the clicked suggestion the the searched field //clickevent(); $(".txt_field").focus(); var e = $.Event('keyup'); e.which = 13; // Character 'A' $(".txt_field").trigger(jQuery.Event('keypress', {which: 13})); } On ajax response I get :- tushar morzaria tushar meaning I want to automatically press Enter on the text field when the user clicks on any li tag.
downvote count: 2
has answer: http://stackoverflow.com/a/26440276

http://stackoverflow.com/comment/41515221
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26435142
has text: No... you don't understand... upon clearing the fee, the input should also be disabled so it shouldn't be included in the post. My problem was explained in more detail in one of my comments above. I know that the problem likely has to do with paypal wanting the item numbers to be given to them in sequential order. So, for example... if item number 1,2 and 4 are posted but 3 is missing, item number 4 will not get posted. I'm not sure if this is true but this is what i suspect is happening. I am currently reading the paypal html api for a solution.
type: AnswerComment

http://stackoverflow.com/comment/41393960
type: AnswerComment
has text: Remove this line and you will see. Your CSS Selector makes the first item visible. Somehow when the first item starts hiding this selector applies and shows the second item before hiding ends. so i forced it to keep hiding until hiding of the first finished.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26364989

http://stackoverflow.com/q/26391508
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41450562
score: 0
type: Question
has body: Creating a new selection, and supplying the data works: var svg = d3.select("body").append("svg"); var _nodeSelection = svg.insert("g").selectAll(".node"); var _nodeData = _nodeSelection.data(_nodes); _nodeData .enter().append("text") .attr("class", "node"); After some callback the attributes to all the existing elements change, This works! _nodeData.attr("class", "update"); In another callback I supply new data to the selection, and try to update the existing selection before calling the Enter / Exit routine. // No longer works after supplying new data var _nodeData = _nodeSelection.data(_nodes); // Does not work anymore: _nodeData.attr("class", "update2"); This no longer works, as in the class does NOT get updated to update2. This is surprising to me as according to this example this should work. Consequently, calling .Enter() on the new data selection creates a new set of elements in the sample place as the old elements, so that all the svg elements are duplicated. What am I doing wrong?
tagged with: javascript
answer count: 1
has title: D3 selection no longer updates after supplying new data
has answer: http://stackoverflow.com/a/26420217
tagged with: d3.js

http://stackoverflow.com/q/26386878
has comment: http://stackoverflow.com/comment/41428322
favorite count: 0
tagged with: angularjs
has title: Angular ng-repeat not functioning
has body: I am attempting to display JSON data to a view via an $http() call. I am getting my data back, however, the ng-repeat is not displaying my data properly. I am getting a console error stating "Error: $digest already in progress". Another note is that the getRoundDetails() function is being called in the addRound() from the previous view's submit. I am relatively new to using Angular and have never seen a $digest reference. Please help. Here is my controller.js: statTrackerApp.controller('roundController', function($scope, $http, $window, $route) { $scope.newRound = {}; $scope.savedRound = {}; $scope.roundDetails = []; //I have tried {} as well with no success $scope.facilities = {}; $scope.courses = {}; $scope.tees = {}; $scope.holes = {}; ... $scope.addRound = function () { $http.post("/api/round/", $scope.newRound) .then(function (result) { // Successful //angular.copy(result.data, $scope.facilities); //$window.location = "#/facilities"; $scope.savedRound = result.data; $scope.getRoundDetails(); $window.location.href = '#/roundDetail'; }, function () { // Error alert("Could not save new round"); }); }; $scope.getRoundDetails = function () { $http.get("/api/roundDetail/" + $scope.savedRound.roundId) .then(function (result) { // Successful //angular.copy(result.data, $scope.roundDetails); $scope.roundDetails = result.data; }, function () { // Error alert("Could not load round details."); }); }; }); Here are my 2 view wrappers: Here is the _roundDetails-form.html: Round Details {{roundDetail.roundDetailId}} Here is _round-form.html: Round Facility: {{facility.name}} Course: {{course.name}} Tees: {{tee.name}} Date: Is Official: Holes: Hole by Hole: Total Score:
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41428168
has comment: http://stackoverflow.com/comment/41428455
has comment: http://stackoverflow.com/comment/41428257
score: 1
has comment: http://stackoverflow.com/comment/41428627
has comment: http://stackoverflow.com/comment/41428714
type: Question
has comment: http://stackoverflow.com/comment/41429032
downvote count: 0
tagged with: javascript

sencha-touch
tags question: http://stackoverflow.com/q/26403733
tag name: sencha-touch
tags question: http://stackoverflow.com/q/26504641
tags question: http://stackoverflow.com/q/26364497
type: Tag
tags question: http://stackoverflow.com/q/26462932
tags question: http://stackoverflow.com/q/26489095

http://stackoverflow.com/a/26461101
has comment: http://stackoverflow.com/comment/41561434
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You could do that, yes, but it wouldn't be best practice. It would look something like this: $(document).on("click", "button", function() { switch (this.id) { // (Or whatever you want to use to differentiate the buttons) case "button1": // Do button1's stuff // ... break; case "button2": // Do button2's stuff // ... break; // ...and so on... } }); But it's much better to use separate handlers. They can still be delegated if you're adding and removing buttons dynamically: $(document) .on("click", "#button1", function() { // Again, it doesn't have to be an id... // button1's stuff here }) .on("click", "#button2", function() { // ...just whatever differentiates the buttons // button2's stuff here });
accepted answer of: http://stackoverflow.com/q/26461031
answers question: http://stackoverflow.com/q/26461031
has comment: http://stackoverflow.com/comment/41561969
upvote count: 1
has comment: http://stackoverflow.com/comment/41561648
score: 1

http://stackoverflow.com/q/26458711
type: Question
score: 5
upvote count: 5
tagged with: javascript
has title: disable backface culling for imported .obj file three.js
has body: I am having difficulty turning off wire frame rendering at the backside of my car. How do you turn off backface culling in wire frame mode for three.js ? https://i.sstatic.net/P07lt.jpg
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26471195
type: UnansweredQuestion
tagged with: three.js
tagged with: .obj
tagged with: wireframe

http://stackoverflow.com/comment/41474299
score: 0
type: AnswerComment
has text: There is nothing wrong with my code, nor my answer, except people downvoted it because they needed an explanation for 3 lines of code.
comment on: http://stackoverflow.com/a/26413025
type: Comment

http://stackoverflow.com/comment/41517156
has text: I added the way it's called
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26436319

http://stackoverflow.com/q/26361541
has title: Addclass to Menu Jquery
has comment: http://stackoverflow.com/comment/41381272
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26361734
has comment: http://stackoverflow.com/comment/41381157
has comment: http://stackoverflow.com/comment/41381194
score: 0
has comment: http://stackoverflow.com/comment/41380948
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41381021
has comment: http://stackoverflow.com/comment/41381186
accepted answer: http://stackoverflow.com/a/26361734
has body: I am trying to add a class dynamicly to the menu I have on my website, which is build up as followed. Home Over Jellyfish Blog Contact Websites Support with Jquery I am tryint to add the class active to the mini-menu by doing the following steps. jQuery(function() { var str = window.location.pathname; var page = str.split("/"); p=page[2]; var active = p=page[2]; console.log(active); jQuery('.mini-menu a').each(function() { if (jQuery(this).attr('href') === active) { jQuery(this).addClass('active'); } }); }); Yet i seem to miss something here, cause nothing shows up within the html as adding a class to the link. Am I missing the fact that the link is not a direct child of the class mini-nav? If so, how do I fix this?
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41380910

http://stackoverflow.com/comment/41519547
comment on: http://stackoverflow.com/q/26416476
type: Comment
type: QuestionComment
has text: @sifriday This solely depends on where the error is located ;)
score: 0

http://stackoverflow.com/comment/41670779
score: 0
type: Comment
has text: Please double-check your answer. It does not make any sense.
comment on: http://stackoverflow.com/a/26505348
type: AnswerComment

http://stackoverflow.com/a/26355717
score: 0
accepted answer of: http://stackoverflow.com/q/26354466
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26354466
has body: First you need to know about asynchronous and none-blocking.When your function is running, node is reading other codes and when the result is generated it return the value but now your other code that should show your answer on console is finished and printed it as undefined. You can search about callbacks in node and many other things and first you should know your tools better :) This is your code with true structure : update(object ,function(result){ console.log('result :', result); }); function update(obj,callback){ ... // removed : return (str || {err : err}); callback (str || {err : err}); ... // removed : return ({err: 'Failed to update. Please try again.'}); callback ({err: 'Failed to update. Please try again.'}); }
type: Answer

http://stackoverflow.com/comment/41640227
score: 0
has text: What is .triggerFull in your fiddle?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26504419

http://stackoverflow.com/a/26631938
has comment: http://stackoverflow.com/comment/41887700
answers question: http://stackoverflow.com/q/26390526
score: 0
has body: I've just tested a jsFiddle with 100,000 rows in handsontable, which works great. You need to be very careful when displaying a large number of rows, because the browser will most likely run very slow. I suggest taking the error message advice, and define height for your table, which will enforce scrollbars. This way handsontable will only render the visible part of the table, and not the full number of rows.
type: Answer

http://stackoverflow.com/a/26525993
answers question: http://stackoverflow.com/q/26418878
score: 0
type: Answer
has body: First of all you should get the HTML inside the editable area using the methods that are available in the editor, in this case getHTML method http://editor.froala.com/examples/getHTML. It is preferable to do so because there are some cleanups which the getHTML method does and it's good to make them. $('#edit').editable('getHTML', false, true); You can use the RegEx approach that you suggested, but you have to take into consideration not to wrap it twice. Another option would be to do that using jQuery which is easier. var editorText = $('#edit').editable('getHTML', false, true); var $div = $('&lt;div&gt;').html(editorText); // Wrap image. $div.find('img').each (function (index, img) { var $img = $(img); // Check if image is already wrapped in your anchor tag. if (!$img.parents('a.your_anchor_selector').length) { $img.wrap('&lt;a class="your_anchor"&gt;&lt;/a&gt;'); } }); var description = $div.html();

http://stackoverflow.com/q/26475562
has title: masonry on bootstrap elements got bumped down to new row
has comment: http://stackoverflow.com/comment/41590160
answer count: 1
has comment: http://stackoverflow.com/comment/41593730
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41590638
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26492770
type: Question
has body: The nature of the elements are that each one will be varied in height (due to image and the title) and its height is unknown before applying masonry. Though the width of each element is fixed with .col-lg-3. On the rendered page where each row has 4 elements, the 5 element is visually on a row on its own and the 6, 7, 8 got pushed down to 3rd row. html code and the content of each new element is wrapped in something like the following css .element { padding: 10px 10px 0px; } javascript code // layout the elements var layout = function(elements, $container, selector) { $container.imagesLoaded(function () { $container.masonry({ itemSelector: selector, columnWidth: selector, isAnimated: true, animationOptions: { duration: 750, easing: 'linear', queue: false } }).append(elements).masonry('appended', elements, true); }); }; and it's got called in the following way layout(elements, $('#elements'), '.element'); So anything could go wrong here?
tagged with: jquery-masonry
tagged with: javascript
has comment: http://stackoverflow.com/comment/41590591
score: 0

http://stackoverflow.com/q/26482727
tagged with: http://stackoverflow.com/tag/html
has title: Get value of select and use this to display div jquery
tagged with: css
has answer: http://stackoverflow.com/a/26482852
has comment: http://stackoverflow.com/comment/41601525
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41601606
accepted answer: http://stackoverflow.com/a/26482852
downvote count: 3
score: -3
has comment: http://stackoverflow.com/comment/41601499
has comment: http://stackoverflow.com/comment/41601409
type: Question
has comment: http://stackoverflow.com/comment/41600910
has body: I have a select with 2 options within: One Two What I want to do is display a hidden div when the option 2 is set. So I need to grab the value from the select and if it equals 2, show the div. My attempt with jQuery so far is as follows: $('#type').on('change', function(){ if(this.value == 2){ ('#hiddendiv').show(); } }) I'm including jQuery, but nothing is happening. Any ideas? Thanks!
has comment: http://stackoverflow.com/comment/41601337
upvote count: 0
has comment: http://stackoverflow.com/comment/41601160
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41600952
has comment: http://stackoverflow.com/comment/41600936
possible better answer: http://stackoverflow.com/a/26482836
favorite count: 0
has answer: http://stackoverflow.com/a/26482803
has comment: http://stackoverflow.com/comment/41600894
has answer: http://stackoverflow.com/a/26482836
answer count: 3

inheritance
tags question: http://stackoverflow.com/q/26355095
tag name: inheritance
tags question: http://stackoverflow.com/q/26457729
tags question: http://stackoverflow.com/q/26380966
type: Tag
tags question: http://stackoverflow.com/q/26460613
tags question: http://stackoverflow.com/q/26402292
tags question: http://stackoverflow.com/q/26495053
tags question: http://stackoverflow.com/q/26461010
tags question: http://stackoverflow.com/q/26480447
tags question: http://stackoverflow.com/q/26392934

http://stackoverflow.com/comment/41592996
type: Comment
comment on: http://stackoverflow.com/a/26478041
has text: Ohh... in that case a directive will be needed... to extract the element using `angular().find()` isn't it
type: AnswerComment
score: 0

http://stackoverflow.com/a/26466269
score: 0
type: Answer
has body: &lt;script&gt; $( "li" ).click(function() { $( this ).toggleClass( "highlight" ); $( this ).hide(); }); &lt;/script&gt; This will delete item from the list. Unless of course you want to delete it also from the database - then look at answer Rikudou_Sennin gave you.
answers question: http://stackoverflow.com/q/26466221
has comment: http://stackoverflow.com/comment/41570369

http://stackoverflow.com/comment/41581729
comment on: http://stackoverflow.com/q/26472174
score: 0
type: Comment
has text: Try to `console.dir(playerArray[turn].cards)` and `console.log(card)` to make sure you know what you are getting.
type: QuestionComment

http://stackoverflow.com/comment/41511654
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26432705
has text: Tomas, instead of insulting people, maybe you should spend more time reading the question.

http://stackoverflow.com/a/26373816
type: Answer
accepted answer of: http://stackoverflow.com/q/26373763
score: 4
answers question: http://stackoverflow.com/q/26373763
has body: Say like bellow var str = '354-567-3425 | John Doe'; var indexFromLast = str.length - str.indexOf('|'); the indexFromLast has the index from end of the string.
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26356975
has answer: http://stackoverflow.com/a/26360410
tagged with: javascript
has comment: http://stackoverflow.com/comment/41378791
has comment: http://stackoverflow.com/comment/41372778
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
score: 1
has body: I created a new DOM element in the script tags $( "#droppable_home" ).droppable({ .... drop: //Create the new widget element. This renders in my page in Chrome's inspect view. var obj = document.createElement('widget'); obj.id = "draggable_button"; obj.style.cssText = 'position: absolute;left: 35%;top: 50%;'; $("#droppable_home").parent().append(obj); .......... }); My angular directive to scan "widget" elements is below .directive('widget', function($compile) { var show = function(scope, element, attrs) { var render = function() { alert('Found '+element.attr('id')); if(element.attr('id') === 'draggable_button'){ alert('placing widget'); element.html('&lt;div id="widget_button" class="button button-positive" unbindable&gt;&lt;span ng-bind="widgetname"&gt;&lt;/span&gt;&lt;/div&gt;'); $compile(element.contents())(scope); } }; scope.$watch('drag', function(newValue, oldValue) { alert('drag changed'); if(newValue &gt; 0) render(); }); }; return { restrict : 'E', link : show }; }) Problem -- the element created above using jQuery is never recognized by the Angular Directive. Would be great to know what's missing.
favorite count: 0
accepted answer: http://stackoverflow.com/a/26360410
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/41378645
has comment: http://stackoverflow.com/comment/41372899
has comment: http://stackoverflow.com/comment/41372839
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41373942
has title: Javascript createElement not scanned by Angular directive

http://stackoverflow.com/a/26473650
downvote count: 0
answers question: http://stackoverflow.com/q/26473401
accepted answer of: http://stackoverflow.com/q/26473401
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41584946
has body: There's a problem in your CSS. All of your &lt;div&gt;'s containing the anchor tags and the images have a fixed position along with left: 0 which is why they are overlapping. You can achieve what you're trying to do like this, I've modified the HTML and added new CSS: #images { text-align: center; } #images a:nth-child(2) { display: inline-block; float: left; } #images a:last-child { display: inline-block; float: right; } &lt;div id="images"&gt;&lt;a href="#"target="_blank"&gt;&lt;img style="width: 100px; height: 100px; border: 0;" src="http://7brands.com/wp-content/uploads/2014/07/google-maps-logo.jpg" /&gt;&lt;/a&gt; &lt;a href="#"target="_blank"&gt;&lt;img style="width: 100px; height: 80px; border: 0;" src="http://7brands.com/wp-content/uploads/2014/07/google-maps-logo.jpg" /&gt;&lt;/a&gt; &lt;a href="#"target="_blank"&gt;&lt;img style="width: 100px; height: 80px; border: 0;" src="http://7brands.com/wp-content/uploads/2014/07/google-maps-logo.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
type: AcceptedAnswer

http://stackoverflow.com/comment/41569806
comment on: http://stackoverflow.com/q/26465866
type: QuestionComment
type: Comment
has text: Are you sure that you are downloading Knockout? At least on your jsFiddle, trying to download knockout.2.0.0.js is generating a 403 error. Does: http://jsfiddle.net/Lwauxwx8/ do what you want it to?
score: 0

http://stackoverflow.com/a/26431543
upvote count: 1
has comment: http://stackoverflow.com/comment/41576034
has comment: http://stackoverflow.com/comment/41508386
answers question: http://stackoverflow.com/q/26431010
downvote count: 0
has body: You can run a loop like the following: var temp = []; for (var i =0; i< data.length;i++) { var obj = data[i], dup = false; for (var j = 0; j < temp.length; j++) { var item = temp[j]; if (obj.CODE == item.name) { item.data.push(obj.TOTAL); dup = true; break; } } if (!dup) { temp.push({ name: obj.CODE, data: [obj.TOTAL] }); } } var data = [{ "CODE": "1", "MONTH": "1", "TOTAL": 78 }, { "CODE": "1", "MONTH": "2", "TOTAL": 122 }, { "CODE": "1", "MONTH": "3", "TOTAL": 102 }, { "CODE": "1", "MONTH": "4", "TOTAL": 65 }, { "CODE": "1", "MONTH": "5", "TOTAL": 134 }, { "CODE": "1", "MONTH": "6", "TOTAL": 88 }, { "CODE": "1", "MONTH": "7", "TOTAL": 77 }, { "CODE": "1", "MONTH": "8", "TOTAL": 58 }, { "CODE": "1", "MONTH": "9", "TOTAL": 67 }, { "CODE": "1", "MONTH": "10", "TOTAL": 69 }, { "CODE": "2", "MONTH": "5", "TOTAL": 4 }, { "CODE": "2", "MONTH": "6", "TOTAL": 87 }, { "CODE": "2", "MONTH": "7", "TOTAL": 81 }, { "CODE": "2", "MONTH": "8", "TOTAL": 105 }, { "CODE": "2", "MONTH": "9", "TOTAL": 112 }, { "CODE": "2", "MONTH": "10", "TOTAL": 85 } ]; var temp = []; for (var i = 0; i < data.length; i++) { var obj = data[i], dup = false; for (var j = 0; j < temp.length; j++) { var item = temp[j]; if (obj.CODE == item.name) { item.data.push(obj.TOTAL); dup = true; break; } } if (!dup) { temp.push({ name: obj.CODE, data: [obj.TOTAL] }); } } console.log(temp); Check browser console F12 to see the result
has comment: http://stackoverflow.com/comment/41508998
type: Answer
score: 1